tanguyantoine / react-native-music-control

Display and manage media controls on lock screen and notification center for iOS and Android.
https://www.npmjs.com/package/react-native-music-control
MIT License
697 stars 264 forks source link

Certain Android devices...Couldn't expand RemoteViews for: StatusBarNotification #319

Closed jeffbonasso-ambifi closed 4 years ago

jeffbonasso-ambifi commented 4 years ago

When using the Music Control on certain Android devices it crashes the app. Some versions of Android work fine. Customers reported this to me on Version 7.1 of Android and I was able to reproduce.

Googling this error there seems like many suggestions such as this one, although it seems like there are a variety of things that cause the problem. https://stackoverflow.com/questions/6209631/bad-notification-posted-couldnt-expand-remoteviews-for-statusbarnotification

  1. Error getting in logcat 2020-02-22 16:12:30.750 28918-28918/com.miracheckcopilot E/AndroidRuntime: FATAL EXCEPTION: main Process: com.miracheckcopilot, PID: 28918 android.app.RemoteServiceException: Bad notification posted from package com.miracheckcopilot: Couldn't expand RemoteViews for: StatusBarNotification(pkg=com.miracheckcopilot user=UserHandle{0} id=100 tag=null key=0|com.miracheckcopilot|100|null|10087: Notification(pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 category=transport actions=2 vis=PUBLIC)) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
  1. Platform ?

    • [ ] iOS
    • [x] Android
  2. Device

    • [X] Simulator
    • [X] Real device