
Loading…
Restoring mechanism isn't restoring whitelist list #402
I tried restoring and it worked fine from here. I would have to try your backup, but then there are privacy issues. Your call.
In the process of trying to minify the backup file from other content than whitelist sites, I was successful in substituting it so that the whitelist sites got restored.
To what email address can I send the 2 files?
Thanks.
Send them to rhill@raymondhill.net. Thanks.
Sent.
Hope it will get us somewhere :)
Ok, the problem occurs when one (or more) of the filter lists timeout at fetch time. This seems to happen often with http://hosts-file.net/.%5Cad_servers.txt.
The whitelist is loaded in memory, but after all the filter lists are loaded. So if one or more of these lists timeout (currently 15s), than the loading of the whitelist will be delayed, but it definitely does load in memory, just in a delayed fashion.
So either the loading of the whitelist should be held before the loading of the filter lists, or there is a need for some skip logic if timeout occurs?
I've reversed the order, the whitelist will be loaded before the filter lists, but in any case, uBlock as a whole works as expected when everything is loaded anyways, so it's not like this solves really anything.
Fetching from the net has its limitation, and we have to accept these. This is the reason why I ship with the most important lists, to have something to fall back on when it can't be fetched.
With or without the reverse, the advice would be to wait for at least 15s before opening uBlock's dashboard.
No one really knows about the 15s mark (including myself) because it's not noted or written anywhere..
I think there should be some indication if the backing up process is still executing so that the user will know it's still working.
This way, you will also have some layer of user debugging if something will be broken with the backing up process when users will report about some malfunction in it.
Also, in my case the whitelist never gets populated, even after waiting more than 2 minutes..
so I hope this can solve this issue.
never gets populated, even after waiting more than 2 minutes
Even after forcing a reload of the dashboard tab?
Clarifying:
After the closure of the dashboard, waiting for approximately 2 minutes, and then bringing up the dashboard for the first time, no whitelist entries were shown.
Hitting F5 on the dashboard doesn't help.
Ok I will look further into this. I did fix something weird going on with the asset caching, but I thought this was caused by me stepping through the code -- which often causes unexpected side effects when async function calls are involved.
Unfortunately I still see this issue with v0.8.1.2
After the closure of the dashboard, waiting for approximately 2 minutes, and then bringing up the dashboard for the first time, no whitelist entries were shown
Ok, I had not looked into this since you posted the above, will look into this now.
Finally, it seems to work when restoring the file in µBlock v0.8.2.1-rc.1
Good. I have added code to fix weird cases where a resource was saved with empty content. Not sure what can create this. In any case, whatever the reason, invalid content won't be cached as valid cache of a remote resource.
I suspected originally it was because I was stepping through the code while async operations were going on in the background. Did you happen to step into the code while resources were fetched from remote servers?
I actually didn't get to the debugging stage, but it seems logical that because of the nature of async operations, it lead to some malfunction data at some crucial assertion point reliably on my machine.
When making a restore file with 0.7.2.1 version, whitelist sites aren't populated.
The "netWhitelist" list is there in the backup file, but not on the list in the settings and when browsing to the sites, they are not whitelisted (power button isn't grayed out).
p.s.: Backing up and restoring only the whitelist rules by using Export/Import and append works well.