carp-dk / carp-dk/flutter-plugins
Notifications - Error when whatsapp message is deleted
- Dominant language
- Dart
- Stars
- 608
- Forks
- 735
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
### Device / Emulator and OS
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
- Device: Xiaomi Mi 11 Lite
- OS: Android 11
### Describe the bug
When receiving a message from whatsapp and after deleting it (with delete for everyone) it crash the app.
**Error**:
E/AndroidRuntime( 7066): FATAL EXCEPTION: main
E/AndroidRuntime( 7066): Process: com.example.app , PID: 7066
E/AndroidRuntime( 7066): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference
E/AndroidRuntime( 7066): at dk.cachet.notifications.NotificationListener.onNotificationPosted(NotificationListener.java:41)
E/AndroidRuntime( 7066): at android.service.notification.NotificationListenerService.onNotificationPosted(NotificationListenerService.java:374)
E/AndroidRuntime( 7066): at android.service.notification.NotificationListenerService$MyHandler.handleMessage(NotificationListenerService.java:2131)
E/AndroidRuntime( 7066): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 7066): at android.os.Looper.loop(Looper.java:236)
E/AndroidRuntime( 7066): at android.app.ActivityThread.main(ActivityThread.java:8059)
### Expected behavior
Receive a notification with "This message has been cancelled"
### Actual behavior
App crashed
Contributor guide
No contributing guide indexed for this repository
Research direction
Read dk/cachet/notifications/NotificationListener.java at line 41 and reproduce the crash by deleting a WhatsApp message for everyone on Android. Done means the cancellation produces a notification with "This message has been cancelled" instead of crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100