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]: "TypeError: e.sendReply is not a function" when calling ipcRenderer.sendSync/invoke #36558
Comments
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
still an issue |
This issue still exists in version 22.3.24, but there is no stable way to reproduce it. It seems that this problem will occur whenever a specific webpage is loaded. |
Preflight Checklist
Electron Version
12 - 22
What operating system are you using?
Ubuntu
Operating System Version
18
What arch are you using?
x64
Last Known Working Electron version
11
Expected Behavior
Sending messages via the ipcRenderer's sendSync/invoke methods should work consistently, and not throw unexpected errors.
Actual Behavior
When using sendSync/invoke a certain amount of times an error is thrown which crashes the app:
"TypeError: e.sendReply is not a function" when calling ipcRenderer.sendSync/invoke
Testcase Gist URL
No response
Additional Information
This bug can be easily reproduced in versions 12 - 22, by setting an interval in the preload script, which calls sendSync/invoke, and listening and returning a value in the main module.
in preload:
setInterval(async() => {
ipcRenderer.sendSync('TRIGGER_SEND_REPLY');
ipcRenderer.invoke('TRIGGER_HANDLE');
}, 10);
in main:
ipcMain.on('TRIGGER_SEND_REPLY', (ev) => {
try {
ev.returnValue = '';
} catch(err) {
console.log('error occured on TRIGGER_SEND_REPLY')
}
});
ipcMain.handle('TRIGGER_HANDLE', () => {
return '';
})
The text was updated successfully, but these errors were encountered: