Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: App not working on modern Huawei devices #6258

Closed
sabereen opened this issue Jan 27, 2023 · 5 comments
Closed

bug: App not working on modern Huawei devices #6258

sabereen opened this issue Jan 27, 2023 · 5 comments

Comments

@sabereen
Copy link

Bug Report

Capacitor Version

  @capacitor/cli: 4.6.2
  @capacitor/core: 4.6.2
  @capacitor/android: 4.6.2
  @capacitor/ios: 4.6.2

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/core: 4.6.2
  @capacitor/cli: 4.6.2
  @capacitor/android: 4.6.2

Platform(s)

android

Current Behavior

Huawei has its own webview and not using google`s one.
Its versions is not same as chrome!
Capacitor detects it as legacy webview (<60) even in modern webviews and redirects the user to errorPath.

Expected Behavior

App should working in modern Huawei devices!

@AntonNB
Copy link

AntonNB commented Feb 15, 2023

Pls, fix bug

@AntonNB
Copy link

AntonNB commented Feb 16, 2023

Same issue on Honor devices. Apparently, when there was no GMS out of the box, problems arise.

@maningame
Copy link

Have the same issue, so I did some research. The problem is that the Huawei webview have its own versioning, which is different from Android system webview. Current is 12.1.3.371 or something like this.

Capacitor check version by WebView.getCurrentWebViewPackage() and its return 12.x.x.x (package version, not a chrome version inside it). I made quick workaround by adding the folllowing code to Bridge.java > isMinimumWebViewInstalled() after PackageInfo info = WebView.getCurrentWebViewPackage():

if (info.packageName.equals("com.huawei.webview")) {
    return true;
}

Its allow to bypass the check, but obviously the minWebViewVersion became useless in that case because we cant do version matching between huawei webview and android webview. To solve this issue I do additional check in my app. Hope this was helpfull.

@markemer
Copy link
Contributor

markemer commented Apr 4, 2023

Should be fixed in any 5.0.0 release - as of today the most current is 5.0.0-beta-1

markemer added a commit that referenced this issue Apr 17, 2023
@ionitron-bot
Copy link

ionitron-bot bot commented May 4, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants