Open luckyhandler opened 6 months ago
👋 @luckyhandler
NOTE: This comment is auto-generated.
Are you sure you have already searched for the same problem?
Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!
If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.
In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE]
or ios WKWebView [MY ERROR HERE]
keywords.
Following these steps can save you, me, and other people a lot of time, thanks!
Environment
Device information: Google Pixel 7a
Description
The plugin crashes the app if a package cannot be found. It is not possible to catch the error to display an error message to the user.
Expected behavior: If a browser with a certain package name is not found the plugin crashes but in a way that it can be caught.
Current behavior: If a browser with a certain package name is not found the plugin crashes but the error cannot be caught.
Steps to reproduce
D/CustomTabsActivity(29164): Custom Tabs Engagement Signals API not supported D/CustomTabsActivity(29164): java.lang.NoSuchMethodError: No virtual method isEngagementSignalsApiAvailable(Landroid/os/Bundle;)Z in class Landroidx/browser/customtabs/CustomTabsSession; or its super classes (declaration of 'androidx.browser.customtabs.CustomTabsSession' appears in /data/app/~~bzB2IhB71GvIIiiYES3yOA==/-Fgo7ftD6mv5WBEw5V_CjhQ==/base.apk) D/CustomTabsActivity(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity.customTabsConnected(ChromeCustomTabsActivity.java:224) D/CustomTabsActivity(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity$1.onCustomTabsConnected(ChromeCustomTabsActivity.java:117) D/CustomTabsActivity(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.CustomTabActivityHelper.onServiceConnected(CustomTabActivityHelper.java:152) D/CustomTabsActivity(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ServiceConnection.onCustomTabsServiceConnected(ServiceConnection.java:24) D/CustomTabsActivity(29164): at androidx.browser.customtabs.CustomTabsServiceConnection.onServiceConnected(CustomTabsServiceConnection.java:57) D/CustomTabsActivity(29164): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2313) D/CustomTabsActivity(29164): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2350) D/CustomTabsActivity(29164): at android.os.Handler.handleCallback(Handler.java:958) D/CustomTabsActivity(29164): at android.os.Handler.dispatchMessage(Handler.java:99) D/CustomTabsActivity(29164): at android.os.Looper.loopOnce(Looper.java:230) D/CustomTabsActivity(29164): at android.os.Looper.loop(Looper.java:319) D/CustomTabsActivity(29164): at android.app.ActivityThread.main(ActivityThread.java:8893) D/CustomTabsActivity(29164): at java.lang.reflect.Method.invoke(Native Method) D/CustomTabsActivity(29164): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) D/CustomTabsActivity(29164): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) D/AndroidRuntime(29164): Shutting down VM E/AndroidRuntime(29164): FATAL EXCEPTION: main E/AndroidRuntime(29164): Process: PID: 29164 E/AndroidRuntime(29164): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=... pkg=com.android.chrome (has extras) } E/AndroidRuntime(29164): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2252) E/AndroidRuntime(29164): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1878) E/AndroidRuntime(29164): at android.app.Activity.startActivityForResult(Activity.java:5743) E/AndroidRuntime(29164): at android.app.Activity.startActivityForResult(Activity.java:5701) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.CustomTabActivityHelper.openCustomTab(CustomTabActivityHelper.java:54) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.CustomTabActivityHelper.openCustomTab(CustomTabActivityHelper.java:63) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity.launchUrlWithSession(ChromeCustomTabsActivity.java:200) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity.launchUrl(ChromeCustomTabsActivity.java:185) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity.customTabsConnected(ChromeCustomTabsActivity.java:255) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity$1.onCustomTabsConnected(ChromeCustomTabsActivity.java:117) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.CustomTabActivityHelper.onServiceConnected(CustomTabActivityHelper.java:152) E/AndroidRuntime(29164): at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ServiceConnection.onCustomTabsServiceConnected(ServiceConnection.java:24) E/AndroidRuntime(29164): at androidx.browser.customtabs.CustomTabsServiceConnection.onServiceConnected(CustomTabsServiceConnection.java:57) E/AndroidRuntime(29164): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2313) E/AndroidRuntime(29164): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2350) E/AndroidRuntime(29164): at android.os.Handler.handleCallback(Handler.java:958) E/AndroidRuntime(29164): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(29164): at android.os.Looper.loopOnce(Looper.java:230) E/AndroidRuntime(29164): at android.os.Looper.loop(Looper.java:319) E/AndroidRuntime(29164): at android.app.ActivityThread.main(ActivityThread.java:8893) E/AndroidRuntime(29164): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(29164): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) E/AndroidRuntime(29164): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)