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

Customer reporting issue with NPE on Android push notifications #298

Closed
ikbalkaya opened this issue Jan 20, 2022 · 1 comment · Fixed by #303
Closed

Customer reporting issue with NPE on Android push notifications #298

ikbalkaya opened this issue Jan 20, 2022 · 1 comment · Fixed by #303
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@ikbalkaya
Copy link
Contributor

ikbalkaya commented Jan 20, 2022

Details:
Hi , we also noticed that after the move to official ably plugin, we're getting a surge in the following error for Android:

{code}
Fatal Exception: java.lang.NullPointerException
Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.error(java.lang.String, java.lang.String, java.lang.Object)' on a null object reference
io.ably.flutter.plugin.push.PushActivationEventHandlers$BroadcastReceiver.returnMethodCallResult (PushActivationEventHandlers.java:86)
io.ably.flutter.plugin.push.PushActivationEventHandlers$BroadcastReceiver.onReceive (PushActivationEventHandlers.java:72)
androidx.localbroadcastmanager.content.LocalBroadcastManager.executePendingBroadcasts (LocalBroadcastManager.java:313)
androidx.localbroadcastmanager.content.LocalBroadcastManager$1.handleMessage (LocalBroadcastManager.java:121)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:226)
android.app.ActivityThread.main (ActivityThread.java:7191)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:499)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:942)
{code}
Seems to be impacting mainly certain manufacturers/models

{code}
62% Xiaomi
21% OPPO
5% Realme
5% realme
3% vivo
2% samsung
1% HUAWEI
<1% INFINIX MOBILITY LIMITED
<1% asus
<1% Sony
<1% Meizu
{code}
TODO:
Make sure you handle the situation where result is null
Check iOS implementation to see how this case is handled

@ikbalkaya ikbalkaya self-assigned this Jan 20, 2022
@ikbalkaya ikbalkaya added the bug Something isn't working. It's clear that this does need to be fixed. label Jan 20, 2022
@ikbalkaya
Copy link
Contributor Author

This is something to do with most probably where PushActivationEventHandlers is disposed, but the inner broadcast receiver which uses some properties from its upper class is attempting to use those results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging a pull request may close this issue.

1 participant