electron: Uncaught Error remote.js

  • Electron version: 1.3.5 - 1.4.1
  • Operating system: MacOS

I keep getting this error if i start the app with dev tools open and then hit refresh, from the second time it keeps showing this error and i don’t know why happens, first time when i run the app everything is ok. This doesn’t happen in 1.2.6

remote.js:217 Uncaught Error: Cannot read property 'object' of undefined
TypeError: Cannot read property 'object' of undefined
    at ObjectsRegistry.get (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/objects-registry.js:44:28)
    at EventEmitter.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:306:31)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:219:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)

And after the first run the app is full of another error

remote.js:209 Uncaught (in promise) Error: Cannot read property 'object' of undefined
TypeError: Cannot read property 'object' of undefined
    at ObjectsRegistry.get (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/objects-registry.js:44:28)
    at EventEmitter.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:305:31)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:218:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)
    at ObjectsRegistry.get (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/objects-registry.js:44:28)
    at EventEmitter.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:305:31)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:218:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)
    at metaToValue (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:209:13)
    at remoteMemberFunction (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:110:18)
    at 

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 77 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Please please guy, our customers are very angry with this.

Could you not just do something so that in would not throw such errors?

This line: https://github.com/electron/electron/blob/master/lib/browser/objects-registry.js#L44

Is the root of the evil by itself. Yeah I know, there should be object with this id and it should have property object but apparantly. There is a bug?

What if we just ifed it out and set logging there so we would know more? Thanks!

@zcbenz thanks!

Electron 1.4.11 and 1.3.13 are now out with a potential fix for this issue via #8110.

Can people try updating to those versions and see if they can still reproduce this issue? Thanks.

It sometimes occurs on a webview that have run several hours. All methods of webview (such as refresh, forward, getURL, etc) will return this Error

image

We’re also getting this on 1.3.3

We’re seeing this exact same exception too. Happens when we use ctrl + R to reload the app.

remote.js:176 Uncaught Error: Cannot read property 'object' of undefined
TypeError: Cannot read property 'object' of undefined
    at ObjectsRegistry.get (/Applications/Discord Canary.app/Contents/Resources/electron.asar/browser/objects-registry.js:44:28)
    at EventEmitter.<anonymous> (/Applications/Discord Canary.app/Contents/Resources/electron.asar/browser/rpc-server.js:305:31)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/Applications/Discord Canary.app/Contents/Resources/electron.asar/browser/api/web-contents.js:218:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)

It seems i cannot call remote functions from render process, even if i put a break point at that line, dev tools console will show me that setProgressBar it’s a function

Uncaught (in promise) Error: Cannot call function ‘setProgressBar’ on missing remote object 41 Error: Cannot call function ‘setProgressBar’ on missing remote object 41 at throwRPCError (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:143:17) at EventEmitter.<anonymous> (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:339:7) at emitMany (events.js:127:13) at EventEmitter.emit (events.js:201:7) at WebContents.<anonymous> (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\api\web-contents.js:231:13) at emitTwo (events.js:106:13) at WebContents.emit (events.js:191:7) at throwRPCError (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:143:17) at EventEmitter.<anonymous> (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:339:7) at emitMany (events.js:127:13) at EventEmitter.emit (events.js:201:7) at WebContents.<anonymous> (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\api\web-contents.js:231:13) at emitTwo (events.js:106:13) at WebContents.emit (events.js:191:7) at metaToValue (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\renderer\api\remote.js:217:13) at remoteMemberFunction (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\renderer\api\remote.js:113:18)

@fantasticsid absolutely. That’s why I’m saying “spit out a warning instead” in my comment. That lets people carry on using Electron productively until this bug is fixed, without having to resort to patching Electron itself.