Uncaught Error remote.js #7351

Closed
paul321 opened this Issue Sep 26, 2016 · 66 comments

Projects

None yet
@paul321
paul321 commented Sep 26, 2016 edited
  • 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/microstockr.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 
@bengotow
Contributor

Hey! We're also seeing this when running the spec suite for N1. Seems to have just started happening in Electron 1.4.1.

@MarshallOfSound
Member

Can confirm, I've been hitting this as well

@MarshallOfSound
Member

Woops, wrong button :(

@bengotow
Contributor
bengotow commented Sep 26, 2016 edited

Looks like some sort of call to a cleaned-up object through remote — I wonder if it'd be a good idea to add method and args to these error messages so it'd be a bit easier to track down: https://github.com/electron/electron/blob/master/lib/browser/rpc-server.js#L306

@jhgg
jhgg commented Sep 27, 2016

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)
@kevinsawicki
Contributor

@paul321 @jhgg is this happening consistently or intermittently? Would it be possible to get the app you are seeing this on so I can try and debug it with a custom build? Thanks.

@kevinsawicki kevinsawicki added the bug label Sep 27, 2016
@jhgg
jhgg commented Sep 27, 2016 edited

Yeah. Just download Discord https://discordapp.com/download - pop open the inspector (cmd shift i) - hit ctrl - r a few times and it should happen. Definitely not seeing a 100% repro on it though. Sometimes it happens, others it doesn't. Sometimes hitting Ctrl+R again after the exception happens will cause it to refresh properly.

@kevinsawicki
Contributor

@jhgg should I use the PTB version? Are you ever seeing it when refreshing the login screen or should I log in?

@kevinsawicki
Contributor

I can reproduce this by running the N1 test suite, the failing line is remote.process.stdout.write(str) in their spec runner.

This looks to happen intermittently when a ELECTRON_BROWSER_DEREFERENCE fires for the stdout property while it is being accessed.

So the order I'm seeing is:

  • ELECTRON_BROWSER_MEMBER_GET fires from renderer to main process for the stdout property.
  • The main process replies with the metadata information and the id of the object from the cache.
  • Before the renderer process receives the reply, a ELECTRON_BROWSER_DEREFERENCE fires for the stdout property clearing it from the cache.
  • When the renderer process receives the metadata and builds up the remote object, it is now using a cache id that is no longer present in the cache so the when write is called on the stdout remote property, it fails to obtain the stdout object from the object cache for the previously returned id.

I can only reproduce this maybe once out of every 20 times tried so it seems to be dependent on a GC run happening at a specific time where the main process is building the metadata for the remote object and the renderer process runs the destructor for it.

@adamwoodnz

We're also getting this on 1.3.3

@jhgg
jhgg commented Sep 28, 2016

@kevinsawicki both should work - they are on the same version of Electron now. Based on your findings above - I guess it'd only work when you log in and we start interfacing with remote objects.

@zcbenz
Contributor
zcbenz commented Oct 3, 2016

It seems that the reference chain is broken, write should reference stdout, it probably referenced process instead.

@zcbenz zcbenz was assigned by kevinsawicki Oct 4, 2016
@zcbenz
Contributor
zcbenz commented Oct 4, 2016

I'm wondering whether we have met a bug of V8, for the remote.process.stdout.write(str) call, it works like this underlying:

  1. send GLOBAL message to get process
  2. send MEMBER_GET message to get stdout from process
  3. send MEMBER_CALL message to call write from stdout

And the bug happens for either step 2) or 3), when process is garbage collected before process.stdout is called, or when process.stdout is garbage collected before process.stdout.write is called.

So for the expression xxx.yyy, it is possible that the xxx can be garbage collected when xxx.yyy is being called. This only happens when yyy is defined via Object.defineProperty.

@fantasticsid

so the workaround for now would be avoid remote calls and only use IPC messages?

@Eugeny
Eugeny commented Oct 8, 2016 edited

@fantasticsid it seems that if the bug doesn't happen in the first second during webcontents load, it never happens later even if you use remote calls.

@paul321
paul321 commented Oct 8, 2016

Yes when you load the app first time it doesn't happen, only after you
refresh it by using ctrl+r or cmd+r

On Oct 8, 2016 2:24 PM, "Eugene Pankov" notifications@github.com wrote:

@fantasticsid https://github.com/fantasticsid it seems that if the bug
doesn't happen in the first second during webcontents load, it never
happens later.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7351 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAh57szh7-OCOg5UhAYjBtEW9a1y3RGIks5qx31YgaJpZM4KGsBN
.

@Eugeny
Eugeny commented Oct 8, 2016

In my case, ctrl-r actually "fixes" the issue, i.e. the app reloads without errors.
So in short, I have a ~10% chance of the abovementioned crash when [re]loading the app, but if it happens, reloading it again always helps.

@paul321
paul321 commented Oct 8, 2016

Just the opposite case for me

On Oct 8, 2016 3:51 PM, "Eugene Pankov" notifications@github.com wrote:

In my case, ctrl-r actually "fixes" the issue, i.e. the app reloads
without errors.
So in short, I have a ~10% chance of the abovementioned crash when
[re]loading the app, but if it happens, reloading it again always helps.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7351 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAh57ngYYHzGaQ_dzkDLN8O_01OlMpjsks5qx5HbgaJpZM4KGsBN
.

@KochiyaOcean
KochiyaOcean commented Oct 8, 2016 edited

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

@Eugeny
Eugeny commented Oct 10, 2016

@zcbenz not sure if I'm doing it right, but I tried to get and keep a global reference to process in the main process and remote.process in the renderer process to prevent them from being GCed, but it didn't help.

@vojtatranta

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!

@petrbrzek

Any news about this one?

@fantasticsid

@vojtatranta ifing things out will just make things worse in the future

@paul321
paul321 commented Nov 3, 2016 edited

Any news?
We can't really use the latest builds of Electron

@Eugeny
Eugeny commented Nov 3, 2016

@paul it seems to go away when running the production (i.e. built with electron-builder) version of my app. As for the development, I'm just restarting the app when it crashes :(

@Eugeny
Eugeny commented Nov 3, 2016

@fantasticsid it's still better than the framework being unusable in some cases. Just if it out and spit out a warning instead. This way you can have working software AND fix it for real later.

@paul321
paul321 commented Nov 3, 2016

In production you never get this error because the user never CTRL+R or CMD+R so there is no refresh :)

@petrbrzek

I wonder if this (https://github.com/paulcbetts/electron-remote) would help to prevent the issue. @paulcbetts

@Eugeny
Eugeny commented Nov 3, 2016

@paul321 well, first, I do (own hotkey handler) and, second, the bug does also happen on the first app load sometimes.

@paul321
paul321 commented Nov 3, 2016 edited

So we are stuck on 1.2.6 because from 1.3.0+ Electron is useless for development :(

On Nov 3, 2016 12:31 PM, "Eugene Pankov" notifications@github.com wrote:

@paul321 https://github.com/paul321 well, first, I do (own hotkey
handler) and, second, the bug does also happen on the first app load
sometimes.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7351 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAh57om-2Mp_69k1EhHJ_Fkq0m0qhK50ks5q6bgNgaJpZM4KGsBN
.

@albertotagliavini
albertotagliavini commented Nov 4, 2016 edited

In the piece of code that fails with this error, do you use the api remote.getGlobal(name) to call the remote function or you use the remote.require(module) api??

Because i have seen that changing the implementation, i'm getting no errors.
Before i had a module in global in the main process and i was obtaining it in the renderer process with remote.getGlobal(name) and sometimes i was getting the same error you are talking about.

Now i have changed my code and i'm calling the remote module by remote.require(module).
It seems that i'm getting no errors.
I'm using Electron 1.4.1

@paul321
paul321 commented Nov 4, 2016

I'm using it this way:
var app = require('electron').remote.app;

Can you give us an example from our perspective?

@qmphan
qmphan commented Nov 14, 2016 edited

I can reproduce this error with the following code:

main.js:

"use strict";
let { app, Menu, BrowserWindow } = require('electron');
let mainWindow = null;
global['mytest'] = {'hello': 'world'};
function createWindow() {
// Create the browser window.
var path = require('path');
mainWindow = new BrowserWindow({ width: 800, height: 600,
webPreferences: {
'preload': path.resolve(path.join(__dirname, 'preload.js')),
'nodeIntegration': true
}
});
mainWindow.loadURL(http://www.google.com);
mainWindow.loadURL(http://www.google.com); // Calling this line 2nd time causes the error
mainWindow.webContents.openDevTools();
mainWindow.on('closed', function () {
mainWindow = null;
app.quit();
});
}
app.on('ready', createWindow);

preload.js
process.once('loaded', () => {
const remote = require('electron').remote;
window.jsphone_api = remote.app.jsphone_api;
console.log('mytest = ', remote.getGlobal('mytest'));
console.log('preload got called');
})

  • When I package it using electron-packager with option --arch=ia32 and run it on a 32bit Windows 7, this error happens every time. You can see in the log the message "Cannot read property 'object' of undefined TypeError: Cannot read property 'object' of undefined...". Note that the error happens because the function mainWindow.loadURL(http://www.google.com) is called twice. If I call it only once, there is no error.
  • When I run it on a 64 bit Windows 7 machine, there is no error.
@fantasticsid

@Eugeny silently swallowing the exception and expect your app to carry on IMHO is pretty bad.

@Eugeny
Eugeny commented Nov 15, 2016 edited

@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.

@paul321
paul321 commented Nov 22, 2016 edited

Any news on this one?
A lot of production apps are crashing because of this bug.

@kevinsawicki
Contributor

Any news on this one?

There haven't been any fixes for this yet, it is still being investigated to try and figure out why these objects are sometimes getting garbage collected and how Electron can prevent them from getting incorrectly destroyed.

#8003 was merged and added custom error messages so you can now know specifically which methods, constructors, or properties are missing.

A lot of production apps are crashing because of this bug, it's ridiculous.

This bug shouldn't crash apps, it should only throw JavaScript errors in the render process. If you are seeing your app literally crash, please include a native crash report with the C++ stack trace and we can investigate it further.

Until this is issue is resolved, you can workaround this issue by using asynchronous IPC instead of the remote module for calling methods and transferring data between processes.

@paul321
paul321 commented Nov 22, 2016

It's crashing only JS but the app will not work after the error was thrown, we are getting a lot of js errors after the first encounter and the app starts to throw other errors just like this one

@paul321
paul321 commented Nov 22, 2016

Thing is in our app we do not transfer any date between processes, the app it's only working on the render process

@kevinsawicki
Contributor

@paul321 how many calls to the remote module is your app making? Are you able to switch them to use ipcRenderer until this issue is resolved?

@paul321
paul321 commented Nov 22, 2016 edited

Just checked the source code, we have about 20 calls to remote like:
remote,session
remote.getCurrentWindow()
remote.app
...

all of them are prefixed by require('electron')

@kevinsawicki
Contributor

Just checked the source code, we have about 20 calls to remote like:

Do you know which specific ones are throwing this error?

@paul321
paul321 commented Nov 22, 2016

nope, because we don't see which call throws the error from render process, we only see the error from main process and no stack trace

@kevinsawicki
Contributor

nope, because we don't see which call throws the error from render process, we only see the error from main process and no stack trace

Electron 1.4.8 will be out later today and will contain better error messages for this bug. If you can re-run your app on that version you'll be able to know which remote calls are affected and you can then workaround them by using the ipcRenderer module until this issue is completely fixed.

@paul321
paul321 commented Nov 22, 2016

Ok thank you, will keep you posted if i can get more info from 1.4.8

@kevinsawicki
Contributor

Ok thank you, will keep you posted if i can get more info from 1.4.8

1.4.8 is now available.

@paul321
paul321 commented Nov 23, 2016 edited

Here is the error, call is made from this line

App.win = require('electron').remote.getCurrentWindow();

setTimeout(function() {
      App.win.show();
}, 300);

Uncaught Error: Cannot call function 'show' on missing remote object 10
Error: Cannot call function 'show' on missing remote object 10
at throwRPCError (D:\devel\work\js\desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:143:17)
at EventEmitter. (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. (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)

@paul321
paul321 commented Nov 23, 2016

Another one

Uncaught (in promise) Error: Cannot call function 'getPath' on missing remote object 18
Error: Cannot call function 'getPath' on missing remote object 18
at throwRPCError (D:\devel\work\js\microstockr.desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\rpc-server.js:143:17)
at EventEmitter. (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. (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. (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.

@paul321
paul321 commented Nov 23, 2016

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. (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. (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. (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. (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)

@Qquanwei
Qquanwei commented Nov 23, 2016 edited

this problem occur for me ,

my preload.js

window.pkg = require('electron').remote.require('./package.json');

throw the same error when I access window.pkg


I'm using Lazy load can avoid this bug

window.getPkg = (function(){
  let cache = null;
  return function(){
      if(!cache) cache = require('electron').remote.require('./package.json');
      return cache;
  }
})()

I think load remote object can be safe after window load

@paul321
paul321 commented Nov 23, 2016 edited

I'm using require js in a file like this one and keep a reference to remote objects but after few minutes the objects are not accessible anymore

define([
    'moment',
    'async',
    'src/constants'
], function(moment,async, Constants) {
    return {
        remote: require('electron').remote,
        path: require('path'),
        filesys: require('fs'),
        app: require('electron').remote.app,

        init: function() {
            return this;
        },
     
        thumbs: function() {
            var self = this;
            console.log(self.app.getPath('userData'));
        }
    }
});

In few minutes then function thumbs is called 'self.app.getPath' with throw an error

@paul321
paul321 commented Nov 25, 2016

Even if i make the remote variables scope vars in thumbs function it's still crashing on CTRL + R or CMD+R

@gewl
gewl commented Nov 25, 2016

I've been getting what is (I believe) a related error. I'm using chentsulin's electron-react-boilerplate. Production and dev both work fine, but when I run a test I get this error from electron-json-storage:

[dirpath]/node_modules/electron-json-storage/lib/utils.js:30
const app = electron.app || electron.remote.app;
^

TypeError: Cannot read property 'app' of undefined

Would love any advice on how to fix this!

@MarshallOfSound
Member

@gewl That's a different error. Looks like either your using tmux or your node_modules install is a bit messed up.

@gewl
gewl commented Nov 26, 2016

Not using tmux! node_modules install may be messed up, but if so, this is the only place that it's creating any problems.

I got it worked out. For future reference, (one possible) answer was to use electron-mocha instead of mocha in the test script. Thanks for the suggestions!

@etyp
etyp commented Nov 28, 2016

@kevinsawicki Please let us know if there's any specific information we can provide to help resolve this issue.

I'm only seeing it on our Windows build now, but previously saw a lot of it on our users with OSX builds:

  • Electron versions: 1.4.1 and 1.3.9
  • OS: Windows 10

Error + stack:

Error: Could not call remote function 'setOverlayIcon'. Check that the function signature is correct. Underlying error: Error processing argument at index 0, conversion failure from #<Object> Error: Could not call remote function 'setOverlayIcon'. Check that the function signature is correct. Underlying er 
Stack: 
Error: Could not call remote function 'setOverlayIcon'. Check that the function signature is correct. Underlying error: Error processing argument at index 0, conversion failure from #<Object>
Error: Could not call remote function 'setOverlayIcon'. Check that the function signature is correct. Underlying error: Error processing argument at index 0, conversion failure from #<Object>
    at callFunction (C:\Users\Redacted\AppData\Local\Hive\app-1.2.2\resources\electron.asar\browser\rpc-server.js:226:11)
    at EventEmitter.<anonymous> (C:\Users\Redacted\AppData\Local\Hive\app-1.2.2\resources\electron.asar\browser\rpc-server.js:307:5)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (C:\Users\Redacted\AppData\Local\Hive\app-1.2.2\resources\electron.asar\browser\api\web-contents.js:219:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)
    at metaToValue (C:\Users\Redacted\AppData\Local\Hive\app-1.2.2\resources\electron.asar\renderer\api\remote.js:210:13)
    at remoteMemberFunction (C:\Users\Redacted\AppData\Local\Hive\app-1.2.2\resources\electron.asar\renderer\api\remote.js:111:18)

I can also include our preload.js and usage of require if that helps.

@kevinsawicki
Contributor
kevinsawicki commented Nov 28, 2016 edited

@etyp that stack you posted is a different error, not related to this issue.

Error processing argument at index 0, conversion failure from #<Object>

It looks like setOverlayIcon was called with a first argument of something other than a NativeImage instance.

@kevinsawicki
Contributor

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.

@Mic75
Mic75 commented Dec 7, 2016

On the project I am working on, we had the exception thrown from remote.js while refreshing the app (we were on 1.4.5 and we had to downgrade to 1.3.3).

After upgrading to 1.4.11, no more exception thrown from remote.js, it looks like the issue is fixed !
Thank you sir !

@VINTproYKT
VINTproYKT commented Dec 7, 2016 edited

@kevinsawicki This fixed my issue with disappearing remote objects. An interesting coincidence is that I have downloaded 1.4.10 three hours ago and got stuck with this problem. Now I'm all set, thank you! 👍

@kevinsawicki
Contributor

@paul321 are you able to give the latest releases, 1.3.13 or 1.4.11, a try and see if you still experience this issue? Thanks.

@paul321
paul321 commented Dec 8, 2016
@kevinsawicki
Contributor

I did try it today and it seems fixed :)

Thanks for confirming, will tentatively close this out, it if starts cropping up again we can reopen.

@paul321
paul321 commented Dec 12, 2016

I keep getting this error when i reload the application without restart

remote.js:217 Uncaught Error: Cannot call function 'isVisible' on missing remote object 15
Error: Cannot call function 'isVisible' on missing remote object 15
at throwRPCError (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:143:17)
at EventEmitter. (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:339:7)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (/Users/Paul/Work/js/desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:231:13)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)

From this piece of code:

var win = require('electron').remote.getCurrentWindow(); if(!win.isVisible()) { win.show(); }

@paul321
paul321 commented Dec 12, 2016

and a lot of random remote errors like this one too:

remote.js:217 Uncaught (in promise) Error: Cannot call function 'getSize' on missing remote object 26
Error: Cannot call function 'getSize' on missing remote object 26
at throwRPCError (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:143:17)
at EventEmitter. (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:339:7)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/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 (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:143:17)
at EventEmitter. (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:339:7)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/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 (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:217:13)
at remoteMemberFunction (/Users/Paul/Work/js/microstockr.desktop/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:113:18)

var win = require('electron').remote.getCurrentWindow(); var size = win.getSize();

@paul321
paul321 commented Dec 12, 2016

Ok my mistake, i didn't updated Electron on this machine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment