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

Library is not compatible with moko permissions 0.18.0 #44

Open
burnoo opened this issue Apr 19, 2024 · 2 comments
Open

Library is not compatible with moko permissions 0.18.0 #44

burnoo opened this issue Apr 19, 2024 · 2 comments

Comments

@burnoo
Copy link

burnoo commented Apr 19, 2024

moko-geo is crashing when used with moko-permissions 0.18.0 due to changes introduced in icerockdev/moko-permissions#114

Crash

java.lang.NoSuchMethodError: No interface method bind(Landroidx/lifecycle/Lifecycle;Landroidx/fragment/app/FragmentManager;)V in class Ldev/icerock/moko/permissions/PermissionsController; or its super classes (declaration of 'dev.icerock.moko.permissions.PermissionsController' appears in /data/app/~~mzYr2CSSRJBzdyXB69qEMw==/house.letmein.app.debug-L3ibmEofzpfG5nL4uKKVAA==/base.apk!classes25.dex)
        at dev.icerock.moko.geo.LocationTracker.bind(LocationTracker.kt:46)
        at dev.icerock.moko.geo.compose.BindLocationTrackerEffect_androidKt$BindLocationTrackerEffect$1.invokeSuspend(BindLocationTrackerEffect.android.kt:26)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
        at android.os.Handler.handleCallback(Handler.java:958)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:205)
        at android.os.Looper.loop(Looper.java:294)
        at android.app.ActivityThread.main(ActivityThread.java:8177)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
        Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@1f23d75, androidx.compose.runtime.BroadcastFrameClock@5c010a, StandaloneCoroutine{Cancelling}@739ad7b, AndroidUiDispatcher@e8c8798]

Workaround

Keep using moko-permissions 0.17.0 till moko-geo is updated

Fix

LocationTracker.bind and BindLocationTrackerEffect should be updated to adapt to a new PermissionsController.bind API. While releasing a new version of this library it would be nice to include also bumping other dependencies to the newest versions.

@DenisV94
Copy link

Hello!
I am facing the same error...
Can you explain how you solved it please?
Thanks you!

@JakkeJ
Copy link

JakkeJ commented May 28, 2024

Same issue here, not solvable with Moko Permissions without an update to this library I think. Either make a custom permissions library that supports background location (since this is the big change in 0.18), or wait.

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

3 participants