react-native-track-player
react-native-track-player copied to clipboard
App stopped to execute code after reopening
Describe the Bug The app is stucked in specific case after reopening. The reproduction: 25/25. We have experienced the issue across different models of devices and different android system versions.
Our options:
await TrackPlayer.updateOptions({
android: {
appKilledPlaybackBehavior: AppKilledPlaybackBehavior.StopPlaybackAndRemoveNotification,
},
capabilities: [Capability.Play, Capability.Pause],
notificationCapabilities: [Capability.Play, Capability.Pause],
compactCapabilities: [Capability.Play, Capability.Pause],
progressUpdateEventInterval: PROGRESS_UPDATE_EVENT_INTERVAL,
});
Steps To Reproduce
- Open the app
- Start playing track
- Minimize the app
- Close the app
- Open the app
- The app is stucked (i mean, even while the developing with attached debugger, we suddenly stopped to get any log messages from device and UI on the screen is stucked, but not freeze)
- Reopen the app, and everything is good
If we remove the TrackPlayer.registerPlaybackService() and do not use any connected with TrackPlayer features, the issue is gone.
**Environment Info:**
react-native-track-player versions: "4.0.1", "4.1.1". Real devices (developing, production) OS: Android
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Pro Memory: 93.53 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.19.0 path: ~/.nvm/versions/node/v18.19.0/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v18.19.0/bin/yarn npm: version: 10.2.3 path: ~/.nvm/versions/node/v18.19.0/bin/npm Watchman: version: 2024.05.06.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /Users/ianiskondakovmercury/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 23.5 - iOS 17.5 - macOS 14.5 - tvOS 17.5 - visionOS 1.2 - watchOS 10.5 Android SDK: API Levels: - "34" Build Tools: - 33.0.1 - 34.0.0 System Images: - android-34 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2023.3 AI-233.14808.21.2331.11926650 Xcode: version: 15.4/15F31d path: /usr/bin/xcodebuild Languages: Java: version: 17.0.11 path: /usr/bin/javac Ruby: version: 3.1.2 path: /Users/ianiskondakovmercury/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.8 wanted: 0.73.8 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false