-
-
Notifications
You must be signed in to change notification settings - Fork 735
PushBroadcastReceiver: java.lang.NullPointerException #260
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
Comments
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.
|
Hi @AraBisTiC, I check our source code, this problem happens becuase we can not get the raw push data from the intent. When we try to use null to build a JSON object, the exception is thrown. try {
pushData = new JSONObject(intent.getStringExtra(KEY_PUSH_DATA));
} catch (JSONException e) {
PLog.e(TAG, "Unexpected JSONException when receiving push data: ", e);
} I wonder
|
That's all the information I have unfortunately as I'm using Crashlytics to obtain crash dumps. I've sent a couple dozen pushes without problems however. If there's not much to go by, I'll keep an eye on it and update should it happen again. ^^ |
This happens in the wild for me too, here is the work around I use:
|
sweet fix. Thanks @alexblack |
Glad I could help! I reported what looks like the same bug last year: https://developers.facebook.com/bugs/1503917729875663/ |
Thanks @alexblack. @AraBisTiC, I have already added the null checking for the raw data from GCM. It should not bother you anymore. If you want to add log for the NPE case, @alexblack' way is a good solution. |
Push is working for mostly without issues, however just got this crash from one of my users, any ideas?
The text was updated successfully, but these errors were encountered: