New issue
Advanced search Search tips

Issue 854702 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 711073



Sign in to add a comment

Android WebView telemetry should warn about not switching webview providers

Project Member Reported by kylec...@chromium.org, Jun 20 2018

Issue description

I was trying to run telemetry for Android WebView so built/installed monochrome_public_apk. Everything appeared to work except telemetry wasn't using webview from MonochromePublic.apk I had installed. This was on a Pixel C version 8.1.0.

Steps to reproduce:
$ ninja -C out/droid monochrome_public_apk
$ out/droid/bin/monochrome_public_apk install -v
$ ./tools/perf/run_benchmark run -v --browser=android-webview --pageset-repeat=1 --also-run-disabled-tests --story-filter=browse.media.youtube --chromium-output-directory=/chrome/src/out/droid system_health.common_mobile

The telemetry benchmark ran and there was a log line that seemed like it was using MonochromePublic.apk.

"Installing /chrome/src/out/droid/apks/MonochromePublic.apk on device if needed."

However the benchmark wasn't using MonochromePublic.apk. I was able add CHECK(false) in key areas and it didn't crash. Telemetry used some other version of webview without my changes. Trying to switch the webview implementation via adb fails:

$ adb shell cmd webviewupdate set-webview-implementation org.chromium.chrome
Failed to switch to org.chromium.chrome, the WebView implementation is now provided by com.android.chrome.

It was probably user error and I'm not sure what I was doing wrong with monochrome_public_apk. perezju@ pointed me at instructions for replacing SystemWebView.apk and that worked as expected. perezju@ also asked that I file a bug about telemetry warning if not able to switch webview providers.
 
Summary: Android WebView telemetry should warn about not switching weview providers (was: Android WebView telemetry should warn about not switching telemetry providers)
Summary: Android WebView telemetry should warn about not switching webview providers (was: Android WebView telemetry should warn about not switching weview providers)
Blocking: 711073
Cc: nednguyen@chromium.org
Owner: perezju@chromium.org
Status: Assigned (was: Untriaged)
From Telemetry's side, one of the errors is that we only update the webview provider for Monochrome.apk, but we don't do it for MonochromePublic.apk:
https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py?rcl=a2cee4816d7bfcc19abd3653e455a745cff1e9b4&l=286

This is not a problem on bots (because the provisioning script does this for us), but users trying to test locally are hit by this without warning.
Reminder to self: this came up when talking to v8 folks, and we should make sure the correct webview provider selection is done for any monochrome based apk; it doesn't matter if we intend to launch chrome or webview.
Cc: -nednguyen@chromium.org nedngu...@google.com
I think the error here was allowing to use MonochromePublic.apk, since that does not work as a webview provider at all.

Also still need to add the check to fail when Telemetry can't set the webview provider.
Cc: crouleau@chromium.org

Comment 7 by benhenry@google.com, Jan 16 (6 days ago)

Components: Test>Telemetry

Comment 8 by benhenry@google.com, Jan 16 (6 days ago)

Components: -Speed>Telemetry

Sign in to add a comment