transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.54k stars 424 forks source link

Android App CRASH when BackgroundGeolocation.start() or BackgroundGeolocation.stop() #1985

Closed russmenum closed 1 month ago

russmenum commented 1 month ago

Your Environment

Expected Behavior

I should run .start() and have tracking running in the background, and be able to run .stop()

Actual Behavior

On the Simulator App crashes, on the actual phone just completely locks up

Steps to Reproduce

  1. Have a working app
  2. Upgrade to RN 0.71 from an older ver
  3. Start tracking
  4. Android App CRASH

Context

Updating to the latest RN incrementally.  And preparing for API 34 compliance on Android. Everything is still working as always on XCODE with some weeks for updates, Android side CRASH. 

To work down I already updated the use of which is removed in RN 0.71

// import { AsyncStorage } from "react-native"; // as of RN 0.71 REMOVED
import AsyncStorage from '@react-native-async-storage/async-storage';

and made as as indicated here a bare min start to see if it was react-native-background-geolocation or other code. Some permission or order or something has changed from RN 0.63.4 bump. 

I put logs: RIGHT BEFORE BackgroundGeolocation.start() that runs, NESTED IN which depending runs, and RIGHT AFTER which never runs... it is the BackgroundGeolocation.start() where it crashed.

Debug logs

Logs ``` ```
russmenum commented 1 month ago

You can close this one, USER ERROR/RTFM. I missed the changes in FETCH ver and extra bits in the build.gradle as a result. Fixing that per doc resolved the so it no longer crashes

For what ever reason prominate display takes FAR LONGER now, but it works, so that can be addressed with an ALERT