-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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]: Chromium returns "en-US@posix" for navigator.language
#34046
Comments
adobe/react-spectrum#7457 has a good analysis and links. Sounds like overriding language in the config is the only workaround. |
This has bitten Jupyter ecosystem as well, breaking CI on dozens of repositories. If my understanding is correct, this would be a bug in Chromium and not in playwright, correct? I see that the Chromium team stumbled upon this in May and committed a workaround for their use case in https://issues.chromium.org/issues/337047877. |
Tried setting LANG=en_US on both my node repl example and on my actual tests and it seemed to be an effective workaround. |
I was not able to reproduce on WSL2 with Ubuntu 24.04 on Windows 11. @Torgen what was the original value of echo $LANG? or did |
$ echo $LANG
C.UTF-8 |
Yes, and the workaround with setting the LANG env variable above sounds like the easiest fix. It is a little hard to file the issue upstream https://issues.chromium.org/issues?q=status:open without the repro. If you have the repro, could you file it and mention it here? The issue you point to only mentions it briefly, so it was not addressed in full. |
Version
1.49.0 and 1.49.1
Steps to reproduce
in node repl:
Expected behavior
It should return any legal BCP47 language code.
Actual behavior
'en-US@posix'
Additional context
Running on Ubuntu 24.04 on WSL2, but something similarly illegal is getting returned on my github actions runners based on how my tests are failing in Torgen/codex-blackboard#1361 and Torgen/codex-blackboard#1374. Basically it's consistent with https://github.com/Torgen/codex-blackboard/blob/master/client/imports/timestamp.js throwing an error when I try to pass
navigator.language
to the constructor ofIntl.DateTimeFormat
at the module top level. I don't expect you to run those, but they're how I noticed there was a problem.Environment
The text was updated successfully, but these errors were encountered: