Describe the bugjava.lang.IllegalStateException bug in production app.
Unfortunately, it is causing the app to have a single-digit crash rate.
To Reproduce
I have been unable to reliably reproduce on my device. The issue can be reproduced, but it's not clear to me how to reproduce reliably.
Example trace:
java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1795)
at android.app.ContextImpl.startService (ContextImpl.java:1740)
at android.content.ContextWrapper.startService (ContextWrapper.java:738)
at android.content.ContextWrapper.startService (ContextWrapper.java:738)
at com.guichaguri.trackplayer.module.MusicModule.waitForConnection (MusicModule.java:108)
at com.guichaguri.trackplayer.module.MusicModule.getPosition (MusicModule.java:455)
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:151)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
at android.os.Looper.loop (Looper.java:246)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:226)
at java.lang.Thread.run (Thread.java:923)
Environment (please complete the following information):
This issue occurs in production across a number of devices in production. OS Android 8 to 11
react-native-info:
System:
OS: macOS 11.6
CPU: (4) x64 Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz
Memory: 23.32 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.19.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/_/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6514223
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 14.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ^0.63.2 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
What react-native-track-player version are you using?
2.1.1
Code
Audio is fired from an ordinary screen that manages a BackgroundTimer, Download logic, and a few API calls.
Describe the bug
java.lang.IllegalStateException
bug in production app.Unfortunately, it is causing the app to have a single-digit crash rate.
To Reproduce I have been unable to reliably reproduce on my device. The issue can be reproduced, but it's not clear to me how to reproduce reliably.
Example trace:
Environment (please complete the following information): This issue occurs in production across a number of devices in production. OS Android 8 to 11
react-native-info
:What
react-native-track-player
version are you using?2.1.1
Code
Audio is fired from an ordinary screen that manages a
BackgroundTimer
, Download logic, and a few API calls.Additional dependencies: