Rapsssito / react-native-background-actions

React Native background service library for running background tasks forever in Android & iOS.
MIT License
818 stars 117 forks source link

Service doesn't work with new architecture #224

Open contactsimonwilson opened 5 months ago

contactsimonwilson commented 5 months ago

It appears that the background service doesn't work correctly when upgrading to the new RN architecture on Android. I'm yet to test on iOS but on Android the notification shows up correctly but the task is never registered.

WARN No task registered for key VescStatsService1

If anyone has any ideas about what the issue could be, I can look into a fix.

RNTP has a similar issue but possibly not related. https://github.com/doublesymmetry/react-native-track-player/issues/2293

contactsimonwilson commented 5 months ago

@Rapsssito was this intentionally closed? I can't see any changes that would make this work make this work. There's a discussion ongoing in the react-native repo https://github.com/facebook/react-native/issues/44255

Rapsssito commented 5 months ago

@contactsimonwilson, woops. My fault (I was closing all issues related to Android 14 incompatibility and I probably copied the wrong #), I will reopen it again.

marciogabrielsf commented 3 weeks ago

Same problem with me. I was trying to update my app to the new architecture + bridgeless and had the same issue on Android. The notification shows up but the task doesn't execute.

RN 0.75.4 + New Architecture + Bridgeless mode active. Background actions v4.0.1

contactsimonwilson commented 2 weeks ago

The fix for compatibility should be available in the latest 0.76.1 React Native release. I'll test it ASAP and will let you know whether this can be closed.