question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background location makes app keeps stopping

See original GitHub issue

🐛 Bug Report

Summary of Issue

As the title says, when I turn on location in mobile settings and open my compiled (by expo build:android) app it closes and says APP_NAME keeps stopping

Edit: posting on api works, looks like the app is stopped after sending to api? Edit: in dev mode (in Expo) it works fine

Environment - output of expo diagnostics & the platform(s) you’re targeting

Expo CLI 3.28.2 environment info: System: OS: Windows 10 10.0.19041 Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 npmPackages: expo: ~38.0.8 => 38.0.9 react: ~16.11.0 => 16.11.0 react-dom: ~16.11.0 => 16.11.0 react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2 react-native-web: ~0.11.7 => 0.11.7 Expo Workflow: managed

Reproducible Demo

Code - https://hatebin.com/efnfizwzbf

Expected Behavior vs Actual Behavior

Open app as normal vs keeps stopping

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Javierkocommented, Nov 9, 2020

Hey again,

I was searching about that Background Fetch you mentioned, but I don’t understand how it makes it different. I found on GitHub this example of using it https://gist.github.com/andreghisleni/a82b68c9621825e7cf5ab47f5c925661 but I don’t get where I have to get location data.

As I see, there is defined task without params, but here comes question, where I need to set params. To set it in LOCATION_FETCH_TASK task or get somehow get it inside BACKGROUND_FETCH_TASK task and here also send it?

0reactions
stale[bot]commented, Mar 19, 2021

This issue has been automatically closed since there has not been any recent activity after it was marked as stale. Please open a new issue for any related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do my apps keep crashing on Android, How to fix it
To clear app cache, go to Settings -> Storage and tap on 'Cached data'. Tap on okay when the dialog box pops up....
Read more >
App Keeps Stopping on Android? 11 Fixes to Try
1. Force Stop the App · 2. Clear the App's Cache and Storage Data · 3. Update Android System Webview · 4. Update...
Read more >
iOS App Crashing in Background – Home of C25K
– Please make sure Background App Refresh is enabled for the app. You can find it under device Settings -> General -> Background...
Read more >
How to Stop Apps From Crashing on Android - AVG
If your Android apps keep crashing or freezing it's usually because you're low on space or running too many apps at once. Other...
Read more >
Why Do My Apps Keep Crashing on Android? - Avast
10. Perform a factory reset · Open Settings and select General management. Factory reset settings on a Samsun device are located in General ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found