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

Installation fails to save: Attempted to change an objectId to one that's already known to the Offline Store. #267

Open
alexblack opened this issue Nov 24, 2015 · 56 comments

Comments

@alexblack
Copy link

Non-fatal Exception: java.lang.Exception: java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store.
       at com.aadhk.woinvoice.util.ParseInit$2.then(ProGuard:195)
       at com.aadhk.woinvoice.util.ParseInit$2.then(ProGuard:173)
       at bolts.Task$15.run(ProGuard:839)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)
Caused by java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store.
       at com.parse.OfflineStore.updateObjectId(ProGuard:1468)
       at com.parse.ParseObject.notifyObjectIdChanged(ProGuard:1260)
       at com.parse.ParseObject.setState(ProGuard:738)
       at com.parse.ParseObject.setState(ProGuard:726)
       at com.parse.ParseObject$6.then(ProGuard:1407)
       at com.parse.ParseObject$6.then(ProGuard:1392)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.access$000(ProGuard:32)
       at bolts.Task$10.then(ProGuard:581)
       at bolts.Task$10.then(ProGuard:578)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetError(ProGuard:929)
       at bolts.TaskCompletionSource.trySetError(ProGuard:46)
       at bolts.TaskCompletionSource.setError(ProGuard:71)
       at bolts.Task$15$1.then(ProGuard:854)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.access$000(ProGuard:32)
       at bolts.Task$10.then(ProGuard:581)
       at bolts.Task$10.then(ProGuard:578)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetError(ProGuard:929)
       at bolts.TaskCompletionSource.trySetError(ProGuard:46)
       at bolts.TaskCompletionSource.setError(ProGuard:71)
       at bolts.Task$15$1.then(ProGuard:854)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.access$000(ProGuard:32)
       at bolts.Task$10.then(ProGuard:581)
       at bolts.Task$10.then(ProGuard:578)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetError(ProGuard:929)
       at bolts.TaskCompletionSource.trySetError(ProGuard:46)
       at bolts.TaskCompletionSource.setError(ProGuard:71)
       at bolts.Task$15$1.then(ProGuard:854)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.continueWith(ProGuard:588)
       at bolts.Task.continueWith(ProGuard:599)
       at bolts.Task$15.run(ProGuard:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeAfterTask(ProGuard:830)
       at bolts.Task.access$100(ProGuard:32)
       at bolts.Task$11.then(ProGuard:635)
       at bolts.Task$11.then(ProGuard:632)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetError(ProGuard:929)
       at bolts.TaskCompletionSource.trySetError(ProGuard:46)
       at bolts.TaskCompletionSource.setError(ProGuard:71)
       at bolts.Task$15$1.then(ProGuard:854)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.continueWith(ProGuard:588)
       at bolts.Task.continueWith(ProGuard:599)
       at bolts.Task$15.run(ProGuard:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeAfterTask(ProGuard:830)
       at bolts.Task.access$100(ProGuard:32)
       at bolts.Task$11.then(ProGuard:635)
       at bolts.Task$11.then(ProGuard:632)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetResult(ProGuard:913)
       at bolts.TaskCompletionSource.trySetResult(ProGuard:39)
       at bolts.TaskCompletionSource.setResult(ProGuard:62)
       at bolts.Task$15$1.then(ProGuard:856)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.continueWith(ProGuard:588)
       at bolts.Task.continueWith(ProGuard:599)
       at bolts.Task$15.run(ProGuard:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeAfterTask(ProGuard:830)
       at bolts.Task.access$100(ProGuard:32)
       at bolts.Task$11.then(ProGuard:635)
       at bolts.Task$11.then(ProGuard:632)
       at bolts.Task.runContinuations(ProGuard:875)
       at bolts.Task.trySetResult(ProGuard:913)
       at bolts.TaskCompletionSource.trySetResult(ProGuard:39)
       at bolts.TaskCompletionSource.setResult(ProGuard:62)
       at bolts.Task$15$1.then(ProGuard:856)
       at bolts.Task$15$1.then(ProGuard:843)
       at bolts.Task$14.run(ProGuard:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(ProGuard:105)
       at bolts.Task.completeImmediately(ProGuard:789)
       at bolts.Task.continueWith(ProGuard:588)
       at bolts.Task.continueWith(ProGuard:599)
       at bolts.Task$15.run(ProGuard:843)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)

Here is the info I captured:

msg columns className, objectId are not unique (code 19) 
createdat   Thu May 28 22:16:18 MESZ 2015 
name    installation.save-failed 
appversion  0.1.181 
installationid  12de10a7-0558-43e4-955e-096b9c0b935a 
idx 34 
devicetype  android 
objectid    39CaIPof9e 
runcount    235 
updatedat   Mon Nov 23 05:23:57 MEZ 2015 

Another:

msg Attempted to change an objectId to one that's already known to the Offline Store. 
abtest-template 1 
createdat   Mon Nov 23 10:56:19 EST 2015 
name    installation.save-failed 
appversion  0.1.181 
cdtest-paywall  1 
installationid  6d2923fd-8946-4a36-babe-3889dffe9f50 
idx 78 
devicetype  android 
objectid    FhRwI115GJ 
runcount    12 
updatedat   Tue Nov 24 13:12:28 EST 2015

And another:

msg Attempted to change an objectId to one that's already known to the Offline Store. 
abtest-template 0 
createdat   Mon Nov 23 13:02:53 NZDT 2015 
name    installation.save-failed 
appversion  0.1.181 
cdtest-paywall  1 
installationid  c8a29f3a-e63c-4865-9241-5e8d242d3031 
idx 43 
devicetype  android 
objectid    C8n83z7WL7 
runcount    7 
updatedat   Tue Nov 24 19:58:57 NZDT 2015 
@parse-github-bot
Copy link

Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.

Please try the latest SDK. Our release notes have details about what issues were fixed in each release.

In addition, you might find the following resources helpful:

@alexblack
Copy link
Author

Hi @wangmengyan95 what more info would you like? If you have any insight into how to reproduce this parse bug that would be super helpful. It seems rather mysterious to me.

I've included the information I've captured from 3 different users who have experienced this issue, I'm happy to collect any further data you require.

@wangmengyan95
Copy link
Contributor

Hi @alexblack, thanks for the quick response, I am trying to figure out what is the possible cause of this issue. I will update the information I need here.

@grantland
Copy link
Contributor

This seems like it could be related to #267, but instead of saving a new ParseInstallation instance with the installationId from disk from a ParseInstallation that has failed to be read from LDS, the ParseInstallation in LDS is succeeding to be read at some point after the first read failed and the save on the new instance who's objectId is then being tracked by LDS so LDS throws an error when the save result returns.

@iRazvan
Copy link

iRazvan commented Dec 11, 2015

I have the same bug, I don't know how to reproduce it. It keeps showing up in my crash tracking system. I am deleting the parse data manually from the disk and cache when the user logs out. The parse installation is also cleared from the cloud code.

@stepanov-standy
Copy link

Hi Folks,

Looks like I have similar issue. What is interesting that my android app has been in production for 3 month. And only during last 1 month I see such stack traces from real users in my bug report system:

java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store. at com.parse.OfflineStore.updateObjectId(OfflineStore.java:1468) at com.parse.ParseObject.notifyObjectIdChanged(ParseObject.java:1353) at com.parse.ParseObject.setState(ParseObject.java:751) at com.parse.ParseObject.setState(ParseObject.java:739) at com.parse.ParseObject$6.then(ParseObject.java:1500) at com.parse.ParseObject$6.then(ParseObject.java:1485) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:581) at bolts.Task$10.then(Task.java:578) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetError(Task.java:929) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:854) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:581) at bolts.Task$10.then(Task.java:578) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetError(Task.java:929) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:854) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:581) at bolts.Task$10.then(Task.java:578) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetError(Task.java:929) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:854) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.continueWith(Task.java:588) at bolts.Task.continueWith(Task.java:599) at bolts.Task$15.run(Task.java:843) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:830) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:635) at bolts.Task$11.then(Task.java:632) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetError(Task.java:929) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:854) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.continueWith(Task.java:588) at bolts.Task.continueWith(Task.java:599) at bolts.Task$15.run(Task.java:843) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:830) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:635) at bolts.Task$11.then(Task.java:632) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetResult(Task.java:913) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:856) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.continueWith(Task.java:588) at bolts.Task.continueWith(Task.java:599) at bolts.Task$15.run(Task.java:843) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:830) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:635) at bolts.Task$11.then(Task.java:632) at bolts.Task.runContinuations(Task.java:875) at bolts.Task.trySetResult(Task.java:913) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:856) at bolts.Task$15$1.then(Task.java:843) at bolts.Task$14.run(Task.java:798) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:789) at bolts.Task.continueWith(Task.java:588) at bolts.Task.continueWith(Task.java:599) at bolts.Task$15.run(Task.java:843) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:838)

Unfortunately, I can't reproduce it locally on my test environments (emulators and real devices). Taking into account it's failure during async update of the offline mode, I can't say for sure what app actions cause this problem.

Parse Team, could you explain possible cases that may lead to such behaviour? Is it possible to ignore such exceptions that are currently fatal for my app and fully crash it.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@stepanov-standy
Copy link

Hi Team, any updates on this? I don't want to disable parse in my app due to this small issue.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@mailat
Copy link

mailat commented Jan 6, 2016

It is for sure a problem which is comming from Parse SDK. We use the latest version and we can see the same issue for some users on some instalations:

Fatal Exception: java.lang.RuntimeException: Unable to create application OurcoolApplication: java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store.
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4861)
       at android.app.ActivityThread.access$1500(ActivityThread.java:178)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:194)
       at android.app.ActivityThread.main(ActivityThread.java:5637)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store.
       at com.parse.OfflineStore.updateObjectId(OfflineStore.java:1468)
       at com.parse.ParseObject.notifyObjectIdChanged(ParseObject.java:1260)
       at com.parse.ParseObject.setState(ParseObject.java:738)
       at com.parse.ParseObject.setState(ParseObject.java:726)
       at com.parse.ParseObject$6.then(ParseObject.java:1407)
       at com.parse.ParseObject$6.then(ParseObject.java:1392)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.access$000(Task.java:32)
       at bolts.Task$10.then(Task.java:581)
       at bolts.Task$10.then(Task.java:578)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetError(Task.java:929)
       at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46)
       at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71)
       at bolts.Task$15$1.then(Task.java:854)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.access$000(Task.java:32)
       at bolts.Task$10.then(Task.java:581)
       at bolts.Task$10.then(Task.java:578)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetError(Task.java:929)
       at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46)
       at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71)
       at bolts.Task$15$1.then(Task.java:854)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.access$000(Task.java:32)
       at bolts.Task$10.then(Task.java:581)
       at bolts.Task$10.then(Task.java:578)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetError(Task.java:929)
       at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46)
       at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71)
       at bolts.Task$15$1.then(Task.java:854)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.continueWith(Task.java:588)
       at bolts.Task.continueWith(Task.java:599)
       at bolts.Task$15.run(Task.java:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeAfterTask(Task.java:830)
       at bolts.Task.access$100(Task.java:32)
       at bolts.Task$11.then(Task.java:635)
       at bolts.Task$11.then(Task.java:632)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetError(Task.java:929)
       at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46)
       at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71)
       at bolts.Task$15$1.then(Task.java:854)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.continueWith(Task.java:588)
       at bolts.Task.continueWith(Task.java:599)
       at bolts.Task$15.run(Task.java:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeAfterTask(Task.java:830)
       at bolts.Task.access$100(Task.java:32)
       at bolts.Task$11.then(Task.java:635)
       at bolts.Task$11.then(Task.java:632)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetResult(Task.java:913)
       at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39)
       at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62)
       at bolts.Task$15$1.then(Task.java:856)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.continueWith(Task.java:588)
       at bolts.Task.continueWith(Task.java:599)
       at bolts.Task$15.run(Task.java:843)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeAfterTask(Task.java:830)
       at bolts.Task.access$100(Task.java:32)
       at bolts.Task$11.then(Task.java:635)
       at bolts.Task$11.then(Task.java:632)
       at bolts.Task.runContinuations(Task.java:875)
       at bolts.Task.trySetResult(Task.java:913)
       at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39)
       at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62)
       at bolts.Task$15$1.then(Task.java:856)
       at bolts.Task$15$1.then(Task.java:843)
       at bolts.Task$14.run(Task.java:798)
       at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
       at bolts.Task.completeImmediately(Task.java:789)
       at bolts.Task.continueWith(Task.java:588)
       at bolts.Task.continueWith(Task.java:599)
       at bolts.Task$15.run(Task.java:843)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@agordeev
Copy link

I'm getting the same error when trying to save my PFUser:

Attempted to change an objectId to one that's already known to the OfflineStore.

@alexblack
Copy link
Author

Here is the LDS from a device that faces this issue

ParseOfflineStore.zip

For data in this app: https://parse.com/apps/invoice-maker-dev

Here is some meta data:

{"appVersion":"0.1.192","createdAt":"Thu Jan 21 20:27:53 EST 2016","deviceType":"android","idx":"165",
"installationId":"ea4c6657-e4c1-4ed6-a79c-759f0f794469","msg":"There were 2 exceptions.","objectId":"Nn0mwH9M6o","runCount":"20","updatedAt":"Thu Jan 21 23:59:11 EST 2016"}

{"appVersion":"0.1.192","createdAt":"Thu Jan 21 20:27:53 EST 2016","deviceType":"android","idx":"163","installationId":"ea4c6657-e4c1-4ed6-a79c-759f0f794469","msg":"Attempted to change an objectId to one that's already known to the Offline Store.","objectId":"Nn0mwH9M6o","runCount":"20","updatedAt":"Thu Jan 21 23:59:10 EST 2016"}

@stepanov-standy
Copy link

Parse Team, could you provide an ETA for the fix of the issue. It's pretty important for all of us, because it affects our users.

@grantland
Copy link
Contributor

Could anyone confirm that this is still an issue with the latest version of the SDK (v1.13.0), an updated stack trace, and a small project that repros this issue with it?

@alexblack
Copy link
Author

Is the LDS I shared from 1.12.0 useful at all?
On 22 Jan 2016 4:16 pm, "Grantland Chew" [email protected] wrote:

Could anyone confirm that this is still an issue with the latest version
of the SDK (v1.13.0), an updated stack trace, and a small project that
repros this issue with it?


Reply to this email directly or view it on GitHub
#267 (comment)
.

@grantland
Copy link
Contributor

All I was able to determine from that was there was not another ParseInstallation with the same objectId in SQLite.

@alexblack
Copy link
Author

There is a fair amount of info on this thread. A LDS capture, stack traces, example objects on your server that are having the problem.

Like the other Parse bugs I've hit I don't have any insights into how to reproduce this one. I do have it reproducible right now on a device, if there is anything else you would like me to collect just let me know.

@stepanov-standy
Copy link

Hi Folks,

I have to confirm that even on 1.13 version the problem is reproducible :(

Stack trace is still the same:

java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store. at com.parse.OfflineStore.updateObjectId(OfflineStore.java:1469) at com.parse.ParseObject.notifyObjectIdChanged(ParseObject.java:1202) at com.parse.ParseObject.setState(ParseObject.java:680) at com.parse.ParseObject.setState(ParseObject.java:668) at com.parse.ParseObject$6.then(ParseObject.java:1349) at com.parse.ParseObject$6.then(ParseObject.java:1334) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetResult(Task.java:994) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:934) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetResult(Task.java:994) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:934) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

@alexblack
Copy link
Author

"Like the other Parse bugs I've hit I don't have any insights into how to reproduce this one. I do have it reproducible right now on a device, if there is anything else you would like me to collect just let me know."

@grantland any thoughts? Or any suggestions on how to reproduce this?

@grantland
Copy link
Contributor

@stepanov-standy would you be able to provide a small project and environment this issue reproduces on?

@grantland
Copy link
Contributor

@alexblack i do not. this issue does not appear for us in any of our projects or environments so anything we could think of would be a shot in the dark. owners of the codebase that this reproduces are generally responsible for knowing how to reproduce it, since they have code that shows these symptoms.

@alexblack
Copy link
Author

@grantland sorry I was asking if there was anything else you wanted me to collect from the device I have that repros the problem.

@alexblack
Copy link
Author

"owners of the codebase that this reproduces are generally responsible for knowing how to reproduce it"

Yes I'm aware of Parse's attitude towards its customers :)

I'm not sure about the other Parse users on this thread, but I certainly feel completely in the dark about how to reproduce these bizarre bugs.

My code is doing pretty straightforward things, like, saving the ParseInstallation object. Its not clear how you expect me to figure out from my code that saves an installation why your code is throwing this exception.

@alexblack
Copy link
Author

I've already stated that the error occurs when ParseInstallation.saveInBackground is called.

@grantland
Copy link
Contributor

That clearly isn't the only cause of it, since ParseInstallation.saveInBackground() succeeds on it's own.

@alexblack
Copy link
Author

This problem happens on the device currently. It happens when ParseInstallation.saveInBackground() is called. I'm not sure what else you're looking for here regarding triggers or actions that result in this error with the device.

@grantland
Copy link
Contributor

I'm looking for a project and/or steps that I can use to make this problem occur for me on my machine. I will not be responding to any more comments on this thread without a way to accomplish this.

@alexblack
Copy link
Author

I'm looking for a project and/or steps that I can use to make this problem occur for me on my machine

You've said that numerous times. I simply asked for a pointer in the right direction given that I am not familiar with your codebase.

@alexblack
Copy link
Author

I seem to be missing something. How are you offering to attach the debugger and grab me variables, etc. if you aren't able to reproduce the issue?

Did you figure out what you were missing? I again was expecting a yes or no.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

2 similar comments
@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@stepanov-standy
Copy link

Hi There! Not able to reproduce the issue in synthetic test I've decided to replace all saveInBackground call to saveEventually. It was my assumption that problem was in saveInBackground. Now I can say that it was wrong. Nothing was changed after the replacement. I still have the same amount of crashes per day (on ~1100 sessions I have ~16-20 crashes).

I've received dozens of comments from my users with ask to fix my app crashes, but I still can't reproduce required for the crash conditions on my real devices and emulators.

Does someone find a workaround for that problem? What I can say for sure that the first incident with such problem was logged on Google Analytics on 14 November :(

screen shot 2016-02-19 at 10 50 23

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

4 similar comments
@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@alexblack
Copy link
Author

I wonder if resetting the installation might fix this up:

http://stackoverflow.com/questions/31890049/parse-push-notifications-how-to-reset-installation-data

@rogerhu
Copy link
Contributor

rogerhu commented Apr 21, 2017

I think we've fixed this issue in the last set of merges..

@rogerhu rogerhu closed this as completed Apr 21, 2017
@stepanov-standy
Copy link

stepanov-standy commented Apr 22, 2017

Roger, awesome! Is it already part of 1.15.1 release? I am ready to test it on my users, because I have 10 app fails daily during last 1,5 year :)

@stepanov-standy
Copy link

stepanov-standy commented May 7, 2017

Hm... looks like the issue still exists :(

I've updated to the latest 1.15.6, but still see the same fatal stacktraces from my users:

java.lang.RuntimeException: Attempted to change an objectId to one that's already known to the Offline Store. at com.parse.OfflineStore.updateObjectId(OfflineStore.java:1479) at com.parse.ParseObject.notifyObjectIdChanged(ParseObject.java:1322) at com.parse.ParseObject.setState(ParseObject.java:772) at com.parse.ParseObject.setState(ParseObject.java:760) at com.parse.ParseObject$6.then(ParseObject.java:1469) at com.parse.ParseObject$6.then(ParseObject.java:1454) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.access$000(Task.java:32) at bolts.Task$10.then(Task.java:654) at bolts.Task$10.then(Task.java:651) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetError(Task.java:1011) at bolts.TaskCompletionSource.trySetError(TaskCompletionSource.java:46) at bolts.TaskCompletionSource.setError(TaskCompletionSource.java:71) at bolts.Task$15$1.then(Task.java:932) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetResult(Task.java:994) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:934) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeAfterTask(Task.java:908) at bolts.Task.access$100(Task.java:32) at bolts.Task$11.then(Task.java:708) at bolts.Task$11.then(Task.java:705) at bolts.Task.runContinuations(Task.java:956) at bolts.Task.trySetResult(Task.java:994) at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39) at bolts.TaskCompletionSource.setResult(TaskCompletionSource.java:62) at bolts.Task$15$1.then(Task.java:934) at bolts.Task$15$1.then(Task.java:921) at bolts.Task$14.run(Task.java:872) at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105) at bolts.Task.completeImmediately(Task.java:863) at bolts.Task.continueWith(Task.java:661) at bolts.Task.continueWith(Task.java:672) at bolts.Task$15.run(Task.java:921) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

@natario1 natario1 reopened this May 7, 2017
@venkataramanab
Copy link

I think you are creating new ParseObject with final type variable. Please check once.

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

No branches or pull requests