-
-
Notifications
You must be signed in to change notification settings - Fork 268
Android - Fatal Exception: java.lang.RuntimeException: Unable to create service com.tanguyantoine.react.MusicControlNotification$NotificationService: java.util.ConcurrentModificationException #247
Comments
Can you share some code? |
@tanguyantoine here is the component that handles the controls:
|
Just to give more context, our app supports background audio. |
if can you trye to render something else than |
@tanguyantoine Also, I could try to render something else but returning |
I am getting same crash in reports in play store. |
im getting same issue but only with Android 9 |
sorry I have absolutely no knowledge on Android 🤷♂️ |
@The0racle What do you think about this. No android expert so last time i tried to fix this bug i thought onTaskRemoved was triggered more often then it seems to be. I think however onDestroy() might be the key. #254 |
Hi, guys. I had the same issue and I resolved it adding the permission Regards. |
@roffelund I'm on it |
@arondn2 I have that permission already. App still crashes. |
@The0racle Do you have the logs? |
Still facing this issue after adding permission to AndroidManifest.xml. Logs below:
|
@ouabing I am using android 8.1. Maybe you can try cleaning the android project and rebuilding. You can try with |
Thanks, @arondn2 . Our app has already released several build versions, the release script will clean the build cache before assembleRelease so I think cleaning & rebuilding won't fix this issue (at least for me). Correct my previous comment, I checked our error tracker again, Android 8.0, 8.1, 9.0 devices have this issue. |
@ouabing @tanguyantoine @arondn2 could it be that the target SDK version has to be set to |
+1 @The0racle how did you solve this? |
@The0racle We are using |
@garfiaslopez unfortunately I haven't found a way to fix it yet. Changing to |
Just for the record, this happens when I enable handleAudioInterruptions on Android. |
Reopening. I will investigate. |
Description
Getting this crash after updating to v0.99. It seems related to #221 which #220 supposedly fixed it. Here is the Stack trace:

Looking at actions user took before the crash, makes me think the controls were not actually removed when app last terminated(or device locked), since app crashes right away when trying to play a new audio. Also, it happens only on OS 8.1.0+ and on Samsung devices.
I'm calling
MusicControl.stopControl()
when the specific component handling it is closed, but when app is terminatedcomponentWillUnmount
is not called. Not sure if that's related.Platform ?
Device
The text was updated successfully, but these errors were encountered: