nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.39k stars 3.88k forks source link

%webkit_ver in "user-agent" has what looks like null pointer address output #8182

Open bluthen opened 6 months ago

bluthen commented 6 months ago

Issue Type

Before opening an issue, please search and see if it has already been raised.

Please use our mailing list or Gitter chatroom to ask questions. The issue tracker is only for bugs and feature requests, in English only. Please note that issues without a repro or code snippet are less likely to be resolved.

Current/Missing Behavior

Having a package.json of:

{
  "name": "nwjstest",
  "main": "index.html",
  "user-agent": "%webkit_ver"
}

Gives the following in navigator.userAgent:

537.36 (@0000000000000000000000000000000000000000)

Expected/Proposed Behavior

I expect it to show instead:

537.36 (KHTML, like Gecko)

Additional Info

{
  "name": "nwjstest",
  "main": "index.html",
  "user-agent": "%webkit_ver"
}
ayushmanchhabra commented 3 months ago

https://github.com/chromium/chromium/blob/4ad3f3d83c07658158584d9df33c2deb71ac11a3/content/common/user_agent.cc#L93 Looks like the zeroes are supposed to be the chromium git version.

ayushmanchhabra commented 3 months ago

Is the expected output exactly 537.36 (KHTML, like Gecko)?

bluthen commented 3 months ago

Yes, I hard coded it for me instead of using %webkit_ver

ayushmanchhabra commented 2 months ago

What is the last version that you know this was working? I feel like this could be an easy fix.

bluthen commented 2 months ago

We noticed it going from v0.78.1 -> 0.87.0

However trying v0.30.0, still shows the issue to me now. So maybe it has something to do with running on newer systems?

ayushmanchhabra commented 2 months ago

Shouldn't be the case since the characters after the @ should be the Chromium git commit. Maybe something in the build config changed?