uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
945 stars 81 forks source link

InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. #141

Closed daspri closed 6 years ago

daspri commented 6 years ago

Prerequisites

Description

Fails to update filters

A specific URL where the issue occurs

moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/dashboard.html

Steps to Reproduce

Open Firefox's "Browser Console" to see the error

  1. Go to Filter Lists
  2. Click 'Update Now'

Expected behavior:

Filters should update.

Actual behavior:

Filters do not update.

XHRGET https://raw.githubusercontent.com/gorhill/uBlock/master/assets/assets.json?_=212819
XHRGET https://publicsuffix.org/list/public_suffix_list.dat?_=212819
XHRGET https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt?_=212819
XHRGET https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt?_=212819
XHRGET https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt?_=212819
XHRGET https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt?_=212819
XHRGET https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt?_=212819
XHRGET https://easylist.to/easylist/easylist.txt?_=212819
15:53:46.412 [uBlock0CacheStorage] <unavailable>
vapi-cachestorage.js:94:9
genericErrorHandler
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/vapi-cachestorage.js:94:9
XHRGET https://easylist.to/easylist/easyprivacy.txt?_=212819
[HTTP/2.0 200 OK 16ms]
15:53:46.993  InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. vapi-cachestorage.js:230
putToDb/<
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/vapi-cachestorage.js:230:17
getDb
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/vapi-cachestorage.js:115:20
putToDb
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/vapi-cachestorage.js:219:9
set
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/vapi-cachestorage.js:77:9
onReady
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:533:9
getAssetCacheRegistry
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:426:9
assetCacheWrite
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:536:5
onRemoteContentLoaded
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:791:9
onLocalLoadSuccess
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:217:9
onLoadEvent
moz-extension://d879bf29-1bac-4212-8cbb-be53485d7ab0/js/assets.js:128:9

Your environment

uBlock Origin v1.16.14 Firefox 61.0.1 Windows 7 x64

gwarser commented 6 years ago

Downgrade to the latest legacy (XUL) version, 1.16.4.4, installable on 52.9.0 - sadly, it isn't backwards compatible with the WE versions, hence I'd have to reconfigure it from scratch...

This is recommended. You can export your settings to file and import in new installation.

gwarser commented 6 years ago

I only get this in console in 64bit Firefox:

ReferenceError: WebAssembly is not defined[Learn More] lz4-block-codec-wasm.js:126:1

Filters are not updated, something may be wrong with fallback js code.

You may experience this https://github.com/uBlockOrigin/uBlock-issues/issues/150

MDN says:

WebAssembly.Instance Disabled in the Firefox 52 Extended Support Release (ESR).

After switching on javascript.options.wasm I get now:

Error: LZ4BlockWASM: not initialized lz4-block-codec-wasm.js:166:19

BTW, this issue is resolved, you should create new one.

Vangelis66 commented 6 years ago

@gwarser

Huge thanks for taking the time looking into my reported issue 👍

Filters are not updated, something may be wrong with fallback js code.

You may experience this #150

I read all the discussion there, but I got the sense - I could be wrong, I know nothing about javascript language - that it did not pertain directly to my problem, despite being a FxESR 52.9.0 issue (but on Linux...); thanks all the same for the reference!

WebAssembly.Instance Disabled in the Firefox 52 Extended Support Release (ESR).

After switching on javascript.options.wasm

For some obscure reason, I had already

javascript.options.wasm;true
javascript.options.wasm_baselinejit;true

inside about:config; I don't recall me toggling those specific prefs (but I may have simply forgotten, as the ESR cycle is many months old...), so perhaps this is possibly the work of an extension?

BTW, this issue is resolved, you should create new one.

... Because of my marginal setup (EOL'd Windows OS, soon-to-be EOL'd Fx version, 32-bitness of OS (hence browser)), I wasn't really sure, to begin with, whether the new "compressing" code was meant to be compatible with my setup (or even tested in a non-Quantum Fx flavour and/or in a 32-bit browser build), so I opted to first post here, apologising in advance if inappropriate 😉 ... Once confirmed here this was a genuine new bug the devs were interested looking into, I'd have gladly created a new (separate) issue for it... But I was preempted by events:

https://github.com/gorhill/uBlock/commit/3c187c627802d457b6af312d4ea0ab8dbee7788f

@gorhill

I just updated to the newest dev build, v1.16.21b1 and can confirm that filter lists update now works as it should with cacheStorageCompression=true; attaching Browser Console excerpt as proof: 17_01_38.847 GET.txt

A sterling job indeed, hugely valued! 👍 🥇

Vangelis66 commented 6 years ago

@gwarser

You can export your settings to file and import in new installation.

Thanks for this tip, I'm sure I knew it already, but (originally) posting late at night and under some frustration doesn't help much in my growing age...

Just to confirm, do the filter-list storage files the WE version saves inside ./profile/storage/default/* get somehow translated to the format of files the XUL version stores inside ./profile/extension-data/* when one downgrades from WE -> XUL and imports settings, as per your suggestion?

gwarser commented 6 years ago

Settings exported by clicking in uBO Settings tab on "Back up to file" button will be saved in special portable text format (json) and will contain all uBO settings and addresses of filter lists you are subscribed to. One thing missing will be your statistics (request blocked since install).

resistor4u commented 6 years ago

I'm on 1.16.20 on Firefox 61.0.2 on Mac OS 10.11.6, and I'm unable to set cacheStorageCompression true in the Advanced settings - when I add and apply the settings, cacheStorageCompression disappears. Anyone else getting this?

gwarser commented 6 years ago

This feature is in beta tested now. You can install uBO development builds for Firefox from here https://github.com/gorhill/ublock/releases

resistor4u commented 6 years ago

@gwarser if so, then perhaps the wiki documentation (https://github.com/gorhill/uBlock/wiki/Advanced-settings) should be changed? There, it says the feature is for "uBO 1.16.17b and above."