question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Webkit and Firefox do not respect locale setting

See original GitHub issue

Context:

  • Playwright Version: latest
  • Operating System: Win10
  • Node.js version: LTS
  • Browser: Webkit, Firefox
  • Extra: [any specific details about your environment]

Describe the bug Our frontend application is built using Angular.

Every request it sends to the backend must have Accept-Language header, with short language value, e.g. cs. NOT cs-CZ - that is considered invalid, and backend will return HTTP error.

I have two issues:

  • when locale is not explicitly set in the configuration, then Webkit and Firefox ignore cs value which should be set by application under test, and set en-US for Accept-Language header value.

  • when locale is explicitly set - either in config file, or using test.use() in the test, then it:

    • in the trace console log shows, that header value is cs, BUT backend logs shows, that in reality it sends cs, cs-CZ.
    • Firefox will start sending correct request header intermittently, or after calling page.reload()
    • Webkit will be still bugged

This is currently a blocker for testing on these two browsers, since without backend data application cannot render needed content.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pavelfeldmancommented, Nov 15, 2022

I think we have enough information to act.

0reactions
Mone71commented, Nov 15, 2022

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Locale management — Firefox Source Docs documentation
A locale is a combination of language, region, script, and regional preferences the user wants to format their data into. There are multiple...
Read more >
1366134 - [UX] Decision about locale selection ... - Bugzilla@Mozilla
The setup works well, except for a scenario where the OS language is completely different from Firefox language. At the moment, there's no...
Read more >
1556890 - Language displayed via intl.locale.requested="" not ...
My system locale is Japanese, but with no langpack installed, Firefox was in English. However, I'm not getting the "Join Firefox" popup/page on...
Read more >
1045053 - Determine default Accept-Language header from ...
[Feature/regressing bug #]: New work to make OS and app locale selections affect HTTP Accept-Language header. [User impact if declined]: Users will need...
Read more >
navigator.language js property doesn't reflect browser default ...
1) This bug doesn't exist in Mozilla localized build, since the value of "general.useragent.locale"" is hardcoded in these files, http://lxr.mozilla.org/l10n/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found