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

The mobile version of a webpage is displayed even though the desktop user agent is selected #1473

Closed
Softvision-GeluHaiduc opened this issue Jul 30, 2019 · 11 comments · Fixed by #1542
Assignees
Labels
bug This issue is a software or functional defect Bugzilla Main activity on this bug is in Bugzilla [QA]:Normal issue Label for QA to mark normal issues logged [QA]:Verified fixed Label for QA to mark verified fixed issues
Milestone

Comments

@Softvision-GeluHaiduc
Copy link

[Affected Versions]:

  • Firefox Reality 1.4-32101950

[Affected Platforms]:

  • Oculus Go - Android 7.1.2

[Prerequisites]:

  • The headset is turned on and the browser is opened.
  • Go to "Settings"(gear icon), "Display" tile and for the "User-Agent Mode" setting select the "Desktop" option.

[Steps to reproduce]:

  1. Visit the following webpage: "facebook.com".
  2. Click the "Switch User Agent" button in the search bar. (The mobile version of the webpage is displayed)
  3. Click the "Switch User Agent" button again.
  4. Observe the loaded webpage.

[Expected results]:

  • The desktop version of the webpage is displayed.

[Actual results]:

  • The mobile version of the webpage is displayed even though the desktop user agent is selected.

[Notes]:

  • The issue is also reproducible with the twitter.com webpage.
  • Attached a screen recording of the issue: link
@Softvision-GeluHaiduc Softvision-GeluHaiduc added the [QA]:Normal issue Label for QA to mark normal issues logged label Jul 30, 2019
@jvonitter jvonitter added this to the v1.4 milestone Jul 31, 2019
@philip-lamb philip-lamb added bug This issue is a software or functional defect P3 Backlog labels Jul 31, 2019
@jvonitter jvonitter added needinfo Further information is requested and removed P3 Backlog labels Jul 31, 2019
@jvonitter
Copy link
Contributor

Some sites dont give the desktop version even if we ask for it. We need to test with sites that report the UA they're getting, such as http://httpbin.org/#/Request_inspection/get_user_agent

@jvonitter jvonitter added the QA Attention QA label Jul 31, 2019
@jvonitter
Copy link
Contributor

@Softvision-GeluHaiduc can you confirm that this isnt just a facebook problem?

@Softvision-GeluHaiduc
Copy link
Author

@jvonitter I tried different websites:

  • on the following websites the issue is reproducible: “facebook.com”, “twitter.com” and “twitch.tv”.
  • on the following websites the issue is not reproducible: “netflix.com”, “reddit.com”, “instagram.com“.

From what I saw the issue appears when the website has a m.domain.com for mobile user agent. (m.facebook.com, m.twitter.com, m.twitch.tv)

@keianhzo
Copy link
Collaborator

keianhzo commented Aug 1, 2019

@jvonitter @Softvision-GeluHaiduc The problem is that for pages that redirect to a mobeil domain if you change the UA to desktop when you are already in the mobile site we just reload the mobile site and you see the mobile site in desktop mode, same as if you just load https://m.twitter.com in your desktop browser. It's using the desktop UA but loading the mobile site.

Not sure if there is anything we can do about that @bluemarvin @MortimerGoro any ideas?

@Softvision-GeluHaiduc
Copy link
Author

@keianhzo I don't know if this information helps but on Firefox for android if you visit twitter.com and then check the option for “Request desktop site” the m.twitter.com website is loaded and if you uncheck the option the desktop version of the website is loaded twitter.com.

@bluemarvin
Copy link
Contributor

This is a bug in Fenix too. It might need GeckoView support. Here is the code in Fennec: https://searchfox.org/mozilla-central/rev/b38e3beb658b80e1ed03e0fdf64d225bd4a40327/mobile/android/chrome/content/browser.js#4615

@bluemarvin
Copy link
Contributor

I'm working to determine if we can do something similar with current GV API or if we will need GV changes.

@bluemarvin
Copy link
Contributor

In order to fix this in FxR the following GeckoView issue need to be resolved:

https://bugzilla.mozilla.org/show_bug.cgi?id=1571083
https://bugzilla.mozilla.org/show_bug.cgi?id=1571088

@keianhzo keianhzo added the Bugzilla Main activity on this bug is in Bugzilla label Aug 2, 2019
@philip-lamb philip-lamb added the P1 Fix in the current development iteration label Aug 4, 2019
@bluemarvin
Copy link
Contributor

From the PR:
This turning out to be more difficult that I first thought. The problem I am having is that in the twich.tv case specifically, it is a single page site. So we don't actually get onLoadRequest() for most link clicks on the site. so it is impossible to know when to not use the original URI that triggered the redirection. This also explains Fennec's similar behavior. What's needed is for onLocationChange() which does fire to include a parameter that indicates if the location change was caused by human interaction of clicking on a link or if it is just the page playing with the history.

@jvonitter jvonitter added this to the v1.5 milestone Aug 15, 2019
@bluemarvin
Copy link
Contributor

This should be fixed with #1542 so I think it might still make 1.4

@Softvision-GeluHaiduc
Copy link
Author

I have verified that this issue is no longer reproducible with the latest Firefox Reality 1.4-32312044 installed on the Oculus Go headset.
Now, the correct version of a webpage is displayed depending on the user agent selected in thew awesomebar.

@Softvision-GeluHaiduc Softvision-GeluHaiduc added the [QA]:Verified fixed Label for QA to mark verified fixed issues label Aug 20, 2019
@Softvision-GeluHaiduc Softvision-GeluHaiduc removed the QA Attention QA label Sep 18, 2019
@jvonitter jvonitter removed blocked needinfo Further information is requested labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a software or functional defect Bugzilla Main activity on this bug is in Bugzilla [QA]:Normal issue Label for QA to mark normal issues logged [QA]:Verified fixed Label for QA to mark verified fixed issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants