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

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

Open
2 of 3 tasks
bluthen opened this issue Apr 24, 2024 · 6 comments
Open
2 of 3 tasks
Labels
bug has-min-repro Has a minimum reproduction

Comments

@bluthen
Copy link
Contributor

bluthen commented Apr 24, 2024

Issue Type

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

  • Bug Report

  • Feature Request

  • Successfully reproduced against the latest version of NW.js?

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

  • Operating System: Linux/MacOS, probably windows but had not tested it.
  • NW.js Version: 0.87
  • Repro Link:
  • Code snippet:
{
  "name": "nwjstest",
  "main": "index.html",
  "user-agent": "%webkit_ver"
}
  • Crash report:
@ayushmanchhabra ayushmanchhabra added bug has-min-repro Has a minimum reproduction labels Apr 27, 2024
@ayushmanchhabra
Copy link
Contributor

ayushmanchhabra commented Jul 21, 2024

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
Copy link
Contributor

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

@bluthen
Copy link
Contributor Author

bluthen commented Jul 21, 2024

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

@ayushmanchhabra
Copy link
Contributor

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

@bluthen
Copy link
Contributor Author

bluthen commented Sep 3, 2024

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
Copy link
Contributor

ayushmanchhabra commented Sep 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug has-min-repro Has a minimum reproduction
Projects
None yet
Development

No branches or pull requests

2 participants