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

Uncaught Kotlin exception: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path #10

Open
himanshumistri opened this issue Jan 6, 2024 · 1 comment

Comments

@himanshumistri
Copy link

Below are the steps:-

Check the multiplatform branch

Add a few resources into the .

Screenshot 2024-01-06 at 12 37 13 PM

Now change UI code load the Image.

Try pod install from the iosApp

pod install

Now install app on the ios , It crash with following error.

Uncaught Kotlin exception: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: abc_menu.png
    at 0   Appyx                               0x102399b63        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 123 
    at 1   Appyx                               0x102392c77        kfun:kotlin.Exception#<init>(kotlin.String?){} + 119 
    at 2   Appyx                               0x102d74e67        kfun:org.jetbrains.compose.resources.MissingResourceException#<init>(kotlin.String){} + 195 
    at 3   Appyx                               0x102d74a47        kfun:org.jetbrains.compose.resources.UIKitResourceImpl.readBytes#internal + 2031 
    at 4   Appyx                               0x102d63253        kfun:org.jetbrains.compose.resources.readBytesSync$lambda$0#internal + 211 
    at 5   Appyx                               0x102d6335f        kfun:org.jetbrains.compose.resources.$readBytesSync$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 159 
    at 6   Appyx                               0x1023a1e63        kfun:kotlin.coroutines.intrinsics.object-5.invokeSuspend#internal + 799 
    at 7   Appyx                               0x10239eedf        kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 651 
    at 8   Appyx                               0x10255f927        kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2715 
    at 9   Appyx                               0x1024df527        kfun:kotlinx.coroutines.EventLoopImplBase#processNextEvent(){}kotlin.Long + 1431 
    at 10  Appyx                               0x102587ea7        kfun:kotlinx.coroutines.BlockingCoroutine.joinBlocking#internal + 483 
    at 11  Appyx                               0x102587663        kfun:kotlinx.coroutines#runBlocking(kotlin.coroutines.CoroutineContext;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>){0§<kotlin.Any?>}0:0 + 1615 
    at 12  Appyx                               0x10258789f        kfun:kotlinx.coroutines#runBlocking$default(kotlin.coroutines.CoroutineContext?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>;kotlin.Int){0§<kotlin.Any?>}0:0 + 271 
    at 13  Appyx                               0x102d6313b        kfun:org.jetbrains.compose.resources#readBytesSync__at__org.jetbrains.compose.resources.Resource(){}kotlin.ByteArray + 203 
    at 14  Appyx                               0x102d64fd7        kfun:org.jetbrains.compose.resources.rememberImageBitmapSync#internal + 1255 
    at 15  Appyx                               0x102d67e03        kfun:org.jetbrains.compose.resources.painterResource$lambda$2#internal + 515 
    at 16  Appyx                               0x102d69e8b        kfun:org.jetbrains.compose.resources.$painterResource$lambda$2$FUNCTION_REFERENCE$4.invoke#internal + 155 
    at 17  Appyx                               0x102d69f9f        kfun:org.jetbrains.compose.resources.$painterResource$lambda$2$FUNCTION_REFERENCE$4.$<bridge-NNNNNB>invoke(org.jetbrains.compose.resources.Resource;androidx.compose.runtime.Composer;kotlin.Int){}androidx.compose.ui.graphics.ImageBitmap#internal + 223 
    at 18  Appyx                               0x102d6480f        kfun:org.jetbrains.compose.resources.painterResource#internal + 2111 
    at 19  Appyx                               0x102d63bab        kfun:org.jetbrains.compose.resources#painterResource(kotlin.String;androidx.compose.runtime.Composer?;kotlin.Int){}androidx.compose.ui.graphics.painter.Painter + 787 
    at 20  Appyx                               0x102d7d7e3        kfun:com.bumble.appyx.shared.child.ChildNode2#View(androidx.compose.ui.Modifier;androidx.compose.runtime.Composer?;kotlin.Int){} + 7935 
    at 21  Appyx                               0x102d4fa0b        kfun:com.bumble.appyx.navigation.node.Node.Compose$lambda$3#internal + 995 
    at 22  Appyx                               0x102d5039b        kfun:com.bumble.appyx.navigation.node.Node.$Compose$lambda$3$FUNCTION_REFERENCE$4.invoke#internal + 147 
    at 23  Appyx                               0x102d50587        kfun:com.bumble.appyx.navigation.node.Node.$Compose$lambda$3$FUNCTION_REFERENCE$4.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 183 
    at 24  Appyx                               0x1026d99cf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 875 
    at 25  Appyx                               0x1026ebdbf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 187 
    at 26  Appyx                               0x1025e60a7        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 819 
    at 27  Appyx                               0x102d4c96b        kfun:com.bumble.appyx.navigation.node.Node#Compose(androidx.compose.ui.Modifier?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} + 3111 
    at 28  Appyx                               0x102d35637        kfun:com.bumble.appyx.navigation.composable.ChildRendererImpl.invoke$lambda$2#internal + 675 
    at 29  Appyx                               0x102d35dcb        kfun:com.bumble.appyx.navigation.composable.ChildRendererImpl.$invoke$lambda$2$FUNCTION_REFERENCE$4.invoke#internal + 139 
    at 30  Appyx                               0x102d35f37        kfun:com.bumble.appyx.navigation.composable.ChildRendererImpl.$invoke$lambda$2$FUNCTION_REFERENCE$4.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 183 
    at 31  Appyx                               0x1026d99cf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 875 
    at 32  Appyx                               0x1026ebdbf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 187 
    at 33  Appyx                               0x1025e60a7        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 819 
    at 34  Appyx                               0x102d34763        kfun:com.bumble.appyx.navigation.composable.ChildRendererImpl.invoke#internal.607 + 6399 
    at 35  Appyx                               0x102d2caab        kfun:com.bumble.appyx.navigation.composable.AppyxComponent$lambda$4$lambda$3#internal + 1119 
    at 36  Appyx                               0x102d2f23f        kfun:com.bumble.appyx.navigation.composable.$AppyxComponent$lambda$4$lambda$3$FUNCTION_REFERENCE$18.invoke#internal + 175 
    at 37  Appyx                               0x102d2f353        kfun:com.bumble.appyx.navigation.composable.$AppyxComponent$lambda$4$lambda$3$FUNCTION_REFERENCE$18.$<bridge-UNNNNNB>invoke(com.bumble.appyx.navigation.composable.ChildRenderer;com.bumble.appyx.interactions.core.ui.output.ElementUiModel<1:0>;androidx.compose.runtime.Composer;kotlin.Int){}#internal + 255 
    at 38  Appyx                               0x1026da67b        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 971 
    at 39  Appyx                               0x1026ec00b        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNNNB>invoke(kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(kotlin.Any?;kotlin.Any?;androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 259 
    at 40  Appyx                               0x102d365cb        kfun:com.bumble.appyx.navigation.composable.Child$lambda$0#internal + 1043 
    at 41  Appyx                               0x102d368d7        kfun:com.bumble.appyx.navigation.composable.$Child$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 151 
    at 42  Appyx                               0x102d36b03        kfun:com.bumble.appyx.navigation.composable.$Child$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 183 
    at 43  Appyx                               0x1026d99cf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 875 
    at 44  Appyx                               0x1026ebdbf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 187 
    at 45  Appyx                               0x1025e60a7        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 819 
    at 46  Appyx                               0x10282491b        kfun:androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider#internal + 3147 
    at 47  Appyx                               0x102d304af        kfun:com.bumble.appyx.navigation.composable#Child__at__com.bumble.appyx.navigation.node.ParentNode<0:0>(com.bumble.appyx.interactions.core.ui.output.ElementUiModel<0:0>;androidx.compose.runtime.saveable.SaveableStateHolder;kotlin.Function4<com.bumble.appyx.navigation.composable.ChildRenderer,com.bumble.appyx.interactions.core.ui.output.ElementUiModel<0:0>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){0§<kotlin.Any>} + 4391 
    at 48  Appyx                               0x102d29f4f        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.children$lambda$17#internal + 7775 
    at 49  Appyx                               0x102d2a983        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.$children$lambda$17$FUNCTION_REFERENCE$8.invoke#internal + 211 
    at 50  Appyx                               0x102d2ada3        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.$children$lambda$17$FUNCTION_REFERENCE$8.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 183 
    at 51  Appyx                               0x1026d99cf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 875 
    at 52  Appyx                               0x1026ebdbf        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 187 
    at 53  Appyx                               0x1025e60a7        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 819 
    at 54  Appyx                               0x102d24897        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope#children__at__com.bumble.appyx.navigation.node.ParentNode<1:0>(kotlin.Function4<com.bumble.appyx.navigation.composable.ChildRenderer,com.bumble.appyx.interactions.core.ui.output.ElementUiModel<1:0>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 8531 
    at 55  Appyx                               0x102d2a543        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.children$lambda$18#internal + 255 
    at 56  Appyx                               0x102d2ae6f        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.$children$lambda$18$FUNCTION_REFERENCE$9.invoke#internal + 151 
    at 57  Appyx                               0x102d2b077        kfun:com.bumble.appyx.navigation.composable.ChildrenTransitionScope.$children$lambda$18$FUNCTION_REFERENCE$9.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer?;kotlin.Int){}#internal + 183 
    at 58  Appyx                               0x1025f7c7f        kfun:androidx.compose.runtime.RecomposeScopeImpl#compose(androidx.compose.runtime.Composer){} + 479 
    at 59  Appyx                               0x1025ad8df        kfun:androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd#internal + 1295 
    at 60  Appyx                               0x1025afc8b        kfun:androidx.compose.runtime.ComposerImpl#skipCurrentGroup(){} + 635 
    at 61  Appyx                               0x1025b563f        kfun:androidx.compose.runtime.ComposerImpl.doCompose#internal + 2895 
    at 62  Appyx                               0x1025b4993        kfun:androidx.compose.runtime.ComposerImpl#recompose(androidx.compose.runtime.collection.IdentityArrayMap<androidx.compose.runtime.RecomposeScopeImpl,androidx.compose.runtime.collection.IdentityArraySet<kotlin.Any>?>){}kotlin.Boolean + 775 
    at 63  Appyx                               0x1025da32b        kfun:androidx.compose.runtime.CompositionImpl#recompose(){}kotlin.Boolean + 619 
    at 64  Appyx                               0x1026050cb        kfun:androidx.compose.runtime.Recomposer.performRecompose#internal + 2119 
    at 65  Appyx                               0x10260d91f        kfun:androidx.compose.runtime.Recomposer.runRecomposeAndApplyChanges$lambda$4$lambda$3#internal + 2959 
    at 66  Appyx                               0x10261459f        kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$12.invoke#internal + 131 
    at 67  Appyx                               0x10261482f        kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$12.$<bridge-UNNB>invoke(kotlin.Long){}#internal + 147 
    at 68  Appyx                               0x10259a9cf        kfun:androidx.compose.runtime.BroadcastFrameClock.FrameAwaiter.resume#internal + 515 
    at 69  Appyx                               0x10259b59b        kfun:androidx.compose.runtime.BroadcastFrameClock#sendFrame(kotlin.Long){} + 667 
    at 70  Appyx                               0x102a9866f        kfun:androidx.compose.ui.ComposeScene#render(org.jetbrains.skia.Canvas;kotlin.Long){} + 927 
    at 71  Appyx                               0x102a8eb33        kfun:androidx.compose.ui.native.ComposeLayer.ComponentImpl#onRender(org.jetbrains.skia.Canvas;kotlin.Int;kotlin.Int;kotlin.Long){} + 231 
    at 72  Appyx                               0x1027784a3        kfun:org.jetbrains.skiko.SkiaLayer#draw(org.jetbrains.skia.Surface){} + 391 
    at 73  Appyx                               0x10278f663        kfun:org.jetbrains.skiko.SkikoUIView.<init>$lambda$2#internal + 291 
    at 74  Appyx                               0x10278f80f        kfun:org.jetbrains.skiko.SkikoUIView.$<init>$lambda$2$FUNCTION_REFERENCE$1.invoke#internal + 123 
    at 75  Appyx                               0x10278f93f        kfun:org.jetbrains.skiko.SkikoUIView.$<init>$lambda$2$FUNCTION_REFERENCE$1.$<bridge-UNNN>invoke(org.jetbrains.skia.Surface){}#internal + 123 
    at 76  Appyx                               0x10279b687        kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.draw#internal + 4199 
    at 77  Appyx                               0x10279a5f7        kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.handleDisplayLinkTick#internal + 239 
    at 78  Appyx                               0x10279c24f        kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.<init>$lambda$1#internal + 91 
    at 79  Appyx                               0x10279ca4f        kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.$<init>$lambda$1$FUNCTION_REFERENCE$0.invoke#internal + 95 
    at 80  Appyx                               0x10279cb63        kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.$<init>$lambda$1$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke(){}#internal + 95 
    at 81  Appyx                               0x10279dd8f        kfun:org.jetbrains.skiko.redrawer.DisplayLinkProxy.handleDisplayLinkTick#internal + 227 
    at 82  Appyx                               0x10279de9b        kfun:org.jetbrains.skiko.redrawer.DisplayLinkProxy.$imp:handleDisplayLinkTick#internal + 163 
    at 83  QuartzCore                          0x187c5b84b        _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 807 
    at 84  QuartzCore                          0x187d62083        _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 335 
    at 85  CoreFoundation                      0x1803664ef        __CFMachPortPerform + 171 
    at 86  CoreFoundation                      0x18039b35b        __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 55 
    at 87  CoreFoundation                      0x18039a97b        __CFRunLoopDoSource1 + 495 
    at 88  CoreFoundation                      0x180394ed3        __CFRunLoopRun + 2151 
    at 89  CoreFoundation                      0x180394253        CFRunLoopRunSpecific + 583 
    at 90  GraphicsServices                    0x188eb7c9b        GSEventRunModal + 159 
    at 91  UIKitCore                           0x1061aafef        -[UIApplication _run] + 867 
    at 92  UIKitCore                           0x1061aef3b        UIApplicationMain + 123 
    at 93  SwiftUI                             0x10a25734b        OUTLINED_FUNCTION_54 + 499 
    at 94  SwiftUI                             0x10a2571eb        OUTLINED_FUNCTION_54 + 147 
    at 95  SwiftUI                             0x109a4f473        OUTLINED_FUNCTION_16 + 87 
    at 96  Appyx                               0x102382a3f        $s5Appyx6iOSAppV5$mainyyFZ + 
@fabriciovergara
Copy link

An workaround would be adding this to :ios module

tasks.register<Copy>("iOSCopyResources") {
    from("../shared/src/commonMain/resources")
    into("$buildDir/processedResources/iosMain/main")
    include("**/*")
}

tasks.matching { it.name == "syncPodComposeResourcesForIos" }.configureEach {
    dependsOn(tasks.matching { it.name == "iOSCopyResources" })
}

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