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

Crash when launching image picker #435

Open
felislynx-silae opened this issue May 17, 2023 · 1 comment
Open

Crash when launching image picker #435

felislynx-silae opened this issue May 17, 2023 · 1 comment

Comments

@felislynx-silae
Copy link

felislynx-silae commented May 17, 2023

When i launch gallery pick activity, app is crashing:

java.lang.IllegalArgumentException: Parcel: unknown type for value eu.lynxit.editor.RootNode$NavTarget$NewProjectPage@cee66ee
                                                                                                    	at android.os.Parcel.getValueType(Parcel.java:2409)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2308)
                                                                                                    	at com.bumble.appyx.core.navigation.NavKey.writeToParcel(Unknown Source:8)
                                                                                                    	at android.os.Parcel.writeParcelable(Parcel.java:2538)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2439)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2316)
                                                                                                    	at android.os.Parcel.writeMapInternal(Parcel.java:1232)
                                                                                                    	at android.os.Parcel.writeMap(Parcel.java:1215)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2430)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2316)
                                                                                                    	at android.os.Parcel.writeList(Parcel.java:1382)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2460)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2316)
                                                                                                    	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1265)
                                                                                                    	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802)
                                                                                                    	at android.os.Bundle.writeToParcel(Bundle.java:1389)
                                                                                                    	at android.os.Parcel.writeBundle(Parcel.java:1334)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2433)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2323)
                                                                                                    	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1265)
                                                                                                    	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802)
                                                                                                    	at android.os.Bundle.writeToParcel(Bundle.java:1389)
                                                                                                    	at android.os.Parcel.writeBundle(Parcel.java:1334)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2433)
                                                                                                    	at android.os.Parcel.writeValue(Parcel.java:2323)
                                                                                                    	at android.os.BaseBundle.dumpStats(BaseBundle.java:1874)
                                                                                                    	at android.os.BaseBundle.dumpStats(BaseBundle.java:1911)
                                                                                                    	at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:150)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:942)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7872)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
var spaceplaValue by remember { mutableStateOf(TextFieldValue("")) }
var selectImages by remember { mutableStateOf(listOf<Uri>()) }
val galleryLauncher =
     rememberLauncherForActivityResult(ActivityResultContracts.GetMultipleContents()) { uriList ->
            selectImages = uriList
     }

In onClick:

galleryLauncher.launch("image/*")

Also, this happens with:

activityStarter.startActivityForResult(this, 15) {
                Intent(Intent.ACTION_GET_CONTENT).apply {
                    addCategory(Intent.CATEGORY_OPENABLE)
                    type = "image/*"
                }
            }
@KovalevAndrey
Copy link
Collaborator

Hi @felislynx-silae, how does your NavTarget look like? Look like it doesn't implement Parcelable interface.
Issue for the reference #310

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