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]: "TypeError: e.sendReply is not a function" when calling ipcRenderer.sendSync/invoke #36558

Open
3 tasks done
ArnonAsquira opened this issue Dec 5, 2022 · 9 comments
Open
3 tasks done
Labels

Comments

@ArnonAsquira
Copy link

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 '';
})

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

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!

@github-actions github-actions bot added the stale label Mar 6, 2023
@boutetnico
Copy link

bump

@github-actions github-actions bot removed the stale label Mar 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

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!

@github-actions github-actions bot added the stale label Jun 6, 2023
@boutetnico
Copy link

bump

@github-actions github-actions bot removed the stale label Jun 7, 2023
@electron-issue-triage
Copy link

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!

@boutetnico
Copy link

bump

@electron-issue-triage
Copy link

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!

@Jelmerro
Copy link

Jelmerro commented Dec 7, 2023

still an issue

@asd281533890
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants