flash.android.com - Firefox is not supported to due missing WebUSB API
Categories
(Web Compatibility :: Site Reports, defect, P2)
Tracking
(Webcompat Priority:P2, Webcompat Score:6)
People
(Reporter: rbucata, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][autowebcompat:processed][autowebcompat:repro-success])
User Story
platform:windows,mac,linux,android impact:site-broken configuration:general affects:all branch:release diagnosis-team:dom user-impact-score:500 autowebcompat-repro-status:success autowebcompat-repro-chrome-mask-fixed:false autowebcompat-repro-channels:nightly,stable,esr autowebcompat-repro-report-os:all autowebcompat-diagnosis-status:success
Attachments
(2 files)
Environment:
Operating system: Windows 10
Firefox version: Firefox 154.0
Steps to reproduce:
- Navigate to: https://flash.android.com/welcome
- Observe
Expected Behavior:
Can start the process
Actual Behavior:
Browser unsupported page displayed
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/233368
Updated•3 months ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Comment 1•2 months ago
|
||
In Firefox, https://flash.android.com/welcome renders an unsupported-browser interstitial ("This service requires features not supported by your current browser") with a Download Chrome link, and the Android Flash Tool onboarding flow is never shown, so the user cannot start flashing a device. Chrome shows the normal welcome page with the "Install an Android build in three easy steps" onboarding content. The gate is driven by the absence of the WebUSB API (navigator.usb) in Firefox.
Updated•2 months ago
|
Comment 2•2 months ago
|
||
Root cause analysis generated by autowebcompat bot:
The Android Flash Tool (Angular app at flash.android.com) gates its entire onboarding flow on a feature detection of the WebUSB entry point navigator.usb. In the site's flashstation JS bundle the welcome component computes its browser-support state as:
this.UI = navigator.usb ? (_.ic() /* chrome-like */ ? 1 : 0) : 2;
and the WebUSB service provider does:
if (typeof navigator.usb === "undefined" || window.isSecureContext === false)
throw new _.L("WebUSB is not supported on this platform");
The falsy-navigator.usb state selects the template branch that renders "This service requires features not supported by your current browser. We recommend the latest versions of Chrome or Edge on Desktop." plus the https://www.google.com/chrome/ link, instead of the "Install an Android build in three easy steps" onboarding block.
Firefox does not implement the WebUSB API, so usb is not exposed on Navigator.prototype and navigator.usb is undefined; Chrome implements it, so navigator.usb is [object USB]. This is a genuine engine implementation difference (a missing API), not UA sniffing — the only UA-derived value on the path (_.ic() / the Edge check) merely picks wording among the messages, and the interstitial reproduces in Chrome with an unmodified Chrome UA once navigator.usb is hidden.
Relevant spec: WebUSB API, Navigator.usb attribute — https://wicg.github.io/webusb/#navigator-interface (WICG incubation, not a W3C REC). Mozilla's standards position on WebUSB is "harmful": https://mozilla.github.io/standards-positions/#webusb — the API is intentionally unimplemented in Gecko.
Evidence:
- Live site, Firefox Nightly 157 (X11 Linux): <main> innerText contains "This service requires features not supported by your current browser. We recommend the latest versions of Chrome or Edge on Desktop. ... Download Chrome"; <main> anchors include https://www.google.com/chrome/.
'usb' in navigator= false,'hid' in navigator= false ('serial' in navigator= true, so Web Serial is not the gate). - Live site, Chrome 152 headless: same URL renders "Install an Android build in three easy steps ... Get Started";
'usb' in navigator= true. - Site source: fetched the flashstation bundle from within the page and located the gate —
this.UI = navigator.usb ? (_.ic() ? 1 : 0) : 2;and the DI providerif (typeof navigator.usb === "undefined" || window.isSecureContext === false) throw ... "WebUSB is not supported on this platform", adjacent to the literal template string "This service requires features not supported by your current browser." No UA test guards the onboarding branch. - Decisive control experiment: reloaded flash.android.com/welcome in Chrome with an init script that hides
Navigator.prototype.usb(UA left untouched as Chrome). Chrome then rendered the identical unsupported interstitial including the "Download Chrome" link — proving the switch isnavigator.usbfeature detection, not UA sniffing. - Reduced testcase /app/diagnosis/testcase=eh55ym67.html loaded via file:// in both browsers: Firefox → "UNSUPPORTED …",
'usb' in navigatorfalse,typeof navigator.usb"undefined",'usb' on Navigator.prototypefalse,'USB' in windowfalse, isSecureContext true. Chrome → "SUPPORTED …",typeof navigator.usb"object" / "[object USB]",'USB' in windowtrue. Same divergence as the real site.
Comment 3•2 months ago
|
||
Updated•2 months ago
|
Description
•