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.

Crash on start: Non-browser selected

See original GitHub issue

Describe the bug While the default system browser (where any link opens by default) is set to an actual browser (Brave, also tried setting to Chrome), for some reason an app that is not a browser and does not appear in the system browser selection (Revolut) is selected as TWA provider which causes a crash on start.

To Reproduce Launching the app on my phone in debug mode returns these logs before the app crashes:

D/TWALauncherActivity: Using URL from Manifest (https://travelfeed.io/?utm_source=pwa).
D/TWAProviderPicker: Found browser: com.revolut.revolut
    Found browser: com.revolut.revolut
D/TWAProviderPicker: Found no TWA providers, using first browser: com.revolut.revolut
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: io.travelfeed.twa, PID: 14612
    java.lang.RuntimeException: Unable to start activity ComponentInfo{io.travelfeed.twa/com.google.androidbrowserhelper.trusted.LauncherActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://travelfeed.io/... pkg=com.revolut.revolut (has extras) }
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
     Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://travelfeed.io/... pkg=com.revolut.revolut (has extras) }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2018)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
        at android.app.Activity.startActivityForResult(Activity.java:4689)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:767)
        at android.app.Activity.startActivityForResult(Activity.java:4647)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:754)
        at android.app.Activity.startActivity(Activity.java:5008)
        at androidx.core.content.ContextCompat.startActivity(ContextCompat.java:251)
        at androidx.browser.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:331)
        at com.google.androidbrowserhelper.trusted.TwaLauncher.lambda$static$0(TwaLauncher.java:51)
        at com.google.androidbrowserhelper.trusted.-$$Lambda$TwaLauncher$yiLzsm37NbSon1-dZ2dCvDJv8wU.launch(Unknown Source:0)
        at com.google.androidbrowserhelper.trusted.TwaLauncher.launch(TwaLauncher.java:166)
        at com.google.androidbrowserhelper.trusted.LauncherActivity.onCreate(LauncherActivity.java:158)
        at android.app.Activity.performCreate(Activity.java:7327)
        at android.app.Activity.performCreate(Activity.java:7318)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7050) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 

Expected behavior The app should not crash

Smartphone (please complete the following information):

  • Device: SM-G950F
  • OS: Android 9 on newest patch (April 1 2020)
  • Browser: Brave Browser

Originally posted at https://github.com/GoogleChromeLabs/bubblewrap/issues/143 @tiotdev FYI

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
andrebancommented, May 28, 2020

I have prepared a package (1.3.1-alpha01) today. The plan is to make it available to use tomorrow via the Google Maven. I’ll update the the issue once available. When we have some apps using it and we can confirm the issue is indeed fixed, we’ll release 1.3.1.

2reactions
andrebancommented, May 14, 2020

Also started to get this same error on the 16th April, and it is still ongoing:

image

This error seems similar to one when we first created our TWA, but google released an updated custom tabs version to rectify the error. So to be explicit, our implementation is set to:

implementation 'com.github.GoogleChrome:custom-tabs-client:809a55cfa2'

@dazbradbury a bit unrelated to this issue, but the recommended way of using Trusted Web Activity is via android-browser-helper currently: https://developers.google.com/web/android/trusted-web-activity/android-browser-helper-migration

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Chrome if it crashes or won't open - Computer
If Google Chrome crashes, freezes, or won't start at all, you might see one of ... If a specific page won't work, you...
Read more >
Game crashes or closes unexpectedly - Microsoft Support
When you start or play any one of the games that is listed in the "Applies to" ... Select the level of access...
Read more >
Why Does Google Chrome Keep Crashing, Freezing, or Not ...
It's frustrating when Google Chrome keeps crashing. Whether you can't even get Chrome to open or it crashes on certain websites, you might...
Read more >
Avoid crashes - Tips and tricks | Firefox Help - Mozilla Support
Here are some easy things you can do to avoid crashes and keep Firefox running in ... Go to the Start menu, select...
Read more >
How to troubleshoot crashing in Apex Legends - EA Help
Fix issues with Apex Legends crashing and freezing on PC, ... on Apex Legends and select Game Properties, then Advanced Launch Options.
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