Android crashes with push notifications enabled
Back to All

Android crashes with push notifications enabled

I enabled push notifications using OneSignal and it works well for Apple but crashes for Android. It looks like this could be in the integration with OneSignal based on the NoSuchMethodException in the following crash log:

D/InputMethodManager( 7680): showSoftInput() view=co.median.android.o{81a79e6 VFEDHVC.. .F...... 0,0-1080,2064 aid=1073741826} flags=0 reason=SHOW_SOFT_INPUT
I/AssistStructure( 7680): Flattened final assist data: 5476 bytes, containing 1 windows, 29 views
W/OnBackInvokedCallback( 7680): OnBackInvokedCallback is not enabled for the application.
W/OnBackInvokedCallback( 7680): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
D/InsetsController( 7680): show(ime(), fromIme=true)
D/EGL_emulation( 7680): app_time_stats: avg=89.53ms min=1.42ms max=454.08ms count=11
W/System.err( 7680): java.lang.NoSuchMethodException: n1.c.onOSSubscriptionChanged [class com.onesignal.m3]
W/System.err( 7680): at java.lang.Class.getMethod(Class.java:2103)
W/System.err( 7680): at java.lang.Class.getDeclaredMethod(Class.java:2081)
W/System.err( 7680): at com.onesignal.z2.c(Unknown Source:45)
W/System.err( 7680): at com.onesignal.OSSubscriptionChangedInternalObserver.a(Unknown Source:17)
W/System.err( 7680): at com.onesignal.OSSubscriptionChangedInternalObserver.changed(Unknown Source:0)
W/System.err( 7680): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 7680): at com.onesignal.z2.c(Unknown Source:71)
W/System.err( 7680): at com.onesignal.OSSubscriptionState.j(Unknown Source:23)
W/System.err( 7680): at com.onesignal.d4.o2(Unknown Source:12)
W/System.err( 7680): at com.onesignal.o5.f0(Unknown Source:0)
W/System.err( 7680): at com.onesignal.s5$d.b(Unknown Source:64)
W/System.err( 7680): at com.onesignal.r4$e.run(Unknown Source:4)
W/System.err( 7680): at java.lang.Thread.run(Thread.java:1012)
D/EGL_emulation( 7680): app_time_stats: avg=23.25ms min=1.51ms max=201.13ms count=25
D/EGL_emulation( 7680): app_time_stats: avg=137.44ms min=49.78ms max=271.05ms count=8
D/InputMethodManager( 7680): showSoftInput() view=co.median.android.o{81a79e6 VFEDHVC.. .F...... 0,0-1080,1307 aid=1073741826} flags=0 reason=SHOW_SOFT_INPUT
I/AssistStructure( 7680): Flattened final assist data: 5504 bytes, containing 1 windows, 29 views
D/InsetsController( 7680): show(ime(), fromIme=true)
D/EGL_emulation( 7680): app_time_stats: avg=131.64ms min=52.34ms max=226.12ms count=9
D/EGL_emulation( 7680): app_time_stats: avg=150.19ms min=83.43ms max=269.10ms count=7
D/EGL_emulation( 7680): app_time_stats: avg=432.33ms min=300.33ms max=512.77ms count=3
W/k1.h0 ( 7680): getInfo: Cannot get carrierNames, READ_PHONE_STATE not granted
E/AndroidRuntime( 7680): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime( 7680): Process: com.trustednation.app, PID: 7680
E/AndroidRuntime( 7680): java.lang.RuntimeException: An error occurred while executing doInBackground()
E/AndroidRuntime( 7680): at android.os.AsyncTask$4.done(AsyncTask.java:415)
E/AndroidRuntime( 7680): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
E/AndroidRuntime( 7680): at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
E/AndroidRuntime( 7680): at java.util.concurrent.FutureTask.run(FutureTask.java:269)
E/AndroidRuntime( 7680): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
E/AndroidRuntime( 7680): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
E/AndroidRuntime( 7680): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
E/AndroidRuntime( 7680): at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime( 7680): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.Map.size()' on a null object reference
E/AndroidRuntime( 7680): at java.util.HashMap.putMapEntries(HashMap.java:500)
E/AndroidRuntime( 7680): at java.util.HashMap.putAll(HashMap.java:784)
E/AndroidRuntime( 7680): at p1.c.a(Unknown Source:29)
E/AndroidRuntime( 7680): at co.median.android.GoNativeApplication.c(Unknown Source:2)
E/AndroidRuntime( 7680): at co.median.android.u$b.a(Unknown Source:22)
E/AndroidRuntime( 7680): at co.median.android.u$b.doInBackground(Unknown Source:2)
E/AndroidRuntime( 7680): at android.os.AsyncTask$3.call(AsyncTask.java:394)
E/AndroidRuntime( 7680): at java.util.concurrent.FutureTask.run(FutureTask.java:264)
E/AndroidRuntime( 7680): ... 4 more
I/Process ( 7680): Sending signal. PID: 7680 SIG: 9