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]: Possibly broken user agent client hint #30201
Comments
I confirmed this bug.
|
@webdevmario Hi, is this issue fixed? If not, I want to work on this. |
I have a branch which starts on this, but it interferes with some other UA overriding stuff, so it's not quite straightforward. https://github.com/electron/electron/compare/navigator-useragentdata is my WIP, for reference. |
We had problems with this as the empty app.commandLine.appendSwitch('disable-features', 'UserAgentClientHint'); |
Cleaned up and finished off my branch, #34481 should fix this. |
Hi, looks like client hints are still broken in electron 25.4.0: by setting app.userAgentFallback, the User-Agent header is correctly set in requests, but clients hints such as SEC-CH-UA, SEC-CH-UA-MOBILE and SEC-CH-UA-PLATFORM are not (despite easy to reconstruct from the userAgentFallback. Also the navigator.userAgentData completely ignores the userAgentFallback, while the navigator.userAgent seems correctly set. |
Preflight Checklist
Electron Version
13.1.7
What operating system are you using?
Windows
Operating System Version
Windows 10 version 20H2
What arch are you using?
x64
Last Known Working Electron version
12.0.15
Expected Behavior
Checking
navigator.userAgentData
in Chrome 91 returns an array of brands appropriately. Electron 13/14 do not return anything.This appears to then become a problem for my situation. I am posting a form with hidden variables to a third-party vendor I work with. This form post ultimately loads an iframe.
Expected: As it does in Chrome 91, load the iframe from this third-party vendor.
Actual Behavior
A header of "sec-ch-ua" is included in the request to the third-party vendor and it is blank. They are rejecting the post because of an invalid header. I suspect this is because Chrome 13/14 does not make this hint data made available correctly.
I tried loading various sites in Chrome 91 that do load brand names in Electron 13/14 and they are empty if you review
navigator.userAgentData
.Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: