Android icon indicating copy to clipboard operation
Android copied to clipboard

[Bug] Mobile site doesnt load intended content

Open ghost opened this issue 1 year ago • 3 comments

Describe the bug

  1. Go to https://git.sr.ht/ gets seemingly random text
  2. Click Menu Desktop Site to get expected content.

How to Reproduce

Image

Expected behavior

Image

Environment

- DDG App Version:5.225.0
- Device:Samsung xCover 7
- OS: Android 14

ghost avatar Feb 07 '25 21:02 ghost

Thank you for opening an Issue in our Repository. The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate. As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.

github-actions[bot] avatar Feb 07 '25 21:02 github-actions[bot]

Thank you for reporting this issue. It appears that the website is blocking requests (serving alternative content) based on the User-Agent header we use.

I was able to reproduce this issue only when using this exact User-Agent value: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36.

Enabling desktop mode changes the User-Agent value, allowing you to bypass the restriction. Since the blocked User-Agent header value contains an outdated WebView version (131.x), updating the WebView component on your device to a newer version should resolve the issue and enable access to the website without having to switch to desktop mode.

lmac012 avatar Feb 13 '25 21:02 lmac012

Am I to understand the Desktop Mode changes this WebView section in the User-Agent?

This is what DDG search engine returns to me

Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.0.0 Mobile DuckDuckGo/5 Safari/537.36 And this is on desktop site

Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.0.0 DuckDuckGo/5 Safari/537.36'

Is the fingerprint resistant feature doing something w/o being enabled? Why should the user-agent differ? Isnt it the same application?

ghost avatar Feb 14 '25 18:02 ghost