doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.32k stars 1.02k forks source link

App Crash With RN 0.74 #2293

Open ErHarinderSingh opened 7 months ago

ErHarinderSingh commented 7 months ago

Console gives following error in debug mode on android (NOBRIDGE) LOG Bridgeless mode is enabled (NOBRIDGE) ERROR Error: Exception in HostObject::get for prop 'TrackPlayerModule': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotation from native module method: TrackPlayerModule.add(). Details: Unable to parse JNI signature. Detected unsupported return class: kotlinx.coroutines.Job

In Release build, it won't get started. Same on iOS (But I am not sure if app is not working with this issue or other issue)

cc : @dcvz

eflashcards commented 7 months ago

Same as this too! Android - No problem in ReactNative - 0.73.6 with newArchEnabled=false => It happens when set newArchEnabled=true.

Screenshot 2024-04-07 at 10 56 16
lovegaoshi commented 7 months ago

there is a very recent pr currently for this but imo so many libraries break with newarch compatibility layer right now its worth to wait until most others catch up for devs

AkilUnik commented 6 months ago

please wait fro latest configuration

lovegaoshi commented 6 months ago

since 0.74.1 is released i guess its worth to mention at here again. bridgeless new arch is not compatible atm.
https://github.com/facebook/react-native/issues/44255

RalissonMattias commented 6 months ago

Any updates?

lovegaoshi commented 6 months ago

dont enable newarch and bridgeless and ur fine for now. otherwise u have to harass facebook from the issue posted above

On Tue, May 21, 2024, 7:03 AM Ralisson Mattias @.***> wrote:

Any updates?

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

puckey commented 3 months ago

since 0.74.1 is released i guess its worth to mention at here again. bridgeless new arch is not compatible atm. facebook/react-native#44255

Looks like bridge support is fixed in latest nightly: https://github.com/facebook/react-native/issues/44255#issuecomment-2219998615

lovegaoshi commented 3 months ago

no its not

https://github.com/facebook/react-native/issues/46050

On Sat, Aug 17, 2024, 7:08 AM Jonathan Puckey @.***> wrote:

since 0.74.1 is released i guess its worth to mention at here again. bridgeless new arch is not compatible atm. facebook/react-native#44255 https://github.com/facebook/react-native/issues/44255

Looks like bridge support is fixed in latest nightly: facebook/react-native#44255 (comment) https://github.com/facebook/react-native/issues/44255#issuecomment-2219998615

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

AlirezaHadjar commented 3 months ago

I can confirm that it's not working with 0.75.2 with new arch enabled.

jParaskevopoulos commented 1 month ago

So, almost 2025 and still not working, any news ?

lovegaoshi commented 1 month ago

if u bother to click into the issues linked above, u will find fb JUST picked the changes yesterday and scheduled to release by 0.76.1.

On Tue, Oct 29, 2024, 1:19 AM John Paraskevopoulos @.***> wrote:

So, almost 2025 and still not working, any news ?

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

MohsinAtArbisoft commented 1 month ago

I just updated to React Native 0.76.1, but the app still crashes on any file where import TrackPlayer from 'react-native-track-player' is used. Both on android and iOS.

lovegaoshi commented 1 month ago

u need to apply rhe new arch patch. eg. https://github.com/lovegaoshi/RNTPExampleNewArch/blob/fix/patches/react-native-track-player%2B4.1.1.patch

and please track the new arch progress in the respective PR instead of here

On Wed, Oct 30, 2024, 6:07 AM Mohsin Raza @.***> wrote:

I just updated to React Native 0.76.1, but the app still crashes on any file where import TrackPlayer from 'react-native-track-player' is used. Both on android and iOS.

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

jviall commented 1 month ago

please track the new arch progress in the respective PR instead of here

@lovegaoshi which PR are you referring to? Do you expect that fixing this issue will provide support for 0.76 (and beyond)? I suspect it's the root of my issue in #2368

lovegaoshi commented 1 month ago

image this issue is specifically related to the new arch compatibility. its likely not related to ur issue.

it doesnt seem u linked the lib right, but i neither generated my repo with expo nor use custom RN to tell. all i can say is refer to the example app as its a known working app. u can diff it against the template and see where it differs and where u missed. my new arch example is generated from the cli template.

MohsinAtArbisoft commented 1 month ago

I applied this patch react-native-track-player+4.1.1.patch, but still no luck. iOS and android app crashes wherever import TrackPlayer from 'react-native-track-player' is used. using react-native 0.76.1

lovegaoshi commented 1 month ago

pls see the screen shot above. there are 2 PRs and both have to be applied.

i can confirm the new arch runs, both at my fork and my new arch example. since neither do u post ur repo, nor I want to read ur repo, u should consult the example app in my linked repos.

yudican commented 2 weeks ago

in file android/gradle.properties change newArchEnabled to false

asifbadeghar54 commented 3 days ago

Same as this too! Android - "react-native": "0.76.3", "react-native-track-player": "^4.1.1", newArchEnabled=true.

Screenshot 2024-04-07 at 10 56 16

Hi did u resolved this issue even iam also facing same on 0.76.3 ?

ryanzhouff commented 15 hours ago

Same as this too! Android - No problem in ReactNative - 0.73.6 with newArchEnabled=false => It happens when set newArchEnabled=true.

Screenshot 2024-04-07 at 10 56 16

same issue. using Expo SDK 52 and react native 0.76.

varadaraj772 commented 3 hours ago

Same as this too! Android - "react-native": "0.76.3", "react-native-track-player": "^4.1.1", newArchEnabled=true.

Screenshot 2024-04-07 at 10 56 16

Hi did u resolved this issue even iam also facing same on 0.76.3 ?

any solution?