Skip to content
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

[Bug]: ipcRenderer seems broken #37067

Closed
3 tasks done
zhanghaobin opened this issue Jan 30, 2023 · 6 comments
Closed
3 tasks done

[Bug]: ipcRenderer seems broken #37067

zhanghaobin opened this issue Jan 30, 2023 · 6 comments
Labels
blocked/need-info ❌ Cannot proceed without more information bug 🪲 component/ipc

Comments

@zhanghaobin
Copy link

zhanghaobin commented Jan 30, 2023

Preflight Checklist

Electron Version

12.0.6

What operating system are you using?

macOS

Operating System Version

macOS Monterey 12.6

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

ipcRenderer should work properly, including ipcRenderer.send(), ipcRenderer.sendSync(), ipcRenderer.sendTo(), ipcRenderer.invoke(), ipcRenderer.postMessage() etc ...

Actual Behavior

ipcRenderer seems broken sometime:

  • The main process never received the message sent by ipcRenderer.send(), ipcRenderer.sendSync(), ipcRenderer.invoke(), ipcRenderer.postMessage()
  • Other renderer process never received the message sent by ipcRenderer.sendTo()
  • ipcRenderer.sendSync() always returns null
  • ipcRenderer.on() can still receive the message from other process
  • Unable to create a new <webview> element
  • ipcRenderer works fine in other webContents, including window and webview
  • ipcRenderer works normal after the page reloaded

Testcase Gist URL

No response

Additional Information

I'm sorry I can't reproduce the issue, it happened randomly in some user's machine, both macOS and Windows system.

I don't know how to debug this problem, maybe the mojo message pipe disconnected? And how can I debug the ipcRenderer internal implementation?

Maybe related: #25035 #31733

@dsanders11 dsanders11 added the blocked/need-info ❌ Cannot proceed without more information label Jan 30, 2023
@dsanders11
Copy link
Member

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron reported in this issue has reached end-of-life and is no longer supported.

If you're still experiencing this issue in the latest version of Electron, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. If we don't see a response in 10 days, I'll close this issue.

Thanks in advance! Your help is appreciated.

@zhanghaobin
Copy link
Author

zhanghaobin commented Jan 30, 2023

@dsanders11 Thank you for your reply!

I wonder how could I debug this issue? What information would help to debug this issue and how to collect such information?

Is there any guesses on this issue? For example, what causes ipcRenderer.sendSync() always returns null?

@dsanders11
Copy link
Member

@zhanghaobin, if you can confirm you see the behavior on newer, supported versions of Electron (ideally v22), then we can dig a bit deeper on debugging.

@zhanghaobin
Copy link
Author

Sorry, we don't have the plan to upgrade Electron version to such high version for our App in a short time. I just want to figure out the causes of this issue and try to avoid it.

But I can try to package our App with high Electron version and see if the issue recurs.

@codebytere
Copy link
Member

We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. In this event, i'm going to go ahead and close this but can reopen should you follow up with more info!

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
@Rabbitzzc
Copy link

@dsanders11 Thank you for your reply!

I wonder how could I debug this issue? What information would help to debug this issue and how to collect such information?

Is there any guesses on this issue? For example, what causes ipcRenderer.sendSync() always returns null?

image

in api/remote.ts file

const command = IPC_MESSAGES.BROWSER_MEMBER_GET;
const meta = ipcRender.sendSync(command, ....)

In some cases, the meta is null.. I have no idea...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-info ❌ Cannot proceed without more information bug 🪲 component/ipc
Projects
None yet
Development

No branches or pull requests

4 participants