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

Use header request based user agent hints where available when generating support report #7750

Closed
4 of 6 tasks
unsoluble opened this issue Aug 4, 2022 · 7 comments
Closed
4 of 6 tasks
Assignees
Labels
bug Functionality which is not working as intended tech-debt Issues focused on the reduction of technical debt

Comments

@unsoluble
Copy link

What happened?

The Support reporting tool currently fails to identify modern Mac hardware/OS combos, in both Chromium/Electron and Firefox.

On an M1 Mac running macOS 12.5, this is the Chromium report:

OS: Unknown
Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
GPU: ANGLE (Apple, Apple M1, OpenGL 4.1)

and this is the Firefox report:

OS: Intel Mac OS X 10.15
Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0
GPU: Apple M1

I know we're up against whatever the browsers are providing for useragent strings, but it would be nice if we could find an alternate heuristic perhaps. This is certainly small-potatoes, but figured it was worth noting for the record.

What ways of accessing Foundry can you encounter this issue in?

  • Native App (Electron)
  • Chrome
  • Firefox
  • Safari
  • Other

Reproduction Steps

  1. Check the Support Details screen from an M1 Mac.

What core version are you reporting this for?

Version 10 Testing 3 (build 277)

Relevant log output

No response

Bug Checklist

  • The issue occurs while all Modules are disabled
@unsoluble unsoluble added the bug Functionality which is not working as intended label Aug 4, 2022
@plutoneld
Copy link

It's possible this is because of an ongoing reduction of User Agent strings, which presumably Firefox would be adopting as well.

Mac OS platform has been capped at 10.15.7 since Chrome 90.

https://www.chromium.org/updates/ua-reduction/

@aaclayton aaclayton added the blocked Issues which are unable to be worked on until others are resolved label Aug 4, 2022
@aaclayton
Copy link
Contributor

I'm not sure what we could/should do better here - if anyone has suggestions I'm open to them otherwise I think this is probably too low priority for us to focus on.

@plutoneld
Copy link

I'm not sure what state User Agent Client Hints is in for the different browsers, but maybe migrating to that and using Sec-CH-UA-Platform and Sec-CH-UA-Platform-Version could improve the situation: https://web.dev/user-agent-client-hints/

@aaclayton aaclayton changed the title Support report isn't correctly identifying Mac hardware/software Switch to using header request based user agent hints. Aug 7, 2022
@aaclayton aaclayton added tech-debt Issues focused on the reduction of technical debt and removed blocked Issues which are unable to be worked on until others are resolved labels Aug 7, 2022
@cswendrowski
Copy link
Contributor

I don't normally like to ask others to do our homework, but for this particular issue I would ask someone with Mac hardware to do some exploration and let us know what options work best for detection. Anything I would do here would just be a shot in the dark unfortunately

@plutoneld
Copy link

plutoneld commented Aug 12, 2022

I just noticed a caveat with using UA CH headers: they're only available over secure connections/HTTPS. So I guess that's a bad choice for the Support tool.

But per this site https://web.dev/migrate-to-ua-ch/ you should check navigator.userAgentData before falling back to navigator.userAgent. And you could potentially do

navigator.userAgentData.getHighEntropyValues(
    ["platform", "platformVersion"])
  .then(ua => { console.log(ua) });

to get the platform and version. This works in Chrome and in the Electron app consoles when connected to the FVTT server. Where the current navigator.oscpu in Support tool gives "Unknown" for me, the above snippet gives "Linux" and "5.15.0" (kernel version).

.userAgentData is notable not available in Safari or Firefox currently: https://caniuse.com/mdn-api_navigator_useragentdata

@aaclayton
Copy link
Contributor

Originally reported by rathlord https://discord.com/channels/170995199584108546/1065764070680186930/1157682125177368586

ALL MODULES DISABLED? Yes/NA
OS, Hosting, Browser (if applicable): Ubuntu, self hosted, Safari
Short Description of bug: Shows unsupported version even when version matches recommended
Simple steps to reproduce the bug: Connect to Foundry using Safari on the latest version
Screenshots and/or console errors:

image

@aaclayton aaclayton removed this from the V12 - API Development 2 milestone Mar 26, 2024
@aaclayton
Copy link
Contributor

I think this is high priority to try and address before V12 stable so we have actionable information in our support report.

@Fyorl Fyorl self-assigned this May 14, 2024
@Fyorl Fyorl added this to the V12 User Testing 4 milestone May 14, 2024
@Fyorl Fyorl closed this as completed May 14, 2024
@Fyorl Fyorl changed the title Switch to using header request based user agent hints. Use header request based user agent hints where available when generating support report May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended tech-debt Issues focused on the reduction of technical debt
Projects
Status: Done
Development

No branches or pull requests

6 participants