
Loading…
Backing up settings isn't working under certain circumstance #307
Works from here. Can you give me the exact steps to repro what you see?
Hmmm..that's strange..
The issue I am having is not with the restore of Dynamic filtering feature, but with the restoring process itself it seems..
If I pack manually the extension from Github, and install it along with the "original" release that I already had before, and then try to restore the settings from the backup file that was created with the "original" extension to the newly packed extension (When the "original" extension is disabled, and the packed one is enabled of course), there is no error/reload of the extension when restoring the backup file, e.g., some uncaught error seems to happen..
BUT
If I first delete the "original" extension, and then try to backup from the same "original" created backup file, it works like charm.
It's not very typical for people to do like I did (I did it purely for testing purposes), and it's an end usage behavior, but it's still an issue of itself.
install it along with the "original"
Do you mean "load unpacked extension..." from the extension page?
No, I packed the extension beforehand.
And then installed it by draging & dropping the crx file to the extensions list.
I packed the extension beforehand
I just tried this, and it all went well, all was restored properly.
There is an assumption I made in the code when restoring, which is that if I force a restart of the extension, all what has been written to the local storage will be properly flushed to physical storage before exiting the extension. I am wondering if this is the case.
"...I just tried this, and it all went well, all was restored properly."
Did you deleted the "original" extension when the newly packed extension was already installed or before that?
If before, do it AFTER you have installed the packed extension:
1) Try to restore the backed up file to the packed extension - Fail.
2) Delete the original extension.
3) Try again restoring the backed up file to the packed extension - Success.
I didn't delete the original.
It worked for you when both the original and the packed extension were installed?
Original extension was in disabled mode when you have tried to restore the backed up file in the packed extension?
Almost yes to both. I use my own local version, not the one from the store. I will install from store and see what happens.
Worked fine as well.
The extension id of the store version is cjpalhdlnbpafiamejdnhcphjbkeiagm. The extension id of the one I manually packed is pafnjpemcoalhmcdfgjaoboeadhefbma (I suspect this last one will be different every time it is "dropped").
So long as the extension ids are different, their storage should not interfere at all.
If you can reproduce systematically, I have a patch which I want you to try. I will commit the changes if you confirm you reproduce all the time.
Erm.. I was able to reproduce it once more, but somehow can't now.
I need to check what is that thing that makes it unrestorable :(
Well, it's just not consistent..
I am doing the same steps every time, but the problem occurs one time, but when I repeat the same process, the settings are restored as should..
Maybe it's because of the auto-update mechanism that is blocking the restoring process?
I am trying to restore the settings everytime some seconds after installation of the packed extension...
Auto-update occurs minutes after the install, and anyways, it tries to auto update only filter lists, settings are left untouched.
The symptoms are consistent with the data not being flushed to physical storage before extension is restarted, the result depends a lot on environment: physical storage speed, CPU, idleness, etc.
When backing up uBlock to file from the About tab, there are no "Dynamic filtering" rules, e.g. default/custom domain script/frame settings.