react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

Not Working with Expo SDK 53 (newArchEnabled = false)

Open devtrex007 opened this issue 10 months ago • 1 comments

Describe the Bug The player doesn't work when using react-native-track-player with Expo SDK 53 and newArchEnabled = false. The app fails to compile unless I remove the onBind() method in MusicService.kt, but when I do that, the player doesn’t function — no playback, no controls.

This setup worked fine before upgrading to Expo 53.

Steps To Reproduce

  1. Create a new Expo SDK 53 app.
  2. Install [email protected].
  3. Setup react-native-track-player
  4. Try to build the app.

It fails with a Kotlin error: onBind overrides nothing.

If you remove the onBind() method, the app builds, but the player no longer works.

Replicable on Example App? Not tested on the example app yet.

Environment Info: System: OS: macOS 15.5 Chip: Apple M3 Pro Binaries: Node: 22.14.0 npm: 11.4.1 npmPackages: react-native: 0.79.3 react-native-track-player: 4.1.1 expo: 53.0.11

How I can Help It would be great if you can make it Expo 53 compatible. I can test proposed changes or patches, and try fixes if suggested. Not familiar enough with the Kotlin/Android internals to open a PR right now.

Image

devtrex007 avatar Jun 14 '25 06:06 devtrex007

dupe of: https://github.com/doublesymmetry/react-native-track-player/issues/2455

@devtrex007 I had this issue too, it is easily fixed temporarily by using patch-package to modify the file as described in this comment: https://github.com/doublesymmetry/react-native-track-player/issues/2455#issuecomment-2867771771

alecmolloy avatar Jun 14 '25 20:06 alecmolloy

@alecmolloy Thank you so much, It's working now! It would be great if this fix gets patched into the package. I saw there's a pending commit, hopefully it gets merged soon.

devtrex007 avatar Jun 18 '25 07:06 devtrex007