Hi, I just finished reading all 10 pages of this thread, and I didn't see this one... first, let me explain: I bought a used T-mobile S4 on eBay, and within a day or so had the first SIM card error. Restarting fixed it, and for a couple days it did it about once per day, but then yesterday (I've only had the phone about 5 days) it was doing it really frequently, every twenty minutes or so. I found this thread and started reading. I installed that Bluetooth Connect and Play app (mentioned previously in this thread), which did not help. Blowing into the SIM card slot got it going until this afternoon, but then it was not recognizing the SIM card even after restarting. In a panic, because I drive around for work and I need my phone, I tried:
Blowing in the SIM card slot again
Removing the SD card
Clearing the cache
Putting a piece of cardstock behind the SIM card
Leaving the battery and SIM card out for a bit, in case it needed to cool down
And pressing on the empty SIM card slot.
None of those things fixed it.
Then, I drove to a hardware store and purchased a small Philips screwdriver and I removed all the screws, but when the gray plastic didn't come off easily, I chickened out and decided to wait till I could watch a YouTube video (the screen glass is cracked in the corner, so I was afraid of messing up the screen). But then I sort of remembered reading about booting it in safe mode, and I thought I would try it, I held down the power, the home button and the volume down all at once, and then it said something about installing an OS, so I hit volume down which was cancel. After that the SIM card worked! When I got a chance I started watching some YouTube videos, because I still wanted to try putting some foam or something to press down the ribbon connector. In one video's comments, a person called iFix Galaxy wrote about the SCREWS being the problem! (I never put mine back in, btw) they said try removing the one closest to the SIM card, but if that didn't help remove them all and add them back in one by one until you figure out the minimum screws you can have out and still have it working. I don't know if my weird boot had something to do with this fix or not.
Anyway, mine has been working about 6 hrs now, and I've got my fingers crossed that this is it!! I do plan to replace some of the screws, and I might still try putting in foam. I wanted to share this fix and I'm curious to see if it helps anyone else.