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

Crash with RN 76. New architecture support #2389

Open
masarbazi opened this issue Nov 3, 2024 · 23 comments
Open

Crash with RN 76. New architecture support #2389

masarbazi opened this issue Nov 3, 2024 · 23 comments
Labels

Comments

@masarbazi
Copy link

Describe the Bug
App crashes with RN76 where new arch is enabled by default.
image

Steps To Reproduce
Create new RN app and there we go...

Code To Reproduce
Just import TrackPlayer from 'react-native-track-player'; will cause the error

Environment Info:

Track player version:
  "react-native-track-player": "^4.1.1"
System:
  OS: Windows 11 10.0.22631
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
  Memory: 14.01 GB / 31.73 GB
npm:
    version: 10.2.4
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    Android NDK: 23.1.7779620
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-223.8836.35.2231.10406996
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.12
    path: /c/Program Files/Common Files/Oracle/Java/javapath/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.0
    wanted: 15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
@masarbazi masarbazi added the Bug label Nov 3, 2024
@danishhusain
Copy link

danishhusain commented Nov 4, 2024

WhatsApp Image 2024-11-04 at 16 49 39

I am also facing issue in New architecture. Team please fix the issue and its very important for us.

@egorkhmelev @qmx @skahack

@danishhusain
Copy link

Describe the Bug App crashes with RN76 where new arch is enabled by default. image

Steps To Reproduce Create new RN app and there we go...

Code To Reproduce Just import TrackPlayer from 'react-native-track-player'; will cause the error

Environment Info:

Track player version:
  "react-native-track-player": "^4.1.1"
System:
  OS: Windows 11 10.0.22631
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
  Memory: 14.01 GB / 31.73 GB
npm:
    version: 10.2.4
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    Android NDK: 23.1.7779620
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-223.8836.35.2231.10406996
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.12
    path: /c/Program Files/Common Files/Oracle/Java/javapath/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.0
    wanted: 15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

If you found any solution please ping me.

@pigeonmal
Copy link

look at #2370

@smfunder
Copy link

I'm also here because I'm facing this issue with 4.1.1 and RN 0.76.1 with New Arch enabled. I will be investigating and report any news.

@kesha-antonov
Copy link

Hi
Same error here

@oraylan
Copy link

oraylan commented Nov 12, 2024

Hi, I have the same error here w/ 4.1.1 and RN 0.76.1.

Obviously I need to disable the new architecture to make it work.

@baselshlewett
Copy link

How can we help to make this library support the new arch?

@kesha-antonov
Copy link

How can we help to make this library support the new arch?

Try this PR
At least app builds with it

#2290

@gh-pro
Copy link

gh-pro commented Nov 17, 2024

Thanks i have tested and its works

How can we help to make this library support the new arch?

Try this PR At least app builds with it

#2290

Thanks, i have tested and its work.

@tarkanlar
Copy link

#2290 yes this works on local but fails on eas build.
ERR_PNPM_PREPARE_PACKAGE  Failed to prepare git-hosted package fetched from "https://codeload.github.com/doublesymmetry/react-native-track-player/tar.gz/9b8db7f": [email protected] yarn-install: yarn install Exit status 1 pnpm install --no-frozen-lockfile exited with non-zero code: 1

@lovegaoshi
Copy link
Contributor

i dont think specifically ur error is this lib related. its more of a problem with ur package manager.

@smfunder
Copy link

How can we help to make this library support the new arch?

Try this PR At least app builds with it

#2290

I tested it on my RN 0.76.3 env with new arch and seems to work, but for some reason when I play a message I don't see the state update of playing/stopping etc. I will keep checking if it is my code or something related to the patch.

Thanks

@ayanonline
Copy link

Facing same issue, after updating to rn76

@smfunder
Copy link

One more detail, to make the events to work of RNTP, I had to patch the code as it is here:

https://github.com/doublesymmetry/react-native-track-player/pull/2370/files

@lovegaoshi
Copy link
Contributor

lovegaoshi commented Nov 27, 2024 via email

@rajibola
Copy link

  1. npm install --save react-native-track-player@3
  2. cd ios && pod update
  3. cd ..
  4. Rebuild the app again

@ayanonline
Copy link

  1. npm install --save react-native-track-player@3
  2. cd ios && pod update
  3. cd ..
  4. Rebuild the app again

for android? what to do

@smfunder
Copy link

smfunder commented Dec 1, 2024

  1. npm install --save react-native-track-player@3
  2. cd ios && pod update
  3. cd ..
  4. Rebuild the app again

for android? what to do

Same thing without step 2 and 3.

In Android you can clean project before run:

Cd android
./gradlew clean

@itzyashh
Copy link

itzyashh commented Dec 2, 2024

add this in your package.json for now
"react-native-track-player": "github:puckey/react-native-track-player#feature/update-react-native"

@yagudaev
Copy link

yagudaev commented Dec 7, 2024

Thanks that was really helpful @itzyashh.

The PR is here: #2395 -- hope to see it merged soon 🤞

@gh-pro
Copy link

gh-pro commented Dec 8, 2024

Hi, i found new bug, usePlaybackState(), useActiveTrack return not updated state, after add PR

@saraspaudel
Copy link

Can confirm with @gh-pro

@gh-pro
Copy link

gh-pro commented Dec 22, 2024

Hi, i confirm, all bug is closed in this pr

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