You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a regression in NW.js v0.83. If package.json specifies both "user-agent" and "chromium-args": "--enable-node-worker", then navigator.userAgent is set to the wrong value in a Web Worker.
Run the project and open the console. It logs the user agent in both the DOM and in a web worker.
Expected result:
Log the correct user agent in both cases, e.g. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (@cb06fc91af4703f38d770d89cd3c7a066fdce098) (KHTML, like Gecko, Chrome, Safari) NWjs/0.83.0
Observed result:
In NW.js 0.83, it logs the correct user agent in the DOM, but in the worker it is set to Node.js/21. This causes incorrect feature detection in the worker and results in various features not working, browser-engine specific hacks not being applied, etc.
It works correctly in NW.js v0.82, logging the right user agent in the web worker, so this is a regression in v0.83 specifically. Tested on Windows 11 x64.
(FWIW: please also take a look at #8075 which is another thing that regressed when using "chromium-args": "--enable-node-worker" back in v0.76 and still hasn't been fixed)
The text was updated successfully, but these errors were encountered:
This is a regression in NW.js v0.83. If package.json specifies both
"user-agent"
and"chromium-args": "--enable-node-worker"
, thennavigator.userAgent
is set to the wrong value in a Web Worker.Minimal repro:
nwjs-wrong-useragent.zip
Run the project and open the console. It logs the user agent in both the DOM and in a web worker.
Expected result:
Log the correct user agent in both cases, e.g.
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (@cb06fc91af4703f38d770d89cd3c7a066fdce098) (KHTML, like Gecko, Chrome, Safari) NWjs/0.83.0
Observed result:
In NW.js 0.83, it logs the correct user agent in the DOM, but in the worker it is set to
Node.js/21
. This causes incorrect feature detection in the worker and results in various features not working, browser-engine specific hacks not being applied, etc.It works correctly in NW.js v0.82, logging the right user agent in the web worker, so this is a regression in v0.83 specifically. Tested on Windows 11 x64.
(FWIW: please also take a look at #8075 which is another thing that regressed when using
"chromium-args": "--enable-node-worker"
back in v0.76 and still hasn't been fixed)The text was updated successfully, but these errors were encountered: