Den här webbplatsen har begränsad funktionalitet medan vi utför underhåll för att förbättra din upplevelse. Om en artikel inte löser ditt problem och du vill ställa en fråga har vi vår gemenskap som väntar på att hjälpa dig på @FirefoxSupport på Twitter, /r/firefox på Reddit.

Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

How to prevent Firefox from removing my extension's data when I remove debug version?

  • 2 svar
  • 1 har detta problem
  • 1 visning
  • Senaste svar av SergeyDevZ

more options

I have an extension with id setup in manifest like this:

``` "browser_specific_settings": {

   "gecko": {
     "id": "{e3ec45ef-43ba-499d-8469-6d0e2f06921f}",
     "strict_min_version": "42.0"
   }
 },

```

which uses indexedDB(PouchDB). I installed that extension from addons.mozilla.org, disabled, installed temporarily version for developing and Firefox removes data of both extensions(cuz they have the same id) every time I remove only temporarily version.

This does not happen when I don't set id in manifest(temporarily version has random id in this case), but it's not a solution cuz some API's and Android version of Firefox requires id to be set manually

How to prevent Firefox from removing data of normal extension when I remove temporarily one?

Just in case someone wants to reproduce the issue:

1. Install this extension https://addons.mozilla.org/en-US/firefox/addon/tagit/?src=search
2. Go to extension's page (button with eyes on browser's panel)
3. Go to "Tags" page and create any tag(write something and press Enter)
4. Disable this extension on about:addons page
5. Clone its repository and checkout to commit where id is in manifest `git clone https://github.com/DevAlone/tagit.git; git checkout 8e0d04201865fd7b7543b167279a045c89408d5c`
6. Install dependencies and build `npm install; npm run build`
7. Install that temporarily extension(`build` dir) on about:debugging page
8. Remove that temporarily extension on about:debugging page
9. Enable normal extension on about:addons page
10. Go to the Tags page again to see that database is gone
I have an extension with id setup in manifest like this: ``` "browser_specific_settings": { "gecko": { "id": "{e3ec45ef-43ba-499d-8469-6d0e2f06921f}", "strict_min_version": "42.0" } }, ``` which uses indexedDB(PouchDB). I installed that extension from addons.mozilla.org, disabled, installed temporarily version for developing and Firefox removes data of both extensions(cuz they have the same id) every time I remove only temporarily version. This does not happen when I don't set id in manifest(temporarily version has random id in this case), but it's not a solution cuz some API's and Android version of Firefox requires id to be set manually How to prevent Firefox from removing data of normal extension when I remove temporarily one? Just in case someone wants to reproduce the issue: 1. Install this extension https://addons.mozilla.org/en-US/firefox/addon/tagit/?src=search 2. Go to extension's page (button with eyes on browser's panel) 3. Go to "Tags" page and create any tag(write something and press Enter) 4. Disable this extension on about:addons page 5. Clone its repository and checkout to commit where id is in manifest `git clone https://github.com/DevAlone/tagit.git; git checkout 8e0d04201865fd7b7543b167279a045c89408d5c` 6. Install dependencies and build `npm install; npm run build` 7. Install that temporarily extension(`build` dir) on about:debugging page 8. Remove that temporarily extension on about:debugging page 9. Enable normal extension on about:addons page 10. Go to the Tags page again to see that database is gone

Vald lösning

Hi Sergey,

you can prevent the browser from clearing local storage on uninstall by visiting "about:config" and setting the following two browser preferences to true: "keepUuidOnUninstall" and "keepStorageOnUninstall". This feature is provided to help developers test their extensions. Extensions themselves are not able to change these preferences.

Läs svaret i sitt sammanhang 👍 1

Alla svar (2)

more options

Vald lösning

Hi Sergey,

you can prevent the browser from clearing local storage on uninstall by visiting "about:config" and setting the following two browser preferences to true: "keepUuidOnUninstall" and "keepStorageOnUninstall". This feature is provided to help developers test their extensions. Extensions themselves are not able to change these preferences.

more options

TyDraniu said

Hi Sergey, you can prevent the browser from clearing local storage on uninstall by visiting "about:config" and setting the following two browser preferences to true: "keepUuidOnUninstall" and "keepStorageOnUninstall". This feature is provided to help developers test their extensions. Extensions themselves are not able to change these preferences.

Awesome, thanks! It solved the problem.