Skip to content

Instantly share code, notes, and snippets.

@cramforce
Created Feb 22, 2017
Embed
What would you like to do?
We are seeing this Firefox bug (or a variant of it) get triggered https://bugzilla.mozilla.org/show_bug.cgi?id=548397
This showed up in our error reporting and the stack trace format is clearly a Gecko stack trace.
Example URL https://m-wikihow-com.cdn.ampproject.org/v/m.wikihow.com/Dress-for-Skiing?amp=1&amp_js_v=7 embedded as an iframe on https://www.google.com
The UAs are sometimes:
Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36"
And more often:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
@karlcow

This comment has been minimized.

Copy link

@karlcow karlcow commented Feb 22, 2017

@cramforce

This comment has been minimized.

Copy link
Owner Author

@cramforce cramforce commented Feb 22, 2017

That is the point. But we know that the browser is Firefox, so we are wondering why a lot of Firefoxes use a non-Firefox UA.

@cramforce

This comment has been minimized.

Copy link
Owner Author

@cramforce cramforce commented Feb 22, 2017

Our theories:

  • Firefox for Android cloaks itself when accessing www.google.com
  • A bot based on Firefox
  • A popular Firefox extension generates those UAs.
@karlcow

This comment has been minimized.

Copy link

@karlcow karlcow commented Feb 22, 2017

@cramforce I must be thick. but how do you know it's Firefox. You said:

stack trace format is clearly a Gecko stack trace

What do you see in your logs? An example? For example on the Chromium bug, it shows it had been deployed at a point that would create the same issue than Firefox.
When you say a lot, you mean more than Firefox Android UA usage? In this case I doubt it is something coming from Mozilla.

The UA override list for Firefox Android is public
https://hg.mozilla.org/mozilla-central/raw-file/tip/mobile/android/app/ua-update.json.in

  • It doesn't have the two user-agents you gave
  • it doesn't operate on google.com

Before b2g (aka Firefox OS) went RIP, the UA override list was
https://dxr.mozilla.org/mozilla-central/source/b2g/app/ua-update.json.in
and didn't contain google.com either.

For all UA overrides with Google and services, we directly negotiate with google on a specific mailing-list. So that would have been known if there was an issue.

All of that said, I wish I understand better your issue on how to help you.

@cramforce

This comment has been minimized.

Copy link
Owner Author

@cramforce cramforce commented Feb 23, 2017

The reason why we know it is Firefox is because the error report we receive uses Firefox's stack trace format, which is distinctly different from Chrome and WebKit. We don't really have an immediate problem. The issue is clear in terms of how we can fix it (although we might have found a new bug in Firefox), we were just wondering why we see these UAs, as that drove our debugging session into the wrong direction.

@karlcow

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment