MaikuB / MaikuB/flutter_local_notifications
java.lang.RuntimeException: Unable to start service com.dexterous.flutterlocalnotifications.ForegroundService@1985771 with Intent { cmp=com.xxx.xxx/com.dexterous.flutterlocalnotifications.ForegroundService (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 2.7k
- Forks
- 1.6k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
E/AndroidRuntime(11842): java.lang.RuntimeException: Unable to start service com.dexterous.flutterlocalnotifications.ForegroundService@1985771 with Intent { cmp=com.zhanghongyang.todo/com.dexterous.flutterlocalnotifications.ForegroundService (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
E/AndroidRuntime(11842): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5408)
E/AndroidRuntime(11842): at android.app.ActivityThread.access$3200(ActivityThread.java:283)
E/AndroidRuntime(11842): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2584)
E/AndroidRuntime(11842): at android.os.Handler.dispatchMessage(Handler.java:109)
E/AndroidRuntime(11842): at android.os.Looper.loopOnce(Looper.java:206)
E/AndroidRuntime(11842): at android.os.Looper.loop(Looper.java:296)
E/AndroidRuntime(11842): at android.app.ActivityThread.main(ActivityThread.java:9047)
E/AndroidRuntime(11842): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11842): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
E/AndroidRuntime(11842): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:968)
E/AndroidRuntime(11842): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
E/AndroidRuntime(11842): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.setSmallIcon(FlutterLocalNotificationsPlugin.java:463)
E/AndroidRuntime(11842): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.createNotification(FlutterLocalNotificationsPlugin.java:364)
E/AndroidRuntime(11842): at com.dexterous.flutterlocalnotifications.ForegroundService.onStartCommand(ForegroundService.java:29)
E/AndroidRuntime(11842): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5388)
E/AndroidRuntime(11842): ... 9 more
I/ClientTransactionHandler(11842): send EXECUTE_TRANSACTION
I/ClientTransactionHandler(11842): send EXECUTE_TRANSACTION
I/Process (11842): Sending signal. PID: 11842 SIG: 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace in FlutterLocalNotificationsPlugin.java at setSmallIcon (line 463), then inspect createNotification (line 364) and ForegroundService.java (line 29). Reproduce the foreground-service startup failure and determine why a null Integer reaches setSmallIcon; done means the service starts without this NullPointerException and creates its notification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, flutter, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100