Closed Rightusername closed 3 years ago
I had to investigate this for my extension and I have found that the function browser.storage.local.set
of Firefox doesn't work properly when giving the state of the store. I think it just doesn't support the proxy which Vue uses for the reactivity of its object. My solution was to modify the library and add a JSON.stringify
followed by JSON.parse
browser.js:
else if (this.browser == browsers.firefox) {
try {
browser.storage.local.set({
'@@vwe-persistence': JSON.parse(JSON.stringify(datas))
});
} catch (err) {
Logger.error(`Can't write persistent states to local storage. Did you grant storage permission to your WebExtension?`);
}
I should investigate it, on the past, I remove any extra serialization because Firefox handle it automatically and just do redundant steps decreasing the performance of the plugin.
On my investigation, seems related with issue #29, I still debugging and trying to fix this, we continue this on issue #29
Firefox version: 76.0.1 OS: windows 10 64-bit
...
After reloading extension or turn off/on, "storage" object is undefined In Chrome and Edge it works fine