[BUG] --spoof-windows doesn't seem to work any more (Genshin Impact not visible)
NettoHikari opened this issue ยท 23 comments
Describe the bug
Hey, guys.
Geforce NOW seems to have updated their checks for what platform a user is using. My wife likes to play Genshin Impact on her Linux Notebook and it worked fine until yesterday using Google Chrome with a Safari user agent or using Geforce NOW Electron by utilizing the --spoof-windows
command line switch.
This workaround stopped working today.
Side note: Genshin Impact is definitely still available on GFN.
Does anyone have an idea how to fix this? Thank you very much and have a nice day!
- NH
To Reproduce
- Run GFN Electron with
--spoof-windows
flag - Expect Genshin Impact (and perhaps other games that are limited to GFN on Windows) to appear
- Game doesn't appear
Screenshots
Operating System
Arch Linux
Desktop Environment
GNOME 44.3
Display Server
Wayland
Installation method
Flatpak
Version
1.13.0
Is this a fresh install of the app or an update from a past version?
Fresh Install (Tested on my own System)
Did this issue appear right away upon installation/updating, or spontaneously?
For me, right after Installation, for my Wife, right after updating
Additional context
No response
I am seeing this too, i no longer have the higher resolution options I had yesterday.
Same here! Literally two days ago and no longer showing.
Here to say the same, spoof option seems to fail.
Same. Used appimage.
I suspect that the problem may be with navigator.userAgentData (which allows to get real userAgent platform, even if you spoof it with Windows one).
I encountered this problem few month ago when trying to play on gfn through Chrome. I used --disable-features=UserAgentClientHint
flag when running Chrome which seemed to solve the problem (it just disables userAgentData which in turn forces geforce to check spoofed user agent, believing that you are on windows).
Maybe you can add support to such flag for gfn-electron and it may solve the problem.
Would be great if you do )
Good hint, thank you.
I used
--disable-features=UserAgentClientHint
flag when running Chrome which seemed to solve the problem (it just disables userAgentData which in turn forces geforce to check spoofed user agent, believing that you are on windows).
Does this still work, though? I just ran the Chrome flatpak (flatpak run com.google.Chrome --disable-features=UserAgentClientHint
) and GFN still seems to know that I'm not on Windows.
I believe that argument is something for chrome, not necessarily GFN. Unless GFN has all these flags built in it will probably require a fix in a new release. I don't know much about UA hints or I'd try to troubleshoot it myself
Does this still work, though? I just ran the Chrome flatpak (
flatpak run com.google.Chrome --disable-features=UserAgentClientHint
) and GFN still seems to know that I'm not on Windows.
Did you install user agent switcher extension with windows user agent?
I use this one: https://chrome.google.com/webstore/detail/user-agent-switcher/kchfmpdcejfkipopnolndinkeoipnoia
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
I believe that argument is something for chrome, not necessarily GFN. Unless GFN has all these flags built in it will probably require a fix in a new release. I don't know much about UA hints or I'd try to troubleshoot it myself
I'm not sure on which logic gfn-electron works. I noticed in logs that it uses UserAgent, so I thought that maybe it can also pass this flag. (It doesn't work now, I tried passing this flag to gfn-electron and it just ignores it I think)
Does this still work, though? I just ran the Chrome flatpak (
flatpak run com.google.Chrome --disable-features=UserAgentClientHint
) and GFN still seems to know that I'm not on Windows.Did you install user agent switcher extension with windows user agent? I use this one: https://chrome.google.com/webstore/detail/user-agent-switcher/kchfmpdcejfkipopnolndinkeoipnoia
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
I just did that on Chrome. It still detects it as non Windows.
BTW, just out of curiosity, this is a very interesting discussion on the subject:
https://security.stackexchange.com/questions/47467/can-a-website-determine-what-os-or-webbrowser-a-visitor-is-using-if-the-useragen
I just did that on Chrome. It still detects it as non Windows.
Strange, it works for me... Also I turned off cache for geforce now in developer tools > network (there is a checkbox)... Maybe you can try this...
Also what I want to note - even if it works fine in chrome, if I open incognito mode (still with user agent, with flag and turn off the cache) - geforce still is able to detect me as non windows and block some games...
I just did that on Chrome. It still detects it as non Windows.
Strange, it works for me... Also I turned off cache for geforce now in developer tools > network (there is a checkbox)... Maybe you can try this... Also what I want to note - even if it works fine in chrome, if I open incognito mode (still with user agent, with flag and turn off the cache) - geforce still is able to detect me as non windows and block some games...
It doesn't change anything. It is strange indeed, because whatismybrowser.com detects WINDOWS NT 10.0
Supposing the issue is not on my side alone, i wonder if they could write a Java exploit to blindly parse uname -r
on every accessing client.
Respectfully, the point of raising the issue is to get it fixed, most of us know there are workarounds. The point of this client is to not have that overhead. I hope the dev comments soon, I use this to play genshin on steam deck currently, and it's been broken for a few weeks now
I mentioned it here for others because it's a place you'll find if you're looking for a workaround, as I haven't found one yet.
I do not know if that can help, but when I opened the devtools, I saw that the header "Sec-Ch-Ua-Platform" changed after a particular request.
It starts with requests having the spoofed header with "Windows", as intended.
Then 1 or 2 requests are made to https://www.nvidia.com/auth/hints/
, without the spoofed header.
And after that every other requests are made with the value "Linux" in this header.
ATM, I am not sure what this hints script does, but it succeed in finding it runs on a linux, and then it totally bypass the parameters done in electron, overriding them with its own finding.
EDIT : just to add the precision that I had it run after rm -rf ~/.config/GeForce\ NOW/
, and I get the same thing everytime
I do not know if that can help, but when I opened the devtools, I saw that the header "Sec-Ch-Ua-Platform" changed after a particular request. It starts with requests having the spoofed header with "Windows", as intended. Then 1 or 2 requests are made to
https://www.nvidia.com/auth/hints/
, without the spoofed header. And after that every other requests are made with the value "Linux" in this header.ATM, I am not sure what this hints script does, but it succeed in finding it runs on a linux, and then it totally bypass the parameters done in electron, overriding them with its own finding.
EDIT : just to add the precision that I had it run after
rm -rf ~/.config/GeForce\ NOW/
, and I get the same thing everytime
Are you sure you disabled User Agent Client Hints before taking the test?
Here is the command line I used : geforcenow --spoof-windows --disable-rpc
.
It's here :
Line 20 in 35a386a
And in the file
/opt/geforcenow-electron/resources/app/scripts/main.js
, I added these lines at line 28, to be sure :
app.commandLine.appendSwitch(
'disable-features',
'UserAgentClientHint'
);
As well as I added the second details.requestHeaders
here between lines 71 and 85, even if I am pretty sure it does nothing :
if (process.argv.includes('--spoof-windows')) {
session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
details.requestHeaders['sec-ch-ua-platform'] = 'Windows';
details.requestHeaders['Sec-Ch-Ua-Platform'] = 'Windows';
callback({ cancel: false, requestHeaders: details.requestHeaders });
})
}
Could it be related to this bug ?
electron/electron#30201 (comment)
Closing this as OS spoofing is getting removed (See #209), and also Genshin Impact is only available on GFN on Windows.
It is a website after all, and the web is open and platform agnostic. Until they say it goes against their terms to get a decent settings menu and access to all games by obfuscating your OS, I see no reason to accept their odd preferential treatment of windows. I respect your decision even if I don't agree, thank you for your work up until this point.
Closing this as OS spoofing is getting removed (See #209), and also Genshin Impact is only available on GFN on Windows.
This is a useful feature that exposes existing functionality. Removing it is lame and I find the reasoning unconvincing.