New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 662322 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

WebViewFactory throws a runtime exception to cause app crash

Reported by richard....@htc.com, Nov 4 2016

Issue description

Steps to reproduce the problem:
Not sure the reproduce steps, but we found several questions below
1. In Android N, Chrome is enabled and webview is disabled by default. But we still can see the webview is upgraded to new version in logs, and user makes sure that he didn't disable the Chrome
2. Webview is not enabled, but WebViewFactory is trying to load webview instead of Chrome
3. When this issue happened, we can see the webview is disabled and downgrade to the in rom version(the new version is removed)

What is the expected behavior?
App can load webview successfully

What went wrong?
10-18 12:00:02.599  1665  2604 E WebViewUpdateServiceImpl: Timed out waiting for relro creation, relros started 2 relros finished 4 package dirty? false
10-18 12:00:02.599  1665  2604 W WebViewUpdateServiceImpl: creating relro file timed out
10-18 12:00:02.607 24833 24833 I WebViewFactory: Loading com.google.android.webview version 53.0.2785.124 (code 278512450)
10-18 12:00:02.682  1665  2956 V SettingsProvider: getGlobalSetting(webview_multiprocess)
10-18 12:00:02.690 24833 24833 V WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {d6dfcb}

10-18 12:02:58.870  1665  2387 E WebViewUpdateServiceImpl: Timed out waiting for relro creation, relros started 2 relros finished 4 package dirty? true
10-18 12:02:58.870  1665  2387 W WebViewUpdateServiceImpl: creating relro file timed out
10-18 12:02:58.993 30695 30695 E WebViewFactory: Chromium WebView package does not exist
10-18 12:02:58.993 30695 30695 E WebViewFactory: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to verify WebView provider, version code is lower than expected: 278512450 actual: 275609850
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.webkit.WebViewFactory.verifyPackageInfo(WebViewFactory.java:243)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.webkit.WebViewFactory.getWebViewContextAndSetProvider(WebViewFactory.java:303)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:330)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:194)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.webkit.CookieManager.getInstance(CookieManager.java:39)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.cmcm.onews.ui.webView.WebViewPreparer.getInstance(WebViewPreparer.java:74)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.cmcm.onews.C.ADD_YOUR_ONCREATE_CODE_HERE(C.java:185)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.cmcm.onews.C.onCreate(C.java:155)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.cmcm.onews.NiApplication.onCreate(NiApplication.java:223)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.ext.app.Application.onCreate(Application.java:76)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1037)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5662)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.app.ActivityThread.-wrap2(ActivityThread.java)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.os.Handler.dispatchMessage(Handler.java:102)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.os.Looper.loop(Looper.java:173)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at android.app.ActivityThread.main(ActivityThread.java:6459)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at java.lang.reflect.Method.invoke(Native Method)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
10-18 12:02:58.993 30695 30695 E WebViewFactory: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
10-18 12:02:58.994 30695 30695 D AndroidRuntime: Shutting down VM

10-18 12:02:58.994 30695 30695 W System.err: java.lang.RuntimeException: Unable to create application android.ext.app.Application: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to verify WebView provider, version code is lower than expected: 278512450 actual: 275609850
10-18 12:02:58.994 30695 30695 W System.err: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5665)
10-18 12:02:58.994 30695 30695 W System.err: 	at android.app.ActivityThread.-wrap2(ActivityThread.java)
10-18 12:02:58.994 30695 30695 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
10-18 12:02:58.994 30695 30695 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)
10-18 12:02:58.994 30695 30695 W System.err: 	at android.os.Looper.loop(Looper.java:173)
10-18 12:02:58.994 30695 30695 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6459)
10-18 12:02:58.994 30695 30695 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
10-18 12:02:58.994 30695 30695 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
10-18 12:02:58.994 30695 30695 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
10-18 12:02:58.995 30695 30695 W System.err: Caused by: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to verify WebView provider, version code is lower than expected: 278512450 actual: 275609850
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:371)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:194)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.CookieManager.getInstance(CookieManager.java:39)
10-18 12:02:58.995 30695 30695 W System.err: 	at com.cmcm.onews.ui.webView.WebViewPreparer.getInstance(WebViewPreparer.java:74)
10-18 12:02:58.995 30695 30695 W System.err: 	at com.cmcm.onews.C.ADD_YOUR_ONCREATE_CODE_HERE(C.java:185)
10-18 12:02:58.995 30695 30695 W System.err: 	at com.cmcm.onews.C.onCreate(C.java:155)
10-18 12:02:58.995 30695 30695 W System.err: 	at com.cmcm.onews.NiApplication.onCreate(NiApplication.java:223)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.ext.app.Application.onCreate(Application.java:76)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1037)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5662)
10-18 12:02:58.995 30695 30695 W System.err: 	... 8 more
10-18 12:02:58.995 30695 30695 W System.err: Caused by: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to verify WebView provider, version code is lower than expected: 278512450 actual: 275609850
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.WebViewFactory.verifyPackageInfo(WebViewFactory.java:243)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.WebViewFactory.getWebViewContextAndSetProvider(WebViewFactory.java:303)
10-18 12:02:58.995 30695 30695 W System.err: 	at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:330)
10-18 12:02:58.995 30695 30695 W System.err: 	... 17 more

Crashed report ID: 

How much crashed? Whole browser

Is it a problem with a plugin? No 

Did this work before? N/A 

Chrome version: 52.0.2743.98  Channel: stable
OS Version: 7.0
Flash Version:
 
Components: Mobile>WebView

Comment 2 by sgu...@chromium.org, Nov 10 2016

Owner: gsennton@chromium.org
1. if webview is disabled, and still upgraded it would be a bug in playstore but I think this is very unlikely.

the other questions look like the user actually disabled chrome. Gustav, any opinions?
Huh, the following line suggests a bug during relro-creation:

10-18 12:00:02.599  1665  2604 E WebViewUpdateServiceImpl: Timed out waiting for relro creation, relros started 2 relros finished 4 package dirty? false

the number of relro runs finished should never be more than the number of relro runs started.

I *think* this could only happen if the relro creation processes notify WebViewUpdateService that they are done, and then get killed by the ActivityManager.

Could you take a bug report please?
Arguably we should never try to load WebView rather than Chrome on a device where Chrome hasn't been disabled either.

Comment 5 by richard....@htc.com, Nov 11 2016

Attach the report for your reference
bugreport.txt
25.8 MB Download
Hm, this is strange:

10-19 11:06:53.325  1665 14969 E WebViewUpdateServiceImpl: Timed out waiting for relro creation, relros started 2 relros finished 8 package dirty? true

There should definitely not be 8 finished relros.
It is also slightly weird that I can't find any ProcessRecord for the RelroFileCreator class in your bugreport - currently we never remove that process record, so something weird probably happened to that process.

Here's a strange piece of logging:

10-19 11:05:32.770  1665  2380 I am_crash: [1665,0,WebViewLoader-arm64-v8a,0,Native crash,Aborted,unknown,0]
10-19 11:05:32.835  2701  2701 I force_gc: Binder
10-19 11:05:32.880  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:32.880  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0
10-19 11:05:32.881  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:32.881  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0
10-19 11:05:32.893  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:32.893  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0
10-19 11:05:32.905  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:32.905  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0
10-19 11:05:32.908  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:32.908  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0
10-19 11:05:33.095  1665  1682 I status_bar_disable: disable:userId=0 what=0x0 which=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a}
10-19 11:05:33.095  1665  1682 I status_bar_disable: combined_disable=0x1 pkg=Window{84951ba u0 Application Error: WebViewLoader-arm64-v8a} user=0 token=android.os.Binder@7f97b50 net1=0x0 net2=0x0




It looks like the relro process crash might be recorded in the dropbox service:

DUMP OF SERVICE dropbox:
Unknown argument: -a
Drop box contents: 1000 entries

.
.
.
2016-10-19 11:05:32 data_app_native_crash (text, 1320 bytes)
    Process: WebViewLoader-arm64-v8a/Flags: 0x0/Package: android v24 (7.0) ...
So, it would be great to fetch that dropbox log file off the device somehow (I don't know where it is situated though). 
Can we still get that file of the device somehow?
Status: WontFix (was: Unconfirmed)
Closing. It doesn't look like there are steps forward here. This seems to be low impact.

Sign in to add a comment