Failed to read the 'localStorage'
See original GitHub issueDescribe the bug Everything works just fine in development mode but I’m getting this error in the devtools console after building my app: Uncaught DOMException: Failed to read the ‘localStorage’ property from ‘Window’: Access is denied for this document. at app://./js/chunk-vendors.0b3afa94.js:175:17895 at Object.b25c (app://./js/chunk-vendors.0b3afa94.js:175:18055) at l (app://./js/app.a7acfa50.js:1:618) at Module.56d7 (app://./js/app.a7acfa50.js:1:7568) at l (app://./js/app.a7acfa50.js:1:618) at Object.0 (app://./js/app.a7acfa50.js:1:3170) at l (app://./js/app.a7acfa50.js:1:618) at n (app://./js/app.a7acfa50.js:1:388) at app://./js/app.a7acfa50.js:1:3135 at app://./js/app.a7acfa50.js:1:3140
To Reproduce npm run electron:build and then open the the app
Expected behavior Get access to LocalStorage
Environment (please complete the following information):
- OS and version: Linux Ubuntu Studio 18.10
- node version: 12.1.0
- npm version: 6.9
- yarn version (if used): 1.10.1
- vue-cli-plugin-electron-builder version : 1.3.1
- electron version: 5.0.0
- other vue plugins used: vue-router, vuex, vuex-persistedstate, heap/electron-cookies (is not a vue plugin but could relate with the issue), vuetify, cli-babel and eslint. Theres also electron-rebuild (the only way I could find to correctly complite the native dependency “serialport”)
- custom config for vcp-electron-builder:
module.exports = {
pluginOptions: {
electronBuilder: {
// List native deps here if they don't work
externals: ['serialport', 'osc'],
nodeModulesPath: ['./node_modules']
}
}
}
- (if possible) link to your repo: https://github.com/gilfuser/deslugarejo/tree/backendless
Additional context This only started after I changed to electron 5.0.0 and node 12.0.0. Later, to correct another problem, namely an “error 138” while trying to build the app I updated it to 12.1.0.
Thank you for this project. Since now I’m having a solid experience with it.
best regards, Gil
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)

Top Related StackOverflow Question
background.js use
standard: true,registerSchemesAsPrivilegedwas no help … in my case, i had to runelectron-builder