react-native-background-geolocation: ConcurrentModificationException java.util.ArrayList$Itr in next
Your Environment
- Plugin version: 4.10.0
- Platform: Android
- OS version: macOS 13.2.1
- Device manufacturer / model: Mac mini (Chip Apple M1)
- React Native version (
react-native -v): 0.71.2 - Plugin config
const config = {
notification: {
title: 'Company',
text: 'Executando',
},
disableMotionActivityUpdates: true,
desiredAccuracy: Platform.select({
ios: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
android: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
}),
debug: __DEV__ ? true : false,
logLevel: __DEV__
? BackgroundGeolocation.LOG_LEVEL_VERBOSE
: BackgroundGeolocation.LOG_LEVEL_OFF,
stopOnTerminate: false,
startOnBoot: false,
url,
batchSync: true,
autoSync: true,
autoSyncThreshold: 5,
maxBatchSize: 100,
distanceFilter: Platform.select({ios: 10, android: 20}),
stopTimeout: 5,
locationTemplate:
'{"latitude":<%= latitude %>,"longitude":<%= longitude %>,"velocidade":<%= speed %>,"time":"<%= timestamp %>","id":"<%= uuid %>","nivel_bateria": <%= battery.level %>}',
headers: {
accept: 'application/json',
'content-type': 'application/json',
authorization: httpClient.defaults.headers.common.Authorization,
},
params: {
timezone: 'America/Recife',
},
extras: {
modelo_dispositivo,
fabricante,
},
//iOS Options
showsBackgroundLocationIndicator: true,
stationaryRadius: 10,
heartbeatInterval: Platform.select({ios: 10, android: 60}),
preventSuspend: Platform.select({ios: true, android: false}),
activityType:
BackgroundGeolocation.ACTIVITY_TYPE_AUTOMOTIVE_NAVIGATION,
};
Expected Behavior
None bug reported on Sentry
Actual Behavior
Native Exception (Android): ConcurrentModificationException java.util.ArrayList$Itr in next
Stack Trace: java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.next(ArrayList.java:860) at com.transistorsoft.locationmanager.util.c$j.onPermissionGranted at com.intentfilter.androidpermissions.PermissionHandler.checkPermissions(PermissionHandler.java:44) at com.intentfilter.androidpermissions.PermissionManager.checkPermissions(PermissionManager.java:55) at com.transistorsoft.locationmanager.util.c$j.run at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:7912) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
Context
Apparently the crash happens after our users have accepted background geolocation permissions. On Sentry, the most reports are from Android 10 and 11 in Xiaomi devices mainly (Redmi Note 8, Redmi Note 9, Redmi Prime 9S, Redmi Note 9S, Redmi Note 11, etc)
Complete Issue link: https://hubsoftbrasil.sentry.io/share/issue/ae5d1d147c7241eea763fd7b9643fa0a/
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (7 by maintainers)
Ignore last message. Wrong issue.