Strange new iOS 7 errors: receiver from DB / ForceShrinkPersistentStore_NoLock

14,498

Solution 1

I also had the first of your problems just today:

ERROR: unable to get the receiver data from the DB

I don't know the reason (maybe somehow the cache got corrupt) but deleting all of the simulator's Applications folder made the problem go away for me.

rm -rf ~/Library/Application Support/iPhone Simulator/7.0-64/Applications/*

Solution 2

This error generally occurs in iOS7 and reason might be cache issues. I fixed the problem by deleting folder of simulator.

Steps :

Right click on “Finder” window select “Go to Folder”

Paste “~/Library/Application Support/iPhone Simulator/”

This will open iPhone Simulator folder containing simulators used in execution.

Now, delete 7.x folder.

enter image description here

Solution 3

I got the same problem, but is is while debugging on a iOS device (iPhone 4 iOS 7.0.4)

Not sure what causes this... But I tried deleting the app on device and rerunning, then the error is gone.

Solution 4

Got same problem today. In my case ERROR: unable to get the receiver data from the DB error message was not resolved by cleaning app from simulator/device. Once running app for a while error got reported again. Also it was logged each time I did [NSURLSession dataTaskWithRequest:...] calls.

Found it was related to caching responses. Setting policy to ignore local cache eliminated error logging:

NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration  defaultSessionConfiguration];
defaultConfigObject.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;

NSURLSession *session = [NSURLSession sessionWithConfiguration: defaultConfigObject
                                                          delegate: nil
                                                     delegateQueue: [NSOperationQueue mainQueue]];

NSURLSessionDataTask * dataTask = [session dataTaskWithRequest:urlRequest completionHandler:completion];
[dataTask resume];

Note: Session has to be invalidated once not needed any more, otherwise will cause memory leak

Solution 5

I too faced a similar problem..

Including the above suggestion I also ignored the cache in my post request

NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0];

and the problem never appeared for me...

Share:
14,498
avuthless
Author by

avuthless

Mobile games and apps programmer, technology enthusiast and RC fan.

Updated on August 04, 2022

Comments

  • avuthless
    avuthless almost 2 years

    Good day.

    I have a project that uses a lot of network connections with SSL. This project runs fine and without errors on iOS 5 and 6. But with new iOS 7 i keep getting these two errors:

    ERROR: unable to get the receiver data from the DB
    
    ForceShrinkPersistentStore_NoLock -delete- We do not have a BLOB or TEXT column type.  Instead, we have 5.
    

    They are not connected in any way and i did keep getting first one for few weeks, then later i got this second one too.

    They are received on my application start, at that point i send few HTTP POST's and process received data. I cannot catch where do these errors come from.

    I could find them if i could understand them. Anyone know what do they mean or on what cases one can cause them?

  • avuthless
    avuthless over 10 years
    Well on Monday morning, both errors were gone (no one touched the code at all). So these "ghost errors" are still a mystery. iOS 7 still throws "BLOB TEXT" error but not that often. Device and simulators iOS 5 + 6 stay quiet. I accept this answer because there is no problem anymore, even though it resolved itself. Thank you for your support.
  • John Doe
    John Doe over 10 years
    This is perhaps obvious but if you are also debugging on an actual iPhone delete the app and rerun it.
  • ctitze
    ctitze about 10 years
    Note that the command above won't work unless you escape the space character in the path (Application\ Support)
  • JSWilson
    JSWilson almost 10 years
    I have a number of JSON posts to my webservice. The problem only occurs on one that gets > 40K of data back. Changing the cachePolicy to NSURLRequestReloadIgnoringCacheData caused the problem to go away.