pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.1k stars 1.4k forks source link

`No virtual method isEngagementSignalsApiAvailable` Error on opening a webpage #2203

Open lokesh-univest opened 4 weeks ago

lokesh-univest commented 4 weeks ago

Environment

Technology Version
Flutter version 3.16.7
Plugin version ^6.0.0
Android version All
iOS version
macOS version
Xcode version
Google Chrome version

Device information: Comes in all android devices

Description

I have got below 1 Errors in this plugin and it's increase the crash rates on of my application.

This Error comes when I am open a page using MyChromeSafariBrowser function.

code:

MyChromeSafariBrowser().open(
                          url: WebUri(url),
                          settings: ChromeSafariBrowserSettings(
                            shareState: CustomTabsShareState.SHARE_STATE_OFF,
                            barCollapsingEnabled: true,
                            packageName: 'com.android.chrome'
                          ),
                        );

Stacktrace/Logcat

D/CustomTabsActivity(18347): Custom Tabs Engagement Signals API not supported
D/CustomTabsActivity(18347): 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/~~tATxK04CBNS15AQv44F9bQ==/com.univest.capp.uat-mm1A3Yzxpht4KvcdrJV3Vw==/base.apk)
D/CustomTabsActivity(18347):    at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity.customTabsConnected(ChromeCustomTabsActivity.java:224)
D/CustomTabsActivity(18347):    at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ChromeCustomTabsActivity$1.onCustomTabsConnected(ChromeCustomTabsActivity.java:117)
D/CustomTabsActivity(18347):    at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.CustomTabActivityHelper.onServiceConnected(CustomTabActivityHelper.java:152)
D/CustomTabsActivity(18347):    at com.pichillilorenzo.flutter_inappwebview_android.chrome_custom_tabs.ServiceConnection.onCustomTabsServiceConnected(ServiceConnection.java:24)
D/CustomTabsActivity(18347):    at androidx.browser.customtabs.CustomTabsServiceConnection.onServiceConnected(CustomTabsServiceConnection.java:57)
D/CustomTabsActivity(18347):    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2198)
D/CustomTabsActivity(18347):    at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2231)
D/CustomTabsActivity(18347):    at android.os.Handler.handleCallback(Handler.java:958)
D/CustomTabsActivity(18347):    at android.os.Handler.dispatchMessage(Handler.java:99)
D/CustomTabsActivity(18347):    at android.os.Looper.loopOnce(Looper.java:205)
D/CustomTabsActivity(18347):    at android.os.Looper.loop(Looper.java:294)
D/CustomTabsActivity(18347):    at android.app.ActivityThread.main(ActivityThread.java:8177)
D/CustomTabsActivity(18347):    at java.lang.reflect.Method.invoke(Native Method)
D/CustomTabsActivity(18347):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
D/CustomTabsActivity(18347):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
[AndroidChromeSafariBrowser] (android) AndroidChromeSafariBrowser ID 11332525311222022812269671639021252245188122 calling "onServiceConnected" using {}
D/SessionLifecycleClient(18347): Sending lifecycle 2 to service
github-actions[bot] commented 4 weeks ago

👋 @lokesh-univest

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!

lokesh-univest commented 3 weeks ago

I have search the issue but i am not get any proper solution.