-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windowManager emit getting error #34
Comments
Hello :)
I guess i'll check the source code to see if there is a bug ? Edit : Weird. Maybe because de BrowserWindow is not fully loaded ? |
I worked around it by specifying the emmiter: You can then use emit with It's hacky, but it works. |
Expected behavior
send data one window to another window using windowManager.bridge.emit
Actual behavior
Uncaught Error: Could not call remote function 'emit'. Check that the function signature is correct. Underlying error: Cannot read property 'id' of undefined
Error: Could not call remote function 'emit'. Check that the function signature is correct. Underlying error: Cannot read property 'id' of undefined
at callFunction (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\rpc-server.js:259:11)
at EventEmitter. (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\rpc-server.js:366:5)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\api\web-contents.js:249:37)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)
at callFunction (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\rpc-server.js:259:11)
at EventEmitter. (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\rpc-server.js:366:5)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\browser\api\web-contents.js:249:37)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)
at metaToValue (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\renderer\api\remote.js:218:13)
at Object.remoteMemberFunction (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\renderer\api\remote.js:114:18)
at setSmartFoxInstance (http://localhost:9000/scripts/services/deskTileView.js:751:34)
at http://localhost:9000/scripts/services/deskTileView.js:199:33
at CallbacksRegistry.apply (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\common\api\callbacks-registry.js:48:42)
at EventEmitter. (C:\Users\Sandeep\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\renderer\api\remote.js:283:21)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
How to reproduce
open any window using windowManager e.g.
let myWindow = windowManager.open('home1', "welcom", 'http://localhost:9000/**.html', null, null, true);
after onReady calll
windowManager.bridge.emit('new_chat_message', {});
The text was updated successfully, but these errors were encountered: