Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Simperium warning: couldn't processLocalObjectWithKey because the object no longer exists #361

Closed
lukegeiger opened this issue Oct 1, 2014 · 7 comments
Assignees
Milestone

Comments

@lukegeiger
Copy link

Hello, I am consistently getting this error when deleting an object, than saving the context it right after. I am wondering what may cause this warning to happen, and what can be done to resolve it on my end.

Here is a snippet of my CD model (All Cascade delete rules)
Game-->Many TeamStats --->Many PlayerStats

I am deleting the Game object, and the processLocalObjectWithKey is pertaining to a PlayerStats object.

I am assuming I am getting this error because I am trying to access an object that is being deleted, but I just don't see how thats possible on my end because I literally do nothing after I delete the object, then save the context.

Also, this error will only occur if i edit a PlayerStats object on a different viewControllers context(even though I passed it in).... For example I create all these objects on one context, pass in the game object and the context to another view controller, manipulate a playerStats object, and then it will print out this error.

If I proceed to try to replicate this again, I get errors instead of warnings Simperium Received Error [The operation couldn’t be completed. (SPChangeProcessor error 2.)]

Everything does seem to be deleted on the Simperium database though correctly online.

@lukegeiger lukegeiger changed the title Question: Simperium warning: couldn't processLocalObjectWithKey Question: Simperium warning: couldn't processLocalObjectWithKey because the object no longer exists Oct 1, 2014
@jleandroperez
Copy link
Contributor

hello @lukegeiger!,

The warning you mentioned, SPChangeProcessor error 2, means basically that your app received an acknowledgement for a MODIFY change sent to the backend, and the affected object got locally deleted in the meantime.

Would it be possible to get the logs generated by Simperium, with verboseLoggingEnabled set to true?.

Thank you!

@jleandroperez jleandroperez added this to the v0.7.0 milestone Oct 1, 2014
@jleandroperez jleandroperez self-assigned this Oct 1, 2014
@lukegeiger
Copy link
Author

Hey @jleandroperez ! ok, The logs are too long to post in a github comment, so I have emailed them to you in a thread I believe we had going from awhile back... The issue is fairly easy to reproduce, and I have added you as a collaborator on the project again if you want to take a look first hand. Let me know if you need anything else.

@jleandroperez
Copy link
Contributor

@lukegeiger i couldn't spot the logs anywhere! would you please re-send them to jorge.perez [at automattic dot com] ?

Thanks for adding me to the repository!. I'd love to take a quick look at the logs first, we might be able to debug this one faster.

Thank you!

@lukegeiger
Copy link
Author

@jleandroperez No problem, just figured it may be of some use... Sent the email!

@jleandroperez
Copy link
Contributor

@lukegeiger thanks again for the logs!. After a close review, i confirm that the errors you've been seeing in the console log are innocuous. They mean that:

  • You had locally added a bunch of entities
  • Before they got sent, and the changes confirmed by the backend, they got locally deleted
  • The warning is actually "got an acknowledgement for an object that no longer exists".

I've updated the internal behavior, so this is only printed out with verboseLogging enabled, and it should only be considered as a warning. (Latest code merged into develop).

Thanks for reporting this!

@lukegeiger
Copy link
Author

@jleandroperez Thanks for taking a look, after running a pod update, the repo did not seem to update. Is the podfile up to date with the develop branch? Or do you recommend integrating Simperium in a different way.

@jleandroperez
Copy link
Contributor

@lukegeiger no problem!. Ohh sorry, i didn't notice you were using cocoapods.

The repository podspec is mapped to develop. However, we did not push 0.7.0, yet, to the official CocoaPods repository (we'll be doing that early next week, most likely).

In the meantime, you can get the latest develop changes by mapping directly to our github repository. Something like this should do the trick:

pod 'SocketRocket', :git => 'https://github.com/Simperium/simperium-ios.git', :branch => 'develop'

If anything, please, just say the word. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants