Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
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 when i use the tinymce4.7.5 and cookie
tinymce.min.js:2 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. at app://./static/tinymce4.7.5/tinymce.min.js:2:334766 at app://./static/tinymce4.7.5/tinymce.min.js:2:337378
Uncaught DOMException: Failed to read the 'cookie' property from 'Document': Access is denied for this document. at Function.i [as set] (app://./js/chunk-vendors.8d12f151.js:70:1078) at Function.i.get (app://./js/chunk-vendors.8d12f151.js:70:1494) at v (app://./js/app.58b4478d.js:1:68573) at Object.9923 (app://./js/app.58b4478d.js:1:68773) at r (app://./js/app.58b4478d.js:1:2352) at Module.d9cd (app://./js/app.58b4478d.js:1:122194) at r (app://./js/app.58b4478d.js:1:2352) at i (app://./js/app.58b4478d.js:1:120363) at app://./js/app.58b4478d.js:1:29578 at Array.reduce (<anonymous>)
To Reproduce yarn electron:build and then open the the app
Expected behavior Get access to LocalStorage and Cookie
Screenshots

Environment (please complete the following information): OS and version: windows vs code node version: 12.1.0 npm version: 6.9 yarn version: 1.10.1 vue-cli-plugin-electron-builder version : 1.3.1 electron version: 5.0.1
vue.config.js: `‘use strict’ const path = require(‘path’)
function resolve(dir) { return path.join(__dirname, dir) }
module.exports = { pluginOptions: { electronBuilder: { outputDir: ‘build’, externals: [‘localStorage’, ‘cookie’], chainWebpackRendererProcess: config => { // set svg-sprite-loader config.module .rule(‘svg’) .exclude.add(resolve(‘src/icons’)) .end() config.module .rule(‘icons’) .test(/.svg$/) .include.add(resolve(‘src/icons’)) .end() .use(‘svg-sprite-loader’) .loader(‘svg-sprite-loader’) .options({ symbolId: ‘icon-[name]’ }) .end() } } } }`
Additional context I tried to introduce tinymce in the basic framework, and the same error will occur.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)

Top Related StackOverflow Question
These was caused by the
app://scheme not being registered as standard. This is fixed as of version1.3.2. If you were previously using an older version, you must manually update yourbackground.js:How to fix the error in usual electron.js?