Closed Bug 930474 Opened 11 years ago Closed 6 years ago

AMO themes ping count differs from FHR Themes info on Fennec / Android

Categories

(Toolkit :: Add-ons Manager, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: rfradinho, Unassigned)

Details

Metrics is collecting AMO pings for Themes usage.
Currently, there's about 200 daily AMO pings for Themes on Fennec.

Richard Newman has compared the values we get on AMO pings and the ones from FHR submissions:

"The data we have from FHR says that we have somewhere in the region of 130,000–180,000 users with themes installed on Android. (0.88% of reported documents have 1 theme, 0.22% have 2, a long flat tail has more — up to 30+ themes — and more than 98% have no theme installed.)

So one of these things is true:

• 99.9% of those users have the themes installed but disabled, if I'm right in assuming that disabled add-ons and themes don't send a ping, or
• 99.9% of our users don't have Gecko running on any particular day for long enough to send an update ping to AMO, or
• Fennec isn't sending update pings for some other reason, or
• AddonManager is lying to FHR on 99.9% of Firefox installs, or
• You're tracking XUL Fennec installs, or
• AMO isn't recording, or your analysis isn't picking up, the update pings."
I've been tracking a Fennec phone in the (V)AMO logs and there's no record of any update_check ping.
Can you check that Fennec is pinging the update_check ?
Raw speculation: any update ping designed for desktop Gecko use is going to have a bad time on Android. Gecko doesn't run all the time, it gets killed frequently, etc. 

So even if update pings occur, they won't be reliable. They'll also savagely murder a user's battery.

How can we put the browser into a situation in which it ought to send an update check? What should we look for?
Yeah, we were wondering about this a few months ago, but I didn't have time to look into it and it fell off my radar.

There are a few things to consider:

1) On desktop, persona update pings only happen for the currently active theme. If those are the pings that you're looking at, then the assumptions in your first bullet point might be correct. I haven't looked into the implementation on Fennec yet, though.

2) The numbers that I was looking at when this issue came up were not update pings, but metadata pings. I don't remember whether the issue was that we weren't getting the expected number of pings, or that they just didn't include the expected number of personas. I'll have to check again.

3) AMO recording pings isn't an issue. AMO doesn't track update pings internally. It relies on analysis of server logs that happens externally.

So, to clarify some of the above, can you be a bit clearer about which data you're looking at when you look at update pings, and how you're analyzing it?
Hi Kris. I'm talking about the information on the server logs you mentioned at 3). I've checked that there are no update check verifications in the weblogs though I using for 15-30m. The blocklist pings are there and appear quite fast after I start Fennec.
So I suspect that there are no persona update pings as there are in desktop version. Can this be confirmed ?
mfinkle, you landed Bug 551709 and Bug 596130. Can you explain how LWT add-on update checks work on Fennec?
Flags: needinfo?(mark.finkle)
OS: Mac OS X → Android
Hardware: x86 → All
(In reply to Richard Newman [:rnewman] from comment #5)
> mfinkle, you landed Bug 551709 and Bug 596130. Can you explain how LWT
> add-on update checks work on Fennec?

The add-on update check is not LWT specific. It's the same for all add-ons.

Back when Fennec was new, we decided that add-on updates should just-happen. Pressing buttons and looking in the add-on manager was silly, especially when 99% of our users don't care - they just want the stuff to work.

So, we disabled the normal extensions.update.enabled pref and created a new extensions.autoupdate.enabled pref. We hooked this to the AddonUpdateService component, which when triggered by a timer, will use the AddonManager module to fetch updates for any installed add-ons.

The timer is the same system that the toolkit add-on update system and the blocklist system use. It's based on the app.update system and is setup here:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/MobileComponents.manifest#76

The app.update system waits until the application has been running for 30 seconds, then kicks off it's "timer checks" for add-on updates and blocklist checks. Those timers usually say "only fire me once every 86400 seconds (once a day)". So if a users uses Fennec for more than 30 seconds, once a day, it's very likely that Fennec will attempt to auto-update add-ons, including LWTs.

That said, the AddonUpdateService code path might not be triggering the same URL pings that the non-auto update system uses. That would mean that it's possible that AMO server logs are not seeing the data it's expecting for AMO pings.

We could try to correct that.
Flags: needinfo?(mark.finkle)
OK, so I looked into this a bit. Persona update is triggered explicitly by the add-on manager's background update check code, governed by the extensions.update.enabled pref. That pref is false on Fennec, though, and completely different code, governed by the extensions.autoupdate.enabled pref, is used instead. So if we want persona updates, and update-based usage numbers, we need to update that code to call LightweightThemeManager.updateCurrentTheme()
Ah, I'm late.
Mark, is there a particular reason for the new codepath other than silent updates? The behavior on desktop has been silent, background updates for a while now. Is there something that would prevent us from switching back to that process on Fennec?

Blair, Mossop, thoughts?
(In reply to Kris Maglione [:kmag] from comment #7)
> So if we want persona updates, and update-based usage
> numbers, we need to update that code to call
> LightweightThemeManager.updateCurrentTheme()

Sounds reasonable
(In reply to Kris Maglione [:kmag] from comment #9)
> Mark, is there a particular reason for the new codepath other than silent
> updates? The behavior on desktop has been silent, background updates for a
> while now. Is there something that would prevent us from switching back to
> that process on Fennec?
> 
> Blair, Mossop, thoughts?

I don't know the details about the current silent background updates on desktop, but I would be OK with trying to get back on that codepath.

The Fennec code does update a local cache of featured add-ons as well, but I assume we could get that done other ways.
Flags: needinfo?(dtownsend+bugmail)
Yeah the desktop update path is completely silent these days, I don't know of a reason for Fennec to not use it and can think of many reasons why they should.
Flags: needinfo?(dtownsend+bugmail)
Moving this to toolkit, since the problem is client-side.
Component: Blocklisting → Add-ons Manager
Product: addons.mozilla.org → Toolkit
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.