question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tap screen repeatedly on app starting, navigation unknown destination error occur

See original GitHub issue

Overview (Required)

  • Tap screen repeatedly on app starting, unknown destination error occur at below
SpeechSessionItem.kt l.63

navController.navigate(detailNavDirections)

Steps To Reproduce

  1. Swipe kill the app
  2. Repeat tapping the screen during app is starting
  3. java.lang.IllegalArgumentException: navigation destination io.github.droidkaigi.confsched2019.debug:id/action_session_to_session_detail is unknown to this NavController occur

Expected behavior No exeption will be thrown.

Screenshots

Env:

  • Device: Essential Phone PH-1
  • OS: 9.0
  • App Version: master (Fixed # 656)

Additional context none

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
gen0083commented, Jan 29, 2019

Probably, the cause is multiple tapping.

If I rewrite SpeechSessionItem(line: 63) like this, then same error occurred.

            root.setOnClickListener {
                navController.navigate(detailNavDirections)
                navController.navigate(detailNavDirections)
            }

navigate to detail from detail, it is not defined in navigation graph. so we got the crash.

    Process: io.github.droidkaigi.confsched2019.debug, PID: 27929
    java.lang.IllegalArgumentException: navigation destination io.github.droidkaigi.confsched2019.debug:id/action_session_to_session_detail is unknown to this NavController
        at androidx.navigation.NavController.navigate(NavController.java:754)
        at androidx.navigation.NavController.navigate(NavController.java:695)
        at androidx.navigation.NavController.navigate(NavController.java:681)
        at androidx.navigation.NavController.navigate(NavController.java:813)
        at io.github.droidkaigi.confsched2019.session.ui.item.SpeechSessionItem$bind$$inlined$with$lambda$1.onClick(SpeechSessionItem.kt:67)
        at android.view.View.performClick(View.java:6597)
        at android.view.View.performClickInternal(View.java:6574)
        at android.view.View.access$3100(View.java:778)
        at android.view.View$PerformClick.run(View.java:25885)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

on branch master build, 2 sessions clicked at the same time then got this error.

crash

1reaction
takahiromcommented, Jan 28, 2019

Thanks! I can reproduce it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

IllegalArgumentException: navigation destination xxx is ...
We can use a navigateSafe() function that checks to see if the destination that we're trying to navigate to is invalid from the...
Read more >
[SOLVED] Fix Google Maps Not Working on Android - iMobie
Tap Settings on your Android phone > Apps > Scroll down to find Google Maps > Click on the Store option and then...
Read more >
Navigate to a destination - Android Developers
Navigating to a destination is done using a NavController , an object that manages app navigation within a NavHost .
Read more >
Troubleshooting app protection policy user issues
This article provides solutions to common user issues and error messages related to Intune app protection policies.
Read more >
A fix for “Navigation action cannot be found in the current ...
The crash occurs because the first invocation of findController.navigate() takes the app to a different screen/destination, on the second ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found