Open emelampianakis opened 9 months ago
This issue has been labeled as type: bug
. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.
Updating the issue to reflect that this issue is about catching the error thrown off from not having a valid URL
i have same crash log like
Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.app.example/com.capacitorjs.plugins.browser.BrowserControllerActivity}: android.content.ActivityNotFoundException:
No Activity found to handle Intent { act=android.intent.action.VIEW dat=blob:https://com.app.example/3781e39f-7d87-4e85-b041-a8e20a4e9602 pkg=com.android.chrome (has extras) }
We are using same @capacitor/browser ^5.2.0 version and having the same issue on adding the app to store. Can we have any update on this issue?
the crash report is below,
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3644)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3781)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:138)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2306)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:201)
at android.os.Looper.loop (Looper.java:288)
at android.app.ActivityThread.main (ActivityThread.java:7918)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)
Caused by android.content.ActivityNotFoundException:
at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2200)
at android.app.Instrumentation.execStartActivity (Instrumentation.java:1839)
at android.app.Activity.startActivityForResult (Activity.java:5507)
at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:753)
at android.app.Activity.startActivityForResult (Activity.java:5465)
at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:734)
at android.app.Activity.startActivity (Activity.java:5963)
at androidx.core.content.ContextCompat$Api16Impl.startActivity (ContextCompat.java:978)
at androidx.core.content.ContextCompat.startActivity (ContextCompat.java:318)
at androidx.browser.customtabs.CustomTabsIntent.launchUrl (CustomTabsIntent.java:483)
at com.capacitorjs.plugins.browser.Browser.open (Browser.java:112)
at com.capacitorjs.plugins.browser.BrowserControllerActivity.open (BrowserControllerActivity.java:43)
at com.capacitorjs.plugins.browser.BrowserPlugin.lambda$open$0 (BrowserPlugin.java:72)
at com.capacitorjs.plugins.browser.BrowserPlugin.$r8$lambda$I9bLDRWh7vl57kOTAfjVKp5lWOU
at com.capacitorjs.plugins.browser.BrowserPlugin$$ExternalSyntheticLambda0.onControllerReady
at com.capacitorjs.plugins.browser.BrowserControllerActivity.onCreate (BrowserControllerActivity.java:19)
at android.app.Activity.performCreate (Activity.java:8342)
at android.app.Activity.performCreate (Activity.java:8321)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3625)
Had similar issue, but with valid links and also I found the cause so I will comment here.
I had the exact same stack trace but I was opening a valid link. Turns out the client never had a browser installed. The case was that said customer had 2 profiles -> personal and work. They installed the app on the work profile, had chrome installed on their personal profile but not on their work one. This cases the app to crash as soon as Browser.open
is called. In retrospect this is obvious, but I sure spend hours debugging.
Not sure if this should somehow be handled from capacitors side, but I would at least recommend that it is documented somewhere, as all similar queries are about broken URLs and people might spend hours on this silly issue.
In my case, I wanted to redirect to a market://
URL. Please fix this issue
Bug Report
Plugin(s)
@capacitor/browser ^5.2.0
Capacitor Version
Platform(s)
Android
Current Behavior
This happens when the app is opened from the push listener 'notificationActionPerformed' In the notification data: urlToOpen = 'www.google.com' When using .open({url: urlToOpen}) app crashes & stays unresponsive until app data are cleared
If the urlToOpen = 'https://www.google.com/' --> works as expected.
Expected Behavior
Open the url in the in app browser
Code Reproduction
Other Technical Details
Additional Context
The crashlytics report: