electron: Error: Error invoking remote method 'ELECTRON_GUEST_VIEW_MANAGER_CALL': Error: (-3) loading 'https://www.baidu.com/'

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 9.0.2
  • Operating System:
    • macOS 10.15.4
  • Last Known Working Electron version:
    • 9.0.4

Expected Behavior

Expect console not to output error messages.

Actual Behavior

The console outputs the following error:

ipc-renderer-internal.ts:29 Uncaught (in promise) Error: Error invoking remote method 'ELECTRON_GUEST_VIEW_MANAGER_CALL': Error:  (-3) loading 'https://www.baidu.com/'
    at EventEmitter../lib/renderer/ipc-renderer-internal.ts.exports.ipcRendererInternal.invoke

To Reproduce

When using Webview, when dynamically changing SRC to ‘http://baidu.com’, Webview automatically jumps to ‘https://www.baidu.com’, the effect is as expected, but the console output is wrong.

Additional Information

Here’s my code, and this is what happens when I dynamically change the SRC value to ‘http://baidu.com’.

    <webview
      ref="webview"
      :src="src"
      :allowpopups="allowpopups"
      webpreferences="allowRunningInsecureContent=yes"
      enableremotemodule="false"
      style="display: flex; height: 100%; width: 100%;"
    ></webview>

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 32 (5 by maintainers)

Most upvoted comments

Uncaught (in promise) Error: Error invoking remote method 'ELECTRON_GUEST_VIEW_MANAGER_CALL': Error:  (-3) loading 'https://www.npmjs.com/'

This error will occur when using react or vue to dynamically set the attribute src, which is similar to the following code.

function onDidNavigate(e) {
  if(e.url !== webview.src){
    webview.setAttribute('src', e.url)
  }
}

webview.addEventListener('did-navigate', onDidNavigate);
webview.setAttribute('src', 'http://npmjs.com')

I am also having the same issue.

The same exists for electron v10.0.1

Got the same problem ,any idea?

Electron version: npm electron@26.3.0 OS: Ubuntu 22.04.3 LTS (WSL2)

I got the same bug when redirecting to another URL while the previous redirect has not finished. I have no control on the first redirect as it originates from the third party webpage itself. I fixed it by catching exceptions from the second redirect I’m making though

Error: Error invoking remote method ‘GUEST_VIEW_MANAGER_CALL’: Error: (-3) loading ‘https://www.merriam-webster.com/dictionary/test

(URL is from first reload’s but error comes only if second redirect is made soon after)

Fixed code:

webview.loadURL(this.url)
.catch(e => {
console.log(e);
});

Repository commit: https://github.com/JustTheCoolest/GodMode-Search-Integration/commit/c7ed9a2edc8be0031d244bf553ebd1c8519b5375

This still happens

@zyzski Thankyou so much!!! Solved

I am also facing same problem… Any solutions???

@Hariprabu94 check if the webview is loading before changing the src

ELECTRON_GUEST_VIEW_MANAGER_CALL

to add a bit more: it seems like this happens when you update the src (dynamically via react) while it’s still loading the previous src. I am going to try and use the built in webview methods for loading pages instead of re-rendering with new src props

I reproduced the issus on electron fiddle. Electron Version: 9.0.2

https://gist.github.com/elmeet/f9f22280cf9e5bfbe3d3357f70ddb6f7

This has to do with using the electron app over VPN