Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.1] Crash: com.doublesymmetry.trackplayer.service.MusicService.startAndStopEmptyNotificationToAvoidANR #2309

Open
kckongara opened this issue May 10, 2024 · 1 comment
Labels

Comments

@kckongara
Copy link

Describe the Bug
The app crashes almost only on Android 14 devices with the following error log

Exception java.lang.RuntimeException: at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5286) at android.app.ActivityThread.-$$Nest$mhandleServiceArgs at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2531) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:230) at android.os.Looper.loop (Looper.java:319) at android.app.ActivityThread.main (ActivityThread.java:8893) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103) Caused by android.app.ForegroundServiceStartNotAllowedException: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel (ForegroundServiceStartNotAllowedException.java:54) at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel (ForegroundServiceStartNotAllowedException.java:50) at android.os.Parcel.readParcelableInternal (Parcel.java:4882) at android.os.Parcel.readParcelable (Parcel.java:4864) at android.os.Parcel.createExceptionOrNull (Parcel.java:3064) at android.os.Parcel.createException (Parcel.java:3053) at android.os.Parcel.readException (Parcel.java:3036) at android.os.Parcel.readException (Parcel.java:2978) at android.app.IActivityManager$Stub$Proxy.setServiceForeground (IActivityManager.java:7214) at android.app.Service.startForeground (Service.java:775) at com.doublesymmetry.trackplayer.service.MusicService.startAndStopEmptyNotificationToAvoidANR (MusicService.kt:123) at com.doublesymmetry.trackplayer.service.MusicService.onStartCommand (MusicService.kt:98) at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5268)

Steps To Reproduce
Unable to reproduce the error but the crashes are reported on Google Play console.

Environment Info:
System: OS: macOS 14.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 69.30 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.17.0 - /var/folders/x9/_m93565x6l5d5rn664r33cxh0000gp/T/yarn--1715344637560-0.10878240913764015/node Yarn: 1.22.19 - /var/folders/x9/_m93565x6l5d5rn664r33cxh0000gp/T/yarn--1715344637560-0.10878240913764015/yarn npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm Watchman: 2023.09.25.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: Not Found SDKs: iOS SDK: Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4 Android SDK: Not Found IDEs: Android Studio: 2023.3 AI-233.14808.21.2331.11709847 Xcode: 15.3/15E204a - /usr/bin/xcodebuild Languages: Java: 11.0.18 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.6 => 0.71.6 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found

"react-native-track-player": "^4.0.1"

How I can Help
What can you do to help resolve this?
Have you investigated the underlying JS or Swift/Android code causing this bug?
Can you create a Pull Request with a fix?

@kckongara kckongara added the Bug label May 10, 2024
@lovegaoshi
Copy link
Contributor

duplicate of #2244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants