-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
135 deviceType must be specified in this operation #203
Comments
This looks to be a valid bug! The only the situation where We won't be able to fully guarantee it'll resolve your issue since there isn't a stable repro for your situation, but it'll be better than nothing. |
Great - does that mean you (or someone) will attempt a fix? Is there anything I can do in the meantime to work around this? If the parseInstallation doesn't get saved then I can't send push notifications. |
Sorry, ran off to a meeting before assigning myself. TL;DR: There's no workaround, but the problem isn't as bad as you think. If the above is correct, there are two different "current" Right now we only have reports of failures from your code's context and it's plausible that the on in the SDK fails as well, but only one or the other and not both. Therefore failure cases will result in either the GCM registration information will be persisted or your custom information will be persisted, but a In the end, the probability of a device not having a GCM registration information after the first launch is very low and nonexistent upon relaunch. |
That sounds promising. But a lot of my users won't have a relaunch, eg
|
If that's the case, a possible workaround is to add your own retry logic from fetching the "current" |
Cool, I'll try that. Just checking I understand - do I just need to retry the same logic I already have? or does the 2nd attempt need to do something different? |
Same thing, I just wanted to reiterate that you need to make sure you operate on a fresh value returned from |
Gotcha, thanks! |
Do you know when the next SDK release might be so I can try this out? Or, do you ever publish interim binaries I could try? |
Hmm, I'm not convinced this is the issue. I have one user who has had this error 298 times, ParseInstallation KSuNvq8VWj. He first saw the issue July 11th when he installed
He gets the error when trying to save objects that reference his installation too (this error here happened today using the latest version of my app which uses the latest parse sdk)
This doesn't seem to line up with your description of a race condition that goes away on 2nd app launch. |
Just to add some context: this is the most prevalent exception I see in my app. Its happened 6,623 times to 834 users in the last 10 days. 834 users is not that many for my app, but its not nothing. |
Is there any work around for my users who have this after months still? Can I explicitly add the deviceType value to the ParseInstallation myself? |
@grantland any thoughts? |
Yes, we have a snapshot build going for each commit that's published on Sonatype's snapshots repository.
Not really since the error is coming from a new |
I was talking about modifying my app's code to set the deviceType on the ParseInstallation when it saves it... wouldn't that solve the issue? My app saves the ParseInstallation on each startup, and some of my users have been hitting this issue on every startup for months. |
Unfortunately |
Great. I look forward to trying the new release. On Wed, Nov 4, 2015 at 5:51 PM, Grantland Chew [email protected]
|
Any update on the release? |
hey @grantland two other questions:
|
Trying to get a release out today.
|
Great! |
hey @grantland to help me understand #1 better (just above), how will things get fixed for users who have experienced this for ages? I'm looking at a user who installed the app in April, who first experienced the issue in May or June, recently updated to the latest build of my app and is still experiencing the issue. It seems unlikely their device is facing a race condition every time the app is started, so I'm concerned the problem with the missing deviceType will persist once the race condition is fixed. Her installation is already saved on Parse, with id QqFs9jxgVX, here: https://www.parse.com/apps/invoice-maker/collections#class/_Installation/p0 Thinking this over, it looks like the app was able to create and save the installation normally until Parse SDK 1.9.2 (we see parse version 1.9.1 on her installation), and which point it could never save it again, despite many app starts, upgrades etc, and despite me downgrading from 1.9.2 back to 1.9.1 in my app (and later upgrading to 1.10.3) |
With the current information on hand the race condition is the only way I can see something like this happening from the SDK. Otherwise, I could see this could be coming from the persisted As to why your specific user's |
My app attempts to save the ParseInstallation on each startup. I've shared what I think is all the relevant code. I'm simply asking you to walk me through what you meant when you said "1. Yes it should" above. I gave a specific example to help keep the discussion grounded. I think the theory you put forward was a race condition that would happen once the first time ParseInstallation.current was accessed, and that caused the issue. From what little I know of your SDK and platform, that doesn't seem to line up with what I'm seeing. I'm just looking to you for input here, am I missing something, maybe the theory does line up, or, if it doesn't, then the issue ls likely not resolved. I've only been facing the issue since June now :) |
"but we cannot be sure unless we're able to reproduce this on a instrumented device." Unfortunately I don't have any idea how to reproduce these Parse bugs, I had hoped that you could offer some insight there. I'd be happy to add some instrumentation to my code to help narrow this down. I did that as requested back in June when I first opened the bug. |
Unrelated: it'd be awesome if you guys included the exception code in the exception messages, so that when they are logged to tools like Crashlytics they are visible. Even better would be separate exceptions classes per type of exception. I have a lot of code checks instanceof ParseException, then casts it, then checks the code. |
Just saw a user fail to save their installation with the latest SDK. See attached. From previously logged events I see his installation's objectId is 0VfKnz2zif. This person has been a user since April. The fact that objectId is missing from the screenshot event means that the return value from installation.getObjectId() was null. The app tried to save the installation a second time with the recently added retry code, and it failed in the same manner.
Here is a json dump of the installation currently at Parse:
|
@grantland any thoughts? Should we re-open this if its still happening? |
Hi @alexblack, I have reopened this issue. It seems our previous patch does not fix your issue. I will try my best to walk through our codebase again to see what we can find. I will update this issue if we need some more information from your side. |
Great. It does seem really odd to me that the ParseInstallation in the Android code and the ParseInstallation on parse.com both have deviceType set, but that the error is "deviceType must be specified in this operation". What could be going on there? |
It might be worth looking at what changed from 1.9.1 to 1.9.2, it looks to me like many installations never saved again after the user upgraded to a version of the app that used 1.9.2. |
Hi @alexblack, thanks for the clue. I will take a look at the diff between 1.9.2 and 1.9.1. |
any update? |
hi @wangmengyan95 any update here? This continues to affect my users. Is there some way I can just clear out their existing installation on the client so that they can start a new one? |
Bump. This is still the most prevalent exception my users face in my app. |
From your logging I can see that
Since 1/ is resolved, 2/ is being discussed in #266, and 3/ is not related to the SDK, I'll be closing this issue. |
I've never seen deviceType not set, I've captured it before and after upgrading the SDK and its always set on both client and server. Responding to your points:
|
Hundreds of my users still face this issue, any chance you could respond to my response above? Thanks @grantland |
If this issue is still occurring, we'd need to be able to reproduce this in order to determine if it's a backend issue or SDK issue. Another thing you can do is to to verify yourself with network monitoring or ParseInterceptors whether or not a deviceToken is being sent by the client, but is still receiving the error. |
Yes it is still occurring. Wouldn't it simply be a matter of finding some of these errors on the server and find out if the deviceType was sent? |
Im also having this problem. Any workaround? |
@alexblack that is possible, but you'd have to go through the backend support for backend issues as we only support SDK issues on this repository: http://parse.com/help > contact us > REST API |
Hmm, as far as I can tell this is an issue with the SDK since it started with the SDK change from 1.9.1 to 1.9.2. |
What's the progress on this? I'm still getting it on 1.13.1 |
I have the same problem! Is there a workaround? I need this ASAP |
We're encountering this issue massively on 1.13.2 after switching from parse.com to our own Parse server. Thousands of Android users are affected every day. Some are extremely frustrated because they have tried to log in hundred of times without success. Even factory reset does not work (from the user feedback as we also could not reproduce this). |
facing this issue for thousands of users can anybody suggest a workaround? |
We saw this ages ago when updating to version 1.9.2, there was no real solution to it, getting our users to reinstall our app was a workaround. Recently we migrated from parse.com to parse-server, and didn't encounter this as a problem. |
I've been facing similar issues in my app and I have almost no clue how to go about it. Any quick fix? |
There is a workaround (I had that problem in 1.17.3), just add:
before you call save. Unfortunately "deviceType" field is read only so you need to alter ParseInstallation.java file and compile SDK:
|
A lot of my users encounter this error, I can't repro it, not sure what is going on. I'm using SDK 1.10.3. I first opened this issue on June 4th:
https://developers.facebook.com/bugs/903903186334036/
http://crashes.to/s/8a6fe6eb94f
"Failed to save parse installation: 135"
Here is a snippet of my code in this stack trace:
The text was updated successfully, but these errors were encountered: