react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

App freezes on the splash screen when using always allow location for a while

Open fadi-saadeldin opened this issue 3 years ago • 5 comments

Your Environment

  • Plugin version: 4.7.1
  • Platform: iOS
  • OS version: 15.5
  • Device manufacturer / model: iPhone 11
  • React Native version (react-native -v): 0.63.4
  • Plugin config
      // Geolocation Config
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      distanceFilter: 65,
      // locationUpdateInterval: 50000,
      stopOnStationary: false,
      locationAuthorizationRequest: 'Always',
      // Activity Recognition
      stopTimeout: 1,
      // Application config
      url: `${API_END_POINT}me/geolocation-data-collection-alternative`,
      batchSync: false,       // <-- [Default: false] Set true to sync locations to server in a single HTTP request.
      autoSync: true,         // <-- [Default: true] Set true to sync each location to server as it arrives.
      headers: {
        "Accept": 'application/json',             // <-- Optional HTTP headers
        "Authorization": `Bearer ${await AsyncStorage.getItem(ACCESS_TOKEN)}`
      },
      enableHeadless: true,
      debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
      stopOnTerminate: false,   // <-- Allow the background-service to continue tracking when user closes the app.
      startOnBoot: true,        // <-- Auto start tracking when device is powered-up.

Expected Behavior

after keeping the app working for a while, it should open the app normally

Actual Behavior

after keeping the app working for a while, the app freezes on the splash screen, and I need to kill the app and reopen it again to work

Steps to Reproduce

Context

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

fadi-saadeldin avatar Jun 28 '22 09:06 fadi-saadeldin

Are you watching the logs? See wiki Debugging.

christocracy avatar Jun 28 '22 09:06 christocracy

the issue only happens in production, we are using sentry, do you recommend any other tool to detect this issue?

fadi-saadeldin avatar Jun 28 '22 09:06 fadi-saadeldin

Build your app for release in XCode and watch the logs with the plugin configured for verbose logging, as shown in wiki Debugging.

Your problem is not likely directly related to the plugin.

christocracy avatar Jun 28 '22 09:06 christocracy

You may also use the method .emailLog(emailAddress)

christocracy avatar Jun 28 '22 09:06 christocracy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] avatar Sep 21 '22 03:09 stale[bot]