You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Hello :)
Same error here, but calling from the renderer process.
Open a windows
Sending an event when window is loaded
Getting this error
I guess i'll check the source code to see if there is a bug ?
Edit :
Actually the crash is in the getCurrent() methods, line 976. Seems that BrowserWindow.getFocusedWindow() return something weird. Actually the api check if the focused window is null, so we should have this id.
Weird. Maybe because de BrowserWindow is not fully loaded ?
I worked around it by specifying the emmiter: 'emit': function(event, data, target, instigator){ windowManager.eventEmitter.emit(event, { 'emittedBy': instigator, 'target': target, 'data': data }); }
You can then use emit with windowManager.bridge.emit(event, data, targetWindowName, currentWindowName);
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: