Enable ExtensionStorageIDB backend on Nightly

VERIFIED FIXED in Firefox 63

Status

P1
normal
VERIFIED FIXED
8 months ago
5 months ago

People

(Reporter: rpl, Assigned: rpl)

Tracking

(Blocks: 1 bug)

unspecified
mozilla63
Dependency tree / graph

Firefox Tracking Flags

(firefox63 verified)

Details

Attachments

(2 attachments)

(Assignee)

Description

8 months ago
This issue goal is enabling the ExtensionStorageIDB backend on Nightly (and it is going to depend from the bugzilla issues that have been identified as blockers for being able to enable this pref on Nightly).
(Assignee)

Comment 1

8 months ago
Added Bug 1470213, which will provide a new proposed telemetry event probe to collect some per-addon information related to the data migration.

Besides the telemetry event probe the issue also contains ongoing discussions (and preliminary patches) related to:

- some changes related to the behavior of the data migration itself (e.g. Shane would prefer if we could rename the old JSONFile after a successfull data migration, instead of removing it, which was also my original choice when we were reviewing the data migration as part of Bug 1406181)
- some additional fixes related to exceptions (like QuotaExceeededError) that may be raised when we open the connection to the IndexedDB storage
- the need for some kind of readonly access to the data storage in an existing IndexedDB storage when there are quota issues (event as a chromeOnly feature only available to the Firefox internals)

Some (or all) of these additional issues/discussiongs may be moved into their own bugzilla issue (and added to this issue ad blockers).
Depends on: 1470213
(Assignee)

Comment 2

8 months ago
Added Bug 1474557 as an additional blocker.

Bug 1474557 is actually also a regression for the storage.local API even when the Firefox profile is configured to still use the current JSONFile backend, and so it is a fix needed also on Firefox 62 beta (where Bug 1406181 has been initially landed).
Depends on: 1474557
(Assignee)

Comment 3

8 months ago
Added Bug 944918 as an additional blocker.

It is actually a generic IndexedDB issue, but I verified (currently tested manually) that it may also (unsurprisingly) affect the extensions that have been migrated to the storage.local IndexedDB backend:

creating "any unexpected file in the directory where the storage.local IndexedDB database lives" makes the ExtensionStorageIDB.open to raise an exception and prevent the extension to access the stored data.
Depends on: 944918
(Assignee)

Updated

8 months ago
Depends on: 1475306
(Assignee)

Updated

8 months ago
Depends on: 1476268
(Assignee)

Updated

8 months ago
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P1
Iteration: --- → 63.3 - Aug 6
(Assignee)

Updated

8 months ago
Depends on: 1477015
Comment hidden (mozreview-request)
(Assignee)

Updated

8 months ago
Attachment #8995278 - Flags: review?(mixedpuppy)

Comment 5

8 months ago
mozreview-review
Comment on attachment 8995278 [details]
Bug 1474562 - Enable ExtensionStorageIDB on Nightly.

https://reviewboard.mozilla.org/r/259758/#review267056

assuming this waits for bug 1477015
Attachment #8995278 - Flags: review?(mixedpuppy) → review+
(Assignee)

Updated

8 months ago
No longer depends on: 944918
See Also: → bug 944918
Comment hidden (mozreview-request)

Comment 7

8 months ago
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/8236a828c129
Enable ExtensionStorageIDB on Nightly. r=mixedpuppy

Comment 8

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8236a828c129
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
(Assignee)

Updated

8 months ago
Depends on: 1480948

Comment 9

8 months ago
Posted image Bug1474562.png
This issue is verified as fixed on Firefox 63.0a1 (20180805231147) under Win 7 64-bit and Mac OS X 10.13.3.

The preference extensions.webextensions.ExtensionStorageIDB.enabled is set to true by default.

Please see the attached screenshot.

Updated

8 months ago
Status: RESOLVED → VERIFIED
status-firefox63: fixed → verified

Updated

7 months ago
Blocks: 1427928

Comment 10

6 months ago
Is there a plan to backport this to ESR 60? 
So that users downgrading from 63+ in upcoming year (until next ESR) won't be affected by the add-on storage clear issue?
(Assignee)

Comment 11

6 months ago
(In reply to juraj.masiar from comment #10)
> Is there a plan to backport this to ESR 60? 

There are no plans to backport this to ESR 60 (the patch attached to this bug contains only the single line
change needed to turn on the storage.local backend in Nightly on 63, but the actual feature is composed by a bigger amount of changes, too much to be reasonable to think about backporting them on the previous Firefox versions).  

> So that users downgrading from 63+ in upcoming year (until next ESR) won't
> be affected by the add-on storage clear issue?

In general downgrading a Firefox profile from a new to an older Firefox version is not advisable (and not supported),
because the differences between the two versions may potentially (and very likely) trigger in the profile 
a number of unexpected issues (which will be pretty hard to reproduce and/or investigate).

May I ask which is the bugzilla issue number related to the add-on storage clear issue you are mentioning
above (if there is one that you are referring to)?

(I'd like to double-check if it is actually something that is meant to be fixed by the new storage.local backend,
or if it is an additional or an unrelated issue).

Comment 12

6 months ago
I'm not sure there is a bugzilla page for that, but it's a real thing. I got here through Caitlin's link here:
https://discourse.mozilla.org/t/downgrade-from-firefox-63-clears-local-storage-of-all-add-ons/30753/6
But first time I read it here:
https://www.ghacks.net/2018/08/06/dont-downgrade-firefox-63/
(Assignee)

Comment 13

6 months ago
(In reply to juraj.masiar from comment #12)
> I'm not sure there is a bugzilla page for that, but it's a real thing. I got
> here through Caitlin's link here:
> https://discourse.mozilla.org/t/downgrade-from-firefox-63-clears-local-
> storage-of-all-add-ons/30753/6
> But first time I read it here:
> https://www.ghacks.net/2018/08/06/dont-downgrade-firefox-63/

The new storage.local backend has been enabled for the first time in 63, but only on the Nightly channel,
it is not enabled on the released and beta versions of Firefox 63.
And so there is not the storage.local backend used in Firefox 60 ESR and the non-nightly
versions of Firefox 63 is the same one (the one based on the JSON file).
(Assignee)

Comment 14

6 months ago
(In reply to Luca Greco [:rpl] from comment #13)
> And so there is not the storage.local backend used in Firefox 60 ESR and the
> non-nightly
> versions of Firefox 63 is the same one (the one based on the JSON file).

Ouch, I just noticed that I made a typo in my previous comment, here is what I actually meant:

the release version of Firefox 63 and Firefox 60 ESR both use the same storage.local backend
(the one based on the JSON file).
QA Contact: ddurst

Comment 15

6 months ago
I see, so the problem could affect only Nightly users, right? Then the article is a bit misleading...
So when is this gonna activate in Beta / Release channels?

So far I've received only few reports from users of my addon that lost their data - but they were able to restore them from backup feature I've build using IndexedDB API (which persists even after downgrade).
(In reply to juraj.masiar from comment #15)
> I see, so the problem could affect only Nightly users, right? Then the
> article is a bit misleading...
> So when is this gonna activate in Beta / Release channels?
> 
> So far I've received only few reports from users of my addon that lost their
> data - but they were able to restore them from backup feature I've build
> using IndexedDB API (which persists even after downgrade).

This problem will only affect Nightly users until we enable it on other channels. Which we would like to do as early as 64 beta, but release will not see it until 65.

But, again, issues that users have from downgrading are not something we can completely support. We are trying to minimize any issues with migrating (and I'm not sure why someone would downgrade from, say, 65 to 63 or to 60ESR), but my only concern here would be if your users are experiencing dataloss with your extension as part of *migrating* to IDB.

Comment 17

5 months ago
One question though - I was contacted by one user that lost add-on data due to normal Firefox upgrade to 63.0. Is that possible? He said he didn't tried Beta or Nightly.

And he was able to restore his data using my history (backup) feature in my add-on that stores backups in IndexedDB.

Actually the few other users that reported data loss before also claimed they didn't installed Beta or Nightly. (these reports started only several weeks ago). Also note that my add-on is used by 50k users so few users is not much.

Comment 18

5 months ago
Please disregard my last message, I found a bug on my cloud server that is most probably responsible for the data loss :(
You need to log in before you can comment on or make changes to this bug.