Hi there,
Our team is having struggles with a crash which we cannot reproduce. This seems to be happening only on android 12 and higher. The crash has started occurring since we changed the targetSdkVersion of the project from 30 to 31. The crash is labeled in crashlytics as an early crash (It happens on or within the first second of the app launch) and as repetitive crashes, so users who experience this crash will get it multiple times.
We’re wondering if anyone else is having this issue and/or how we can fix this issue and/or if anyone could think of a way we could reproduce this.
The issue only occurs on Android and we’re using SDK version 46 in a bare workflow.
This is the crash:
LocationTaskConsumer.java line 241
expo.modules.location.taskConsumers.LocationTaskConsumer.maybeStartForegroundService
Caused by android.app.ForegroundServiceStartNotAllowedException
startForegroundService() not allowed due to mAllowStartForeground false: service com.myApp/expo.modules.location.services.LocationTaskService.