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]: Missing user agent client hints #34762

Open
3 tasks done
yellow1234 opened this issue Jun 27, 2022 · 17 comments
Open
3 tasks done

[Bug]: Missing user agent client hints #34762

yellow1234 opened this issue Jun 27, 2022 · 17 comments
Labels
27-x-y 28-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@yellow1234
Copy link

yellow1234 commented Jun 27, 2022

Preflight Checklist

Electron Version

19.0.6

What operating system are you using?

Windows

Operating System Version

Windows 10 version 21H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Low entropy user agent client hints as:
sec-ch-ua
sec-ch-ua-mobile
sec-ch-ua-platform

Should be send on each request, also if not received header "Accept-CH" in the server response

High entropy user agent client hints as:
sec-ch-ua-arch
sec-ch-ua-full-version
sec-ch-ua-full-version-list
sec-ch-ua-platform-version
sec-ch-ua-bitness
sec-ch-ua-wow64

Aren't working at all
Electron never sending those, even after response with "Accept-CH" header

Actual Behavior

After PR #34481 the low entropy hints are working from the second request (after receiving header "Accept-CH" in the server response)
If testing in Chrome Incognito, can see that those headers are always sent in Chrome versions 102/103

The high entropy hints aren't working at all, also after PR #34481

I did test with new BrowserWindow/loadURL to:
https://www.bing.com/search?q=car

In newest Chrome versions the user agent is not include the full browser version
The server can find it only by high entropy hint sec-ch-ua-full-version or sec-ch-ua-full-version-list

Example of http request headers in Chrome 103.0.5060.53
...
Host: www.google.com
Connection: keep-alive
sec-ch-ua: ".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"
sec-ch-ua-full-version-list: ".Not/A)Brand";v="99.0.0.0", "Google Chrome";v="103.0.5060.53", "Chromium";v="103.0.5060.53"
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
sec-ch-ua-arch: "x86"
sec-ch-ua-full-version: "103.0.5060.53"
sec-ch-ua-platform-version: "10.0.0"
sec-ch-ua-bitness: "64"
sec-ch-ua-wow64: ?0
sec-ch-ua-model:
sec-ch-ua-platform: "Windows"
...

Testcase Gist URL

https://gist.github.com/yellow1234/20370bd58dd1c0b5f1c385dcb0afe5ac

Additional Information

No response

@codebytere
Copy link
Member

Thanks for reporting this and helping to make Electron better!

Because of time constraints, triaging code with third-party dependencies is usually not feasible for a small team like Electron's.

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@mlaurencin mlaurencin added the blocked/need-repro Needs a test case to reproduce the bug label Jun 29, 2022
@yellow1234
Copy link
Author

@codebytere codebytere added platform/windows has-repro-gist Issue can be reproduced with code at https://gist.github.com/ 19-x-y and removed blocked/need-repro Needs a test case to reproduce the bug labels Jul 11, 2022
@deermichel
Copy link
Contributor

@yellow1234 can you please try if this repros on the current version?

@yellow1234
Copy link
Author

@yellow1234 can you please try if this repros on the current version?

It's yet the same
Nothing is changed

Tested on the current latest version
electron v20.1.4

@ckerr ckerr added the 20-x-y label Sep 16, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jan 11, 2023
@Juice10
Copy link

Juice10 commented Jan 11, 2023

Bump

@github-actions github-actions bot removed the stale label Jan 12, 2023
@ztob
Copy link

ztob commented Feb 22, 2023

Bump

@brianpetro
Copy link

bump

1 similar comment
@emojiiii
Copy link

emojiiii commented Apr 7, 2023

bump

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jul 7, 2023
@Juice10
Copy link

Juice10 commented Jul 7, 2023

bump

@codebytere codebytere removed the stale label Jul 7, 2023
@ultraman00
Copy link

bump

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@codebytere codebytere added status/confirmed A maintainer reproduced the bug or agreed with the feature 27-x-y 28-x-y and removed 19-x-y 20-x-y labels Oct 17, 2023
@panther7
Copy link

panther7 commented Nov 28, 2023

Same...

Windows 11 23H2 x64
Electron v27.1.2 (x64)

@harbormw
Copy link

harbormw commented Dec 8, 2023

bump

Debian Bullseye
Electron v15.1.2

@youfoundKim
Copy link

youfoundKim commented Jan 2, 2024

Missing a few hints on the first navigation / first request on a website. Additional resources and requests incldues all headers.

Missing:

  • "Sec-Ch-Ua"
  • "Sec-Ch-Ua-Mobile"
  • "Sec-Ch-Ua-Platform"

Windows 11
Electron 28.1.0

@ckerr
Copy link
Member

ckerr commented Jan 3, 2024

Does this issue still occur in the 29 alpha releases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27-x-y 28-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
No open projects
Status: 👍 Does Not Block Stable
Status: 👍 Does Not Block Stable
Development

No branches or pull requests