electron/remote

Remove of IpcRendererEvent.senderId breaks REMOTE_RENDERER_CALLBACK with Electron 28

pbi-qfs opened this issue · 3 comments

The change from electron/electron@5078cae has landed in Electron 28beta.

This change breaks the security check in

if (event.senderId !== 0) {
console.error(`Message ${channel} sent by unexpected WebContents (${event.senderId})`);
return;
}
leading to the console error REMOTE_RENDERER_CALLBACK sent by unexpected WebContents (undefined) and no callback execution.

Would it be enough to revert 740ed4e ? or at least accept undefined as alternative to support Electron 28+? Maybe this is not so bad anymore, since according to https://github.com/electron/electron/blob/6697042c0ab61ac55e91251427a131792de0358e/docs/breaking-changes.md?plain=1#L17C29-L17C29 the ipcRenderer shouldn't be easily leaked in future anymore...

Fixed with #171

I still have this issue with Electron 28 or 29 and electron-remote 2.1.2
it's OK with Electron 27.x

I created a new issue because after this was completed there seems to be reappearance of the issue — #182.