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][WASM] fixes for compose-1.7 #390

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

kkalisz
Copy link
Contributor

@kkalisz kkalisz commented Oct 8, 2024

Hello when checking 1.7 compose branch I have encountered few issues.
I have prepared some fixes for them.

Fixes issues with no viewmodel Factory defined in native targets.

Uncaught Kotlin exception: kotlin.UnsupportedOperationException: `Factory.create(String, CreationExtras)` is not implemented. You may need to override the method and provide a custom implementation. Note that using `Factory.create(String)` is not supported and considered an error.
    at 0   undecrover                          0x10338ae1b        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 
    at 1   undecrover                          0x103384317        kfun:kotlin.Exception#<init>(kotlin.String?){} + 115 
    at 2   undecrover                          0x103384537        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115 
    at 3   undecrover                          0x103384c6f        kfun:kotlin.UnsupportedOperationException#<init>(kotlin.String?){} + 115 
    at 4   undecrover                          0x103309e93        kfun:androidx.lifecycle.viewmodel.internal.ViewModelProviders#unsupportedCreateViewModel(){0§<androidx.lifecycle.ViewModel>}0:0 + 131 

fixes issue with illegal cast in wasm target

ERROR
illegal cast
RuntimeError: illegal cast
    at <precompose.sample:molecule>.androidx.compose.runtime.CompositionLocalProvider (http://localhost:8080/composeApp.wasm:wasm-function[21143]:0x36deba)
    at <precompose.sample:molecule>.moe.tlaster.precompose.PreComposeApp (http://localhost:8080/composeApp.wasm:wasm-function[49244]:0x5c4faa)
    at <precompose.sample:molecule>.moe.tlaster.precompose.molecule.sample.App (http://localhost:8080/composeApp.wasm:wasm-function[49367]:0x5c7102)
    at <precompose.sample:molecule>.moe.tlaster.precompose.molecule.sample.ComposableSingletons$MainKt$lambda-1$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[49439]:0x5c8de2)
    at <precompose.sample:molecule>.moe.tlaster.precompose.molecule.sample.ComposableSingletons$MainKt$lambda-1$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[49440]:0x5c8e6a)
    at <precompose.sample:molecule>.androidx.compose.runtime.internal.ComposableLambdaImpl.invoke (http://localhost:8080/composeApp.wasm:wasm-function[24450]:0x3c38fe)
    at <precompose.sample:molecule>.moe.tlaster.precompose.molecule.sample.ComposableLambda$invoke$ref.invoke (http://localhost:8080/composeApp.wasm:wasm-function[49436]:0x5c8d18)
    at <precompose.sample:molecule>.moe.tlaster.precompose.molecule.sample.ComposableLambda$invoke$ref.invoke (http://localhost:8080/composeApp.wasm:wasm-function[49437]:0x5c8d83)
    at <precompose.sample:molecule>.androidx.compose.ui.window.ComposeWindow$lambda$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[39749]:0x501934)
    at <precompose.sample:molecule>.androidx.compose.ui.window.ComposeWindow$lambda$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[39750]:0x501beb)

Copy link
Owner

@Tlaster Tlaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I didn't notice this.

@Tlaster Tlaster merged commit 37e9089 into Tlaster:compose-1.7 Oct 9, 2024
2 checks passed
@mobiletoly
Copy link

mobiletoly commented Oct 15, 2024

any plans to release it in some alpha version? I'm having the same issue

@Tlaster
Copy link
Owner

Tlaster commented Oct 15, 2024

any plans to release it in some alpha version? I'm having the same issue

1.7.0-alpha03 just released!

@theGBguy
Copy link

I am still getting the same error on iOS with 1.7.0-alpha03.

Uncaught Kotlin exception:     at 0   JBComposeExperiments.debug.dylib    0x103730427        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 
    at 1   JBComposeExperiments.debug.dylib    0x103729cdb        kfun:kotlin.Exception#<init>(kotlin.String?){} + 115 
    at 2   JBComposeExperiments.debug.dylib    0x103729efb        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115 
    at 3   JBComposeExperiments.debug.dylib    0x10372a5ab        kfun:kotlin.UnsupportedOperationException#<init>(kotlin.String?){} + 115 
    at 4   JBComposeExperiments.debug.dylib    0x103c1045b        kfun:androidx.lifecycle.viewmodel.internal.ViewModelProviders#unsupportedCreateViewModel(){0§<androidx.lifecycle.ViewModel>}0:0 + 131

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

Successfully merging this pull request may close these issues.

4 participants