background_locator
background_locator copied to clipboard
[ANDROID] Crash caused by java.lang.IllegalArgumentException
Background locator fails to start on some Android 10 device apparent invalid notification argument for small icon. Here are the logs:
Fatal Exception: java.lang.RuntimeException: Unable to create service rekab.app.background_locator.IsolateHolderService: java.lang.IllegalStateException: FlutterCallbackInformati…formation(callbackHandle) must not be null
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3394)
at android.app.ActivityThread.-wrap4(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6552)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=app.rekab/locator_plugin pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0x00000000 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)
at android.app.NotificationManager.fixNotification(NotificationManager.java:537)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:516)
at android.app.NotificationManager.notify(NotificationManager.java:449)
at android.app.NotificationManager.notify(NotificationManager.java:425)
at rekab.app.background_locator.IsolateHolderService.updateNotification(IsolateHolderService.java:90)
at rekab.app.background_locator.IsolateHolderService.onStartCommand(IsolateHolderService.java:59)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4288)
at android.app.ActivityThread.access$1800(ActivityThread.java:268)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2014)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7814)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Hi @Wian-TMC Thank you for opening an issue;
Did you provide an icon or used the default one?
My notification icon is set to an empty string
notificationIcon: '',
Can you provide a valid icon and see if the error persists or not?
Sure.
I got the same issue. The error still persist even with a valid icon