-
-
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
org.json.JSONObject.NULL not handled properly wherever user authData is concerned #405
Comments
This sounds like a bug with parse-server, as anonymous |
Sounds good. Closing this issue. |
Also having the same issue. The issue was reported on the parse-server forum, and the issue was closed by saying that this bug should be resolved here in the android sdk. |
@grantland on parse-server side, Android is the only SDK that don't really play well with the leaky null. Maybe there is something to do here :) |
I am, surprisingly, still dealing with this issue. |
still occuring, anyone atleast have a workaround? |
I'm getting this stack trace after logging in (to a self-hosted parse-server) from an anonymous user that's been saved to the cloud:
Looks like
ParseUser#getAuthData(String)
is not handlingorg.json.JSONObject.NULL
(I assume that's whatorg.json.JSONObject$1
is) properly.I think the core of the problem is that
ParseUser#getAuthData()
has return typeMap<String, Map<String, String>>
. As it turns out, sometimes, you can encounter aJSONObject.NULL
as a value in this map. The lack ofJSONObject.NULL
awareness causes a few other issues too:JSONObject.NULL
but the code actually checks fornull
: https://github.com/ParsePlatform/Parse-SDK-Android/blob/f439b3d3ba02eaad52e653b6890b3a10e74168da/Parse/src/main/java/com/parse/ParseUser.java#L607JSONObject.NULL
here: https://github.com/ParsePlatform/Parse-SDK-Android/blob/f439b3d3ba02eaad52e653b6890b3a10e74168da/Parse/src/main/java/com/parse/ParseUser.java#L1217This problem goes away when pointing to hosted Parse because the hosted Parse implementation will never send down
"authData": {"anonymous": null}
as part of the User object -- somehow, the "authData" property is cleaned of null values before being sent down. (Should I file a separate issue against parse-server?)The text was updated successfully, but these errors were encountered: