Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: App crashes with Context.startForegroundService() did not then call Service.startForeground() #1430

Open
2 of 3 tasks
giladger opened this issue Feb 23, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@giladger
Copy link

Required Reading

  • Confirmed

Plugin Version

4.16.9

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.0.1 24A348 darwin-arm64, locale en-IL)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.96.0)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

All

Device operating-systems(s)

Android 14, Android 15

What happened?

The issue was first encountered by users and can be reproduced by repeatedly calling BackgroundGeolocation.startGeofences() and BackgroundGeolocation.stop()

The issue happens on 4.16.3 and doesn't happen on 4.16.2

There are 2 exceptions (both started on 4.16.3), one is non-fatal, and the other crashes the app.

The non-fatal exception is:
E/TSLocationManager(13984): ‼️ Starting FGS with type location callerApp=ProcessRecord{5d4097b 13984:com.XXX.app/u0a432} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permissionjava.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{5d4097b 13984:com.XXX.app/u0a432} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permission

The fatal exception is:
E/TSLocationManager(13984): android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dadca17 u0 com.XXX.app/com.transistorsoft.locationmanager.service.LocationRequestService c:com.XXX.app} E/TSLocationManager(13984): at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2298) E/TSLocationManager(13984): at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2266) E/TSLocationManager(13984): at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) E/TSLocationManager(13984): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2640) E/TSLocationManager(13984): at android.os.Handler.dispatchMessage(Handler.java:109) E/TSLocationManager(13984): at android.os.Looper.loopOnce(Looper.java:232) E/TSLocationManager(13984): at android.os.Looper.loop(Looper.java:317) E/TSLocationManager(13984): at android.app.ActivityThread.main(ActivityThread.java:8787) E/TSLocationManager(13984): at java.lang.reflect.Method.invoke(Native Method) E/TSLocationManager(13984): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) E/TSLocationManager(13984): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)

Plugin Code and/or Config

bg.Config(
        reset: true,
        debug: false,
        logLevel: bg.Config.LOG_LEVEL_VERBOSE,
        desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
        locationAuthorizationRequest: 'Always',
        backgroundPermissionRationale: bg.PermissionRationale(
        title: AppLocalizations.loc['geofence_permission_rationale_title'],
        message: AppLocalizations.loc['geofence_permission_rationale_message'],
        positiveAction: AppLocalizations.loc['geofence_permission_rationale_positive_action'],
        negativeAction: AppLocalizations.loc['geofence_permission_rationale_negative_action']
      ),
        geofenceModeHighAccuracy: true,
        disableElasticity: true,
        disableMotionActivityUpdates: true,
        showsBackgroundLocationIndicator: false,
        stopOnTerminate: false,
        startOnBoot: true,
        enableHeadless: true,
    )

Relevant log output

E/TSLocationManager(13984): [c.t.l.service.AbstractService c]
E/TSLocationManager(13984):   ‼️  Starting FGS with type location callerApp=ProcessRecord{5d4097b 13984:com.XXX.app/u0a432} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION]  and the app must be in the eligible state/exemptions to access the foreground only permissionjava.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{5d4097b 13984:com.XXX.app/u0a432} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION]  and the app must be in the eligible state/exemptions to access the foreground only permission
E/TSLocationManager(13984): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3231)
E/TSLocationManager(13984): 	at android.os.Parcel.createException(Parcel.java:3215)
E/TSLocationManager(13984): 	at android.os.Parcel.readException(Parcel.java:3198)
E/TSLocationManager(13984): 	at android.os.Parcel.readException(Parcel.java:3140)
E/TSLocationManager(13984): 	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7193)
E/TSLocationManager(13984): 	at android.app.Service.startForeground(Service.java:863)
E/TSLocationManager(13984): 	at com.transistorsoft.locationmanager.service.AbstractService.c(SourceFile:1)
E/TSLocationManager(13984): 	at com.transistorsoft.locationmanager.service.AbstractService.a(SourceFile:2)
E/TSLocationManager(13984): 	at com.transistorsoft.locationmanager.service.LocationRequestService.onCreate(Unknown Source:26)
E/TSLocationManager(13984): 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:5058)
E/TSLocationManager(13984): 	at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
E/TSLocationManager(13984): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2496)
E/TSLocationManager(13984): 	at android.os.Handler.dispatchMessage(Handler.java:109)
E/TSLocationManager(13984): 	at android.os.Looper.loopOnce(Looper.java:232)
E/TSLocationManager(13984): 	at android.os.Looper.loop(Looper.java:317)
E/TSLocationManager(13984): 	at android.app.ActivityThread.main(ActivityThread.java:8787)
E/TSLocationManager(13984): 	at java.lang.reflect.Method.invoke(Native Method)
E/TSLocationManager(13984): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
E/TSLocationManager(13984): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:29 [LocationRequestService  startId: 1, eventCount: 1]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 29 (104ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.031
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 1, sticky: false]
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 56b7abd8-19db-473b-92ed-5bde298a5d39
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:31 [LocationRequestService  startId: 2, eventCount: 1]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 31 (115ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.031
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false]
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: f05737a0-45a4-49cc-b2b8-6033b9dba822
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:22 [LocationRequestService  startId: 3, eventCount: 1]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 22 (124ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.031
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:16 [LocationRequestService  startId: 4, eventCount: 2]
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 2, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 16 (128ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:33 [LocationRequestService  startId: 5, eventCount: 2]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.031
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 1, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 33 (134ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.031
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 8dd9d22f-40c3-4e30-8787-2c5e7d366089
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 5, eventCount: 0, sticky: false]
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 7b3132d9-31fd-4816-9fce-dbb585993e08
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:21 [LocationRequestService  startId: 6, eventCount: 1]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 21 (186ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 6, eventCount: 0, sticky: false]
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:23 [LocationRequestService  startId: 7, eventCount: 1]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 23 (217ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:24 [LocationRequestService  startId: 8, eventCount: 2]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 24 (222ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 7, eventCount: 1, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:19 [LocationRequestService  startId: 9, eventCount: 2]
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 8, eventCount: 1, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 19 (226ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:14 [LocationRequestService  startId: 10, eventCount: 2]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:17 [LocationRequestService  startId: 11, eventCount: 3]
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:26 [LocationRequestService  startId: 12, eventCount: 4]
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 9, eventCount: 4, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 14 (230ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   🎾  2:12 [LocationRequestService  startId: 13, eventCount: 4]
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 0f57cb35-daa1-442a-ad14-b8cd00022b5f
D/TSLocationManager(13984): [c.t.l.service.AbstractService onDestroy]
D/TSLocationManager(13984):   🔴  LocationRequestService stopped
D/AndroidRuntime(13984): Shutting down VM
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
E/AndroidRuntime(13984): FATAL EXCEPTION: main
E/AndroidRuntime(13984): Process: com.XXX.app, PID: 13984
E/AndroidRuntime(13984): android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dadca17 u0 com.XXX.app/com.transistorsoft.locationmanager.service.LocationRequestService c:com.XXX.app}
E/AndroidRuntime(13984): 	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2298)
E/AndroidRuntime(13984): 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2266)
E/AndroidRuntime(13984): 	at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
E/AndroidRuntime(13984): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2640)
E/AndroidRuntime(13984): 	at android.os.Handler.dispatchMessage(Handler.java:109)
E/AndroidRuntime(13984): 	at android.os.Looper.loopOnce(Looper.java:232)
E/AndroidRuntime(13984): 	at android.os.Looper.loop(Looper.java:317)
E/AndroidRuntime(13984): 	at android.app.ActivityThread.main(ActivityThread.java:8787)
E/AndroidRuntime(13984): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13984): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
E/AndroidRuntime(13984): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 10, eventCount: 3, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 17 (234ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: d30432ae-02b6-4a47-ab99-575c4ff6a846
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 11, eventCount: 2, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 26 (238ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 9774fbdd-a71c-46e0-bb97-f1daefd38b81
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
E/TSLocationManager(13984): [c.t.l.a.BackgroundGeolocation$w0 uncaughtException]
E/TSLocationManager(13984):   ‼️  Uncaught Exception: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dadca17 u0 com.XXX.app/com.transistorsoft.locationmanager.service.LocationRequestService c:com.XXX.app}
E/TSLocationManager(13984): {"activityRecognitionInterval":10000,"allowIdenticalLocations":false,"authorization":{},"autoSync":true,"autoSyncThreshold":0,"backgroundPermissionRationale":{"title":"To enable this feature, XXX requires the {backgroundPermissionOptionLabel} location permission","message":"In order to enable Geofencing & other location based features, please enable {backgroundPermissionOptionLabel} location permission","positiveAction":"Change to {backgroundPermissionOptionLabel}","negativeAction":"Cancel"},"batchSync":false,"configUrl":"","crashDetector":{"enabled":false,"accelerometerThresholdHigh":20,"accelerometerThresholdLow":4.5,"gyroscopeThresholdHigh":20,"gyroscopeThresholdLow":4.5},"debug":false,"deferTime":0,"desiredAccuracy":-1,"desiredOdometerAccuracy":100,"disableAutoSyncOnCellular":false,"disableElasticity":true,"disableLocationAuthorizationAlert":false,"disableMotionActivityUpdates":true,"disableProviderChangeRecord":false,"disableStopDetection":false,"distanceFilter":10,"elasticityMultiplier":1,"enableHeadless":true,"enableTimestampMeta":false,"extras":{},"fastestLocationUpdateInterval":-1,"foregroundService":true,"geofenceInitialTriggerEntry":true,"geofenceModeHighAccuracy":true,"geofenceProximityRadius":1000,"geofenceTemplate":"","headers":{},"headlessJobService":"com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask","heartbeatInterval":-1,"httpRootProperty":"location","httpTimeout":60000,"isMoving":false,"locationAuthorizationRequest":"Always","locationTemplate":"","locationTimeout":60,"locationUpdateInterval":1000,"locationsOrderDirection":"ASC","logLevel":5,"logMaxDays":3,"maxBatchSize":-1,"maxDaysToPersist":1,"maxMonitoredGeofences":97,"maxRecordsToPersist":-1,"method":"POST","minimumActivityRecognitionConfidence":75,"motionTriggerDelay":0,"notification":{"layout":"","title":"","text":"Location Service activated","color":"","channelName":"TSLocationManager","channelId":"","smallIcon":"","largeIcon":"","priority":-1,"sticky":false,"strings":{},"actions":[]},"params":{},"persist":true,"persistMode":2,"schedule":[],"scheduleUseAlarmManager":false,"speedJumpFilter":300,"startOnBoot":true,"stationaryRadius":25,"stopAfterElapsedMinutes":0,"stopOnStationary":false,"stopOnTerminate":false,"stopTimeout":5,"triggerActivities":"in_vehicle, on_bicycle, on_foot, running, walking","url":"","useSignificantChangesOnly":false,"enabled":false,"schedulerEnabled":false,"trackingMode":0,"odometer":0,"isFirstBoot":false,"didLaunchInBackground":false,"didDeviceReboot":true}
E/TSLocationManager(13984): android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dadca17 u0 com.XXX.app/com.transistorsoft.locationmanager.service.LocationRequestService c:com.XXX.app}
E/TSLocationManager(13984): 	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2298)
E/TSLocationManager(13984): 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2266)
E/TSLocationManager(13984): 	at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
E/TSLocationManager(13984): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2640)
E/TSLocationManager(13984): 	at android.os.Handler.dispatchMessage(Handler.java:109)
E/TSLocationManager(13984): 	at android.os.Looper.loopOnce(Looper.java:232)
E/TSLocationManager(13984): 	at android.os.Looper.loop(Looper.java:317)
E/TSLocationManager(13984): 	at android.app.ActivityThread.main(ActivityThread.java:8787)
E/TSLocationManager(13984): 	at java.lang.reflect.Method.invoke(Native Method)
E/TSLocationManager(13984): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
E/TSLocationManager(13984): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 12, eventCount: 1, sticky: false]
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager a]
I/TSLocationManager(13984): ╔═════════════════════════════════════════════
I/TSLocationManager(13984): ║ getCurrentPosition LocationResult: 12 (244ms old)
I/TSLocationManager(13984): ╠═════════════════════════════════════════════
I/TSLocationManager(13984): ╟─ 📍  Location[fused 1.1, 2.2 hAcc=12.189 et=+9d4h56m4s613ms alt=35.5 vAcc=1.2100235 vel=0.24990144 sAcc=1.5 bear=132.78912 bAcc=45.0], time: 1740303378592
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: 5ad9d9ad-6662-471d-9d05-20e16e1708d1
I/TSLocationManager(13984): [c.t.l.l.TSLocationManager onSingleLocationResult]
I/TSLocationManager(13984):   🔵  Acquired current position
D/TSLocationManager(13984): [c.t.l.l.TSLocationManager a] Median accuracy: 12.189
I/TSLocationManager(13984): [c.t.l.d.s.SQLiteLocationDAO persist]
I/TSLocationManager(13984):   ✅  INSERT: ee4d372b-5443-4b37-976a-17c1baabc80b
D/TSLocationManager(13984): [c.t.l.service.AbstractService a]
D/TSLocationManager(13984):   ⚙️︎   FINISH [LocationRequestService startId: 13, eventCount: 0, sticky: false]
I/Process (13984): Sending signal. PID: 13984 SIG: 9
Lost connection to device.

Exited.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants