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

App crashes on ios when requesting remote_notification permission #134

Open
vijimani17 opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@vijimani17
Copy link

We are asking multiple permission in our code from compose as below

LaunchedEffect(Unit) {
try {
if (!controller.isPermissionGranted(Permission.REMOTE_NOTIFICATION))
controller.providePermission(Permission.REMOTE_NOTIFICATION)

        if (!controller.isPermissionGranted(Permission.LOCATION)) controller.providePermission(Permission.LOCATION)
      
        if (!controller.isPermissionGranted(Permission.RECORD_AUDIO)) controller.providePermission(Permission.RECORD_AUDIO)
      
    } catch (deniedAlways: DeniedAlwaysException) {
        
    } catch (denied: DeniedException) {
       
    } catch (canceled: RequestCanceledException) {
       
    }

We are facing below crash

Uncaught Kotlin exception: kotlin.IllegalStateException: notifications permission failed
at 0 Trimble Chat.debug.dylib 0x10ae1939f kfun:kotlin.Throwable#(kotlin.String?){} + 119
at 1 Trimble Chat.debug.dylib 0x10ae12a3b kfun:kotlin.Exception#(kotlin.String?){} + 115
at 2 Trimble Chat.debug.dylib 0x10ae12c5b kfun:kotlin.RuntimeException#(kotlin.String?){} + 115
at 3 Trimble Chat.debug.dylib 0x10ae131fb kfun:kotlin.IllegalStateException#(kotlin.String?){} + 115
at 4 Trimble Chat.debug.dylib 0x10b8e4b53 kfun:dev.icerock.moko.permissions.ios.RemoteNotificationPermissionDelegate.$providePermissionCOROUTINE$0.invokeSuspend#internal + 2707
at 5 Trimble Chat.debug.dylib 0x10af504a7 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 67
at 6 Trimble Chat.debug.dylib 0x10ae1ec67 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 623
at 7 Trimble Chat.debug.dylib 0x10af50587 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 8 Trimble Chat.debug.dylib 0x10b07656f kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1879
at 9 Trimble Chat.debug.dylib 0x10b0a49e3 kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 91
at 10 Trimble Chat.debug.dylib 0x10b4c9033 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.dispatch$lambda$1$lambda$0#internal + 475
at 11 Trimble Chat.debug.dylib 0x10b4ca59b kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$lambda$0$FUNCTION_REFERENCE$4.invoke#internal + 75
at 12 Trimble Chat.debug.dylib 0x10b4ca697 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$lambda$0$FUNCTION_REFERENCE$4.$invoke(){}#internal + 71
at 13 Trimble Chat.debug.dylib 0x10af4cb5f kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99
at 14 Trimble Chat.debug.dylib 0x10b4c893b kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun#internal + 319
at 15 Trimble Chat.debug.dylib 0x10b4c91bb kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.dispatch$lambda$1#internal + 239
at 16 Trimble Chat.debug.dylib 0x10b4ca047 kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$dispatch$lambda$1$FUNCTION_REFERENCE$0.invoke#internal + 139
at 17 Trimble Chat.debug.dylib 0x10af50b8b kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 18 Trimble Chat.debug.dylib 0x10ae224fb kfun:kotlin.coroutines.intrinsics.object-4.invokeSuspend#internal + 731
at 19 Trimble Chat.debug.dylib 0x10af504a7 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 67
at 20 Trimble Chat.debug.dylib 0x10ae1ec67 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 623
at 21 Trimble Chat.debug.dylib 0x10af50587 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 22 Trimble Chat.debug.dylib 0x10b07656f kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1879
at 23 Trimble Chat.debug.dylib 0x10b0a49e3 kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 91
at 24 Trimble Chat.debug.dylib 0x10b0a020f kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda$0#internal + 67
at 25 Trimble Chat.debug.dylib 0x10b0a048b kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1.invoke#internal + 71
at 26 Trimble Chat.debug.dylib 0x10b0a055b kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1.$invoke(){}#internal + 71
at 27 Trimble Chat.debug.dylib 0x10af4cb5f kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99
at 28 Trimble Chat.debug.dylib 0x10b0a149f _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f72652f6f70742f6275696c644167656e742f776f726b2f343465633665383530643563363366302f6b6f746c696e782d636f726f7574696e65732d636f72652f6e617469766544617277696e2f7372632f44697370617463686572732e6b74_knbridge13 + 191
at 29 libdispatch.dylib 0x103260f4f _dispatch_call_block_and_release + 31
at 30 libdispatch.dylib 0x103262b33 _dispatch_client_callout + 19
at 31 libdispatch.dylib 0x103272feb _dispatch_main_queue_drain + 1083
at 32 libdispatch.dylib 0x103272b9f _dispatch_main_queue_callback_4CF + 43
at 33 CoreFoundation 0x19da08f9b + 15
at 34 CoreFoundation 0x19da05ca7 + 1995
at 35 CoreFoundation 0x19da053f7 CFRunLoopRunSpecific + 607
at 36 GraphicsServices 0x1e0fbb4f7 GSEventRunModal + 163
at 37 UIKitCore 0x19fe2b89f + 887
at 38 UIKitCore 0x19fe2aedb UIApplicationMain + 339
at 39 SwiftUI 0x1a283c897 + 603
at 40 SwiftUI 0x1a283c6db + 159
at 41 SwiftUI 0x1a24ad25b + 2195
at 42 Trimble Chat.debug.dylib 0x109e660ff $s12Trimble_Chat6iOSAppV5$mainyyFZ + 39
at 43 Trimble Chat.debug.dylib 0x109e665cb __debug_main_executable_dylib_entry_point + 11
at 44 dyld 0x1c076edcb + 2239
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@73f0480, StandaloneCoroutine{Cancelling}@767a5c0, FlushCoroutineDispatcher@78f0160]
at 0 Trimble Chat.debug.dylib 0x10ae1939f kfun:kotlin.Throwable#(kotlin.String?){} + 119
at 1 Trimble Chat.debug.dylib 0x10ae12a3b kfun:kotlin.Exception#(kotlin.String?){} + 115
at 2 Trimble Chat.debug.dylib 0x10ae12c5b kfun:kotlin.RuntimeException#(kotlin.String?){} + 115
at 3 Trimble Chat.debug.dylib 0x10b09dcd7 kfun:kotlinx.coroutines.internal.DiagnosticCoroutineContextException#(kotlin.coroutines.CoroutineContext){} + 167
at 4 Trimble Chat.debug.dylib 0x10b07281b kfun:kotlinx.coroutines.internal#handleUncaughtCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 647
at 5 Trimble Chat.debug.dylib 0x10b0042ab kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 515
at 6 Trimble Chat.debug.dylib 0x10aff7ebf kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal + 167
at 7 Trimble Chat.debug.dylib 0x10b0a6177 kfun:kotlinx.coroutines.JobSupport#handleJobException(kotlin.Throwable){}kotlin.Boolean-trampoline + 59
at 8 Trimble Chat.debug.dylib 0x10b00e88b kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 1135
at 9 Trimble Chat.debug.dylib 0x10b016cf3 kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 2035
at 10 Trimble Chat.debug.dylib 0x10b0164c7 kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 755
at 11 Trimble Chat.debug.dylib 0x10b015ff7 kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? + 379
at 12 Trimble Chat.debug.dylib 0x10aff5e4f kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 211
at 13 Trimble Chat.debug.dylib 0x10af50587 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99
at 14 Trimble Chat.debug.dylib 0x10ae1ee83 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163
at 15 Trimble Chat.debug.dylib 0x10af50587 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline

We dint see issues on android , but we face only in ios. Is it reported already or the team is working to fix it. Appreciate any useful input. thanks

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

1 participant