electron-vue
electron-vue copied to clipboard
error occurred in the main process when call ipcRenderer.send
Found an issue or bug with electron-vue? Tell me all about it!
Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.
Describe the issue / bug.
#
A Java Script error occurred in the main process
Uncaught EXception : TyPeError: Insufficient number of arguments .
at EventEmitter.eval(webpack:///./src/main/index.js?:58:14)
at emitTwo (events.js:126:13)
at EventEmitter.emit (events.js:214:7)
at WebContents.
How can I reproduce this problem?
# ==>rendere code:==== `
===main code===
ipcMain.on('createNewWindow', (event, arg) => { console.log(event) console.log(arg) // if (windows[arg] !== undefined) return const session = require('electron').session var webSession = session.defaultSession webSession.setProxy({ pacScript: path.join('file://', __dirname, '/proxy.pac') }) windows[arg] = new BrowserWindow({ width: 800, height: 600, frame: false, webPreferences: { preload: path.join(__dirname, 'preload.js'), webviewTag: true, session: webSession } }) windows[arg].loadURL('https://www.baidu.com') windows[arg].on('close', () => { windows[arg] = null }) })
If visual, provide a screenshot.
#

Tell me about your development environment.
- Node version:8.9.3
- NPM version:6.10.1
- vue-cli version: (if necessary) 2.6.11
- Operating System:Debian 7.3.0-19
- Vue.js:2.6.11
- Electron:2.0.18
- Platform:linux
If you are looking to suggest an enhancement or feature, then feel free to remove everything above.
update Electron version , maybe