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

Crash with RN 76. New architecture support

Open masarbazi opened this issue 1 year ago • 35 comments

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 avatar Nov 03 '24 17:11 masarbazi

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 avatar Nov 04 '24 11:11 danishhusain

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.

danishhusain avatar Nov 04 '24 11:11 danishhusain

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

pigeonmal avatar Nov 04 '24 12:11 pigeonmal

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.

smfunder avatar Nov 11 '24 03:11 smfunder

Hi Same error here

kesha-antonov avatar Nov 11 '24 19:11 kesha-antonov

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.

oraylan avatar Nov 12 '24 00:11 oraylan

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

baselshlewett avatar Nov 13 '24 10:11 baselshlewett

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

Try this PR At least app builds with it

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

kesha-antonov avatar Nov 13 '24 11:11 kesha-antonov

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.

gh-pro avatar Nov 17 '24 13:11 gh-pro

#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

tarkanlar avatar Nov 24 '24 18:11 tarkanlar

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

lovegaoshi avatar Nov 25 '24 19:11 lovegaoshi

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

smfunder avatar Nov 27 '24 00:11 smfunder

Facing same issue, after updating to rn76

typescript-any avatar Nov 27 '24 07:11 typescript-any

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

smfunder avatar Nov 27 '24 16:11 smfunder

yall should use https://github.com/doublesymmetry/react-native-track-player/pull/2395

On Wed, Nov 27, 2024, 8:43 AM smfunder @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/doublesymmetry/react-native-track-player/issues/2389#issuecomment-2504334565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZMOVVTRDPJ7OYTPYDOWJWT2CXZCRAVCNFSM6AAAAABRC6C7KKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGMZTINJWGU . You are receiving this because you commented.Message ID: @.*** com>

lovegaoshi avatar Nov 27 '24 16:11 lovegaoshi

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

rajibola avatar Nov 30 '24 23:11 rajibola

  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

typescript-any avatar Dec 01 '24 05:12 typescript-any

  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

smfunder avatar Dec 01 '24 12:12 smfunder

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

itzyashh avatar Dec 02 '24 19:12 itzyashh

Thanks that was really helpful @itzyashh.

The PR is here: https://github.com/doublesymmetry/react-native-track-player/pull/2395 -- hope to see it merged soon 🤞

yagudaev avatar Dec 07 '24 08:12 yagudaev

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

gh-pro avatar Dec 08 '24 17:12 gh-pro

Can confirm with @gh-pro

saraspaudel avatar Dec 22 '24 00:12 saraspaudel

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

gh-pro avatar Dec 22 '24 03:12 gh-pro

Any updates on getting this released? installing from the feature branch is working fine for me locally but it fails installing in eas so would be great if this was just in a supported npm release version

awilson9 avatar Jan 09 '25 13:01 awilson9

"react-native-track-player": "github:puckey/react-native-track-player#feature/update-react-native"

Image

after adding this line. when I did -> npm install getting error.

Image

SurajTopal avatar Jan 16 '25 15:01 SurajTopal

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.

@oraylan is it working fine after disabled ?

SurajTopal avatar Jan 16 '25 15:01 SurajTopal

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.

@oraylan is it working fine after disabled ?

yes, so far no problem

oraylan avatar Jan 16 '25 15:01 oraylan

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.

@oraylan is it working fine after disabled ?

yes, so far no problem

Thank you so much brother, Last time I missed something. But Now it is working fine.

SurajTopal avatar Jan 16 '25 17:01 SurajTopal

Installing from the related feature branch (github:puckey/react-native-track-player#feature/update-react-native) is now broken for me. is there any update on getting this merged? We haven't heard anything since the request was opened with a fix and it's been several months

awilson9 avatar Feb 06 '25 23:02 awilson9

I'm facing the same issue in RN 0.77. Any news on this bug?

AndrePereiraSF avatar Feb 14 '25 15:02 AndrePereiraSF