Rapsssito / react-native-background-actions

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

Compiling JS failed: 95405:9:';' expected Buffer size ... #188

Open DeveloperMCD opened 1 year ago

DeveloperMCD commented 1 year ago

I get a very bizarre error when I paste the example code into my project, having followed all the directions for installation.

I'm using a Moto G Pure running Android 12.

Do I need to manually do all the setup for Headless JS? This project's documentation was a bit unclear on that. I followed the "getting started" guide and it didn't say to follow all these steps. Maybe I still need to? https://reactnative.dev/docs/headless-js-android

I followed these directions https://github.com/Rapsssito/react-native-background-actions#example-code Including everything under the Install link. https://github.com/Rapsssito/react-native-background-actions/blob/master/INSTALL.md

What causes the error I'm getting? Do I still need to do the underlying Headless JS Android (native code) setup?

Rapsssito commented 1 year ago

Are you able to compile and execute the example folder? https://github.com/Rapsssito/react-native-background-actions/tree/master/examples/backgroundExample

xgokhankose commented 10 months ago

Hey @DeveloperMCD did u find any solution ?

robertKozik commented 2 months ago

On my end it was occurring because I was trying to call the start function outside of the component. Calling it from the useEffect solved it on my end