Open Alex009 opened 3 years ago
if we run app first time and give permission to geolocation not so fast - we got error caused kotlin.IllegalStateException: can't get location
kotlin.IllegalStateException: can't get location
Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[UIDispatcher@39f9188, Continuation @ $provideLocationPermissionCOROUTINE$482]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers at 0 MultiPlatformLibrary 0x000000010a35fa1e kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 126 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:14:63) at 1 MultiPlatformLibrary 0x000000010a4761ee kfun:kotlinx.coroutines.CoroutinesInternalError#<init>(kotlin.String;kotlin.Throwable){} + 126 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Exceptions.common.kt:28:77) at 2 MultiPlatformLibrary 0x000000010a4e0df4 kfun:kotlinx.coroutines.DispatchedTask#handleFatalException(kotlin.Throwable?;kotlin.Throwable?){} + 900 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:93:22) at 3 MultiPlatformLibrary 0x000000010a4e0a0a kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3530 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:64:13) at 4 MultiPlatformLibrary 0x000000010a5702ba kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.dispatch$lambda-0#internal + 90 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:17:19) at 5 MultiPlatformLibrary 0x000000010a570850 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$897.invoke#internal + 64 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32) at 6 MultiPlatformLibrary 0x000000010a5708b0 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$897.$<bridge-UNN>invoke(){}#internal + 64 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32) at 7 MultiPlatformLibrary 0x000000010a570cf9 _6465762e696365726f636b2e6d6f6b6f3a6d76766d_knbridge413 + 185 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32) at 8 libdispatch.dylib 0x000000010de2b7ec _dispatch_call_block_and_release + 12 at 9 libdispatch.dylib 0x000000010de2c9c8 _dispatch_client_callout + 8 at 10 libdispatch.dylib 0x000000010de3ae75 _dispatch_main_queue_callback_4CF + 1152 at 11 CoreFoundation 0x00007fff2038bdab __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 at 12 CoreFoundation 0x00007fff2038662e __CFRunLoopRun + 2685 at 13 CoreFoundation 0x00007fff203856c6 CFRunLoopRunSpecific + 567 at 14 GraphicsServices 0x00007fff2b76adb3 GSEventRunModal + 139 at 15 UIKitCore 0x00007fff24675187 -[UIApplication _run] + 912 at 16 UIKitCore 0x00007fff2467a038 UIApplicationMain + 101 at 17 EASY2RIDE (D) 0x0000000107cd37c8 main + 56 (/Users/alekseymikhailovwork/Documents/development/icerockdev_workspace/bmw/bmw-moto-mobile/ios-app/src/AppDelegate.swift:<unknown>) at 18 libdyld.dylib 0x00007fff20256409 start + 1 Caused by: kotlin.IllegalStateException: can't get location at 0 MultiPlatformLibrary 0x000000010a36639f kfun:kotlin.Throwable#<init>(kotlin.String?){} + 95 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Throwable.kt:23:37) at 1 MultiPlatformLibrary 0x000000010a35ecad kfun:kotlin.Exception#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44) at 2 MultiPlatformLibrary 0x000000010a35ef1d kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44) at 3 MultiPlatformLibrary 0x000000010a35f49d kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:70:44) at 4 MultiPlatformLibrary 0x000000010aa310ed kfun:dev.icerock.moko.maps.mapbox.MapboxController.getCurrentLocation#internal + 957 (/Users/runner/work/moko-maps/moko-maps/maps-mapbox/src/iosX64Main/kotlin/dev/icerock/moko/maps/mapbox/MapboxController.kt:69:22) at 5 MultiPlatformLibrary 0x000000010aa35a8a kfun:dev.icerock.moko.maps.mapbox.MapboxController#showMyLocation(kotlin.Float){} + 186 (/Users/runner/work/moko-maps/moko-maps/maps-mapbox/src/iosX64Main/kotlin/dev/icerock/moko/maps/mapbox/MapboxController.kt:146:24) at 6 MultiPlatformLibrary 0x000000010aac5e98 kfun:com.bmw.moto.feature.mainScreen.presentation.MainTestRideScreenViewModel.$subscribeToLocationTracker$lambda-3COROUTINE$148.invokeSuspend#internal + 2008 (/Users/alekseymikhailovwork/Documents/development/icerockdev_workspace/bmw/bmw-moto-mobile/mpp-library/feature/mainScreen/src/commonMain/kotlin/com/bmw/moto/feature/mainScreen/presentation/MainTestRideScreenViewModel.kt:58:38) at 7 MultiPlatformLibrary 0x000000010a389608 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 760 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:30:39) at 8 MultiPlatformLibrary 0x000000010a4e072b kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2795 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:39:50) at 9 MultiPlatformLibrary 0x000000010a5702ba kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.dispatch$lambda-0#internal + 90 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:17:19) ... and 14 more common stack frames skipped
if we run app first time and give permission to geolocation not so fast - we got error caused
kotlin.IllegalStateException: can't get location