JakeWharton / SdkSearch

An Android app and Chrome extension for searching the Android SDK documentation.
Apache License 2.0
2.06k stars 175 forks source link

Crash on class selection #171

Closed veyndan closed 5 years ago

veyndan commented 5 years ago

Steps to Reproduce

Stacktrace

2019-06-15 14:25:03.583 16264-16264/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.jakewharton.sdksearch, PID: 16264
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=/reference/java/sql/Driver.html (has extras) }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2007)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
        at android.app.Activity.startActivityForResult(Activity.java:4587)
        at android.app.Activity.startActivityForResult(Activity.java:4545)
        at android.app.Activity.startActivity(Activity.java:4906)
        at androidx.core.content.ContextCompat.startActivity(ContextCompat.java:251)
        at androidx.browser.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:263)
        at com.jakewharton.sdksearch.search.ui.OpenDocumentationItemHandler.invoke(OpenDocumentationItemHandler.kt:37)
        at com.jakewharton.sdksearch.search.ui.SearchUiBinder$resultsAdapter$1.onItemClicked(SearchUiBinder.kt:52)
        at com.jakewharton.sdksearch.search.ui.ItemResultViewHolder.onClick(ItemResultViewHolder.kt:51)
        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:6718)
        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)

Thoughts

It appears that the app is attempting to launch a custom tab though cannot find an app to handle the intent. This seems odd as I have Chrome installed on my device, as well as custom tabs working in other apps (e.g. Twitter).

Specs

Phone

Pixel 2 on Android Pie.

App

Version 1.4.1 freshly installed from Google Play.

JakeWharton commented 5 years ago

Fixed in e456a25f2fabfc4fd730a036021f94a63ee6e48d. New app version coming this week or weekend to remove these stale entries. Future breakages like this won't require an app update, only a server tweak.