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

[BUG] --spoof-windows doesn't seem to work any more (Genshin Impact not visible) #201

Closed
NettoHikari opened this issue Aug 22, 2023 · 23 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@NettoHikari
Copy link

NettoHikari commented Aug 22, 2023

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

  1. Run GFN Electron with --spoof-windows flag
  2. Expect Genshin Impact (and perhaps other games that are limited to GFN on Windows) to appear
  3. Game doesn't appear

Screenshots

image

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

@NettoHikari NettoHikari added the bug Something isn't working label Aug 22, 2023
@orion715
Copy link

I am seeing this too, i no longer have the higher resolution options I had yesterday.

@OishiMula
Copy link

Same here! Literally two days ago and no longer showing.

@Doc-4
Copy link

Doc-4 commented Aug 26, 2023

Here to say the same, spoof option seems to fail.

@kvakl-brodakl
Copy link

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 )

@NettoHikari
Copy link
Author

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.

@Doc-4
Copy link

Doc-4 commented Aug 27, 2023

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

@kvakl-brodakl
Copy link

kvakl-brodakl commented Aug 27, 2023

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

@kvakl-brodakl
Copy link

kvakl-brodakl commented Aug 27, 2023

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)

@Galcian79
Copy link

Galcian79 commented Aug 28, 2023

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.

@Galcian79
Copy link

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

@kvakl-brodakl
Copy link

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...

@Galcian79
Copy link

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

@Galcian79
Copy link

Galcian79 commented Aug 29, 2023

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.

@Flameish
Copy link

Flameish commented Sep 23, 2023

You can install the windows version of chrome via wine which seems to be working (my mouse input is really laggy through but playing via a controller works fine). The option to pick 1440p is showing at least, which is more than the Linux Chrome version is showing.

Screenshot from 2023-09-23 12-33-29

@Doc-4
Copy link

Doc-4 commented Sep 23, 2023

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

@Flameish
Copy link

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.

@Mageti
Copy link

Mageti commented Sep 24, 2023

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.
Capture before hints
Capture of the hints
Capture after hints

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

@Galcian79
Copy link

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. Capture before hints Capture of the hints Capture after hints

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?

@Mageti
Copy link

Mageti commented Sep 25, 2023

Here is the command line I used : geforcenow --spoof-windows --disable-rpc.
It's here :

app.commandLine.appendSwitch('disable-features', 'UserAgentClientHint');

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 });                                                                                                                                                                    
    })                                                                                                                                                                                                                                        
  }

@Mageti
Copy link

Mageti commented Sep 25, 2023

Could it be related to this bug ?
electron/electron#30201 (comment)

@hmlendea hmlendea added the wontfix This will not be worked on label Oct 11, 2023
@hmlendea
Copy link
Owner

hmlendea commented Oct 11, 2023

Closing this as OS spoofing is getting removed (See #209), and also Genshin Impact is only available on GFN on Windows.

@hmlendea hmlendea closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@Doc-4
Copy link

Doc-4 commented Oct 11, 2023

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.

@MarcBittner
Copy link

MarcBittner commented Feb 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

10 participants