The bug happens when:
- The signature of a xpi is invalid (e.g. by bug 1548973 without any fix (hotfix or bug 1549061)).
- The last modified date of the xpi does not match with the one in our database.
- Firefox restarts.
About mismatch last modified date (
- In my STR, I used
faketime (on Linux) to run Firefox in the past without changing the clock of the system. This resulted in an observable difference in
- When I change the system-wide clock, the
mtime does not change. (tested on Linux and macOS)
- When the xpi (or even the whole profile directory) is modified or copied without preserving timestamps, the bug will be triggered.
(In reply to Andrew Swan [:aswan] from comment #1)
The stack trace (plus additional information provided offline by Rob) implies that we are scanning for sideloads.
I checked again, and from the stack trace it is obvious that we are not scanning for sideloads.
The stack trace from comment #0 clearly points to
startup as the caller of
getNewSideloads. Being called from
startup is normal, especially with the schema bump.
The reason for not seeing the measure you were asking for is not recorded by default on release builds. When I enable extended recording on release, I do get
XPIDB_startup_load_reasons = [directoryState].
When I dig a bit deeper, I see that the xpis are considered changed because the mtime changed. In my test case, I created the first version of the profile with
faketime, and the mtime difference matches with what I had set.
When I fix up the timestamps before starting Firefox again with the correct time, then the add-on package is preserved.
(In reply to voltron from comment #6)
We already got several reports from users that Firefox has removed our extension completely.
Do you know whether they tried to copy or modify their Firefox profile? Maybe manually or by some other external software?
Is there something I can do as a developer? For instance submit a new version with the ID in the manifest.json?
When this bug happens, the add-on entry has been deleted from the user profile. Your updates won't reach the user in this case.
Or should I just do nothing and hope that I won't lose vast majority of my users?
There is nothing that you can do to work around this bug. You can try to assess the impact by looking at the statistics dashboard of your add-on, at
https://addons.mozilla.org/developers/firefox/addon/<your addon sug here>/statistics, and check if the number of daily users drops significantly compared to before. Make sure to look at the graph of multiple weeks, to account for expected deviations (e.g. fewer users in the weekends/holidays compared to weekdays).