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

[iOS] Exception when toggling "Precise Location" from device settings #71

Open
natalieeeflores opened this issue Jun 20, 2024 · 1 comment

Comments

@natalieeeflores
Copy link

Hello! I'm seeing a crash in the demo app, when I toggle off the "Precise Location" settings.

Steps to reproduce:

  1. Run app
  2. Tap "Platform" Button under Geolocation
  3. Tap "Get Current Location" Button
  4. Select "Allow While Using The App"
  5. Minimize App
  6. Go to Settings > Apps > demo > Location
  7. Toggle "Precise Location" off

Actual Result: App crashes
Expected Result: App does not crash

Screen recording:
Simulator Screen Recording - iPhone 15 Pro - 2024-06-20 at 15 05 02

Error Message:

Uncaught Kotlin exception: kotlin.IllegalStateException: Already resumed
    at 0   demo.debug.dylib                    0x108d6614f        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 
    at 1   demo.debug.dylib                    0x108d5f7c7        kfun:kotlin.Exception#<init>(kotlin.String?){} + 115 
    at 2   demo.debug.dylib                    0x108d5f9e7        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115 
    at 3   demo.debug.dylib                    0x108d5ff87        kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 115 
    at 4   demo.debug.dylib                    0x108d6d57f        kfun:kotlin.coroutines.SafeContinuation#resumeWith(kotlin.Result<1:0>){} + 739 
    at 5   demo.debug.dylib                    0x108e95e37        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 
    at 6   demo.debug.dylib                    0x10825d777        kfun:dev.jordond.compass.permissions.IosLocationPermissionController.requirePermissionFor$lambda$1#internal + 351 
    at 7   demo.debug.dylib                    0x10825d98b        kfun:dev.jordond.compass.permissions.IosLocationPermissionController.$requirePermissionFor$lambda$1$FUNCTION_REFERENCE$1.invoke#internal + 87 
    at 8   demo.debug.dylib                    0x10825da8f        kfun:dev.jordond.compass.permissions.IosLocationPermissionController.$requirePermissionFor$lambda$1$FUNCTION_REFERENCE$1.$<bridge-UNNB>invoke(kotlin.Int){}#internal + 123 
    at 9   demo.debug.dylib                    0x108e9126b        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 107 
    at 10  demo.debug.dylib                    0x10825e943        kfun:dev.jordond.compass.permissions.mobile.internal.LocationPermissionManagerDelegate#objc:locationManagerDidChangeAuthorization: + 363 
    at 11  demo.debug.dylib                    0x10825ec13        _636f6d706173733a636f6d706173732d7065726d697373696f6e732d6d6f62696c652f55736572732f6e6174616c69652f446f63756d656e74732f4769744875622f636f6d706173732f636f6d706173732d7065726d697373696f6e732d6d6f62696c652f7372632f696f734d61696e2f6b6f746c696e2f6465762f6a6f72646f6e642f636f6d706173732f7065726d697373696f6e732f6d6f62696c652f696e7465726e616c2f4c6f636174696f6e5065726d697373696f6e4d616e6167657244656c65676174652e6b74_knbridge14 + 183 
    at 12  CoreLocation                        0x1844b3633        CLClientStopVehicleHeadingUpdates + 103707 
    at 13  CoreLocation                        0x1844b2e47        CLClientStopVehicleHeadingUpdates + 101679 
    at 14  CoreLocation                        0x1844927ff        CLClientCreateWithBundleIdentifierAndPathWithWebsiteOnSilo + 6135 
    at 15  LocationSupport                     0x18baa341b        _ZN18CLConnectionServer13handleMessageEP12CLConnectionNSt3__110shared_ptrI19CLConnectionMessageEE + 18399 
    at 16  CoreFoundation                      0x1804108e3        __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 19 
    at 17  CoreFoundation                      0x180410027        __CFRunLoopDoBlocks + 351 
    at 18  CoreFoundation                      0x18040aeef        __CFRunLoopRun + 2379 
    at 19  CoreFoundation                      0x18040a173        CFRunLoopRunSpecific + 571 
    at 20  GraphicsServices                    0x19050cb0f        GSEventRunModal + 159 
    at 21  UIKitCore                           0x185a0287b        -[UIApplication _run] + 867 
    at 22  UIKitCore                           0x185a06467        UIApplicationMain + 123 
    at 23  SwiftUI                             0x1c31edff3        $s7SwiftUI17KitRendererCommon33_ACC2C5639A7D76F611E170E831FCA491LLys5NeverOyXlXpFAESpySpys4Int8VGSgGXEfU_ + 163 
    at 24  SwiftUI                             0x1c31ede9b        $s7SwiftUI6runAppys5NeverOxAA0D0RzlF + 83 
    at 25  SwiftUI                             0x1c2f63f5b        $s7SwiftUI3AppPAAE4mainyyFZ + 147 
    at 26  demo.debug.dylib                    0x10821d86f        $s4demo6iOSAppV5$mainyyFZ + 39 
    at 27  demo.debug.dylib                    0x10821d91f        __debug_main_executable_dylib_entry_point + 11 (/Users/natalie/Documents/GitHub/compass/demo/iosApp/iosApp/iOSApp.swift:4:8)
    at 28  dyld                                0x102fc140f        0x0 + 4345041935 
    at 29  ???                                 0x10293a0df        0x0 + 4338196703 
    at 30  ???                                 0x35f7fffffffffff  0x0 + 243053642389651455 
@fethij
Copy link

fethij commented Feb 11, 2025

Experiencing the same issue. Not only toggling "Precise Location" is the trigger, but even changing permissions(allowing/disallowing) causes this exception.

@jordond anything that we can do to prevent it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants