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

fix: sea error handling #48

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Conversation

nikwen
Copy link
Contributor

@nikwen nikwen commented Nov 29, 2024

throw new Error(error) does not terminate the SEA process when used via Forge's MakerSquirrel.

I had a case where due to a misconfiguration an error was thrown in the try block and subsequently caught in the catch block that this PR modifies. The process didn't exit upon reaching throw new Error(error). Instead, it kept running indefinitely. (This reproduced reliably every time I ran it.)

As a result, my electron-forge make command kept running indefinitely (without succeeding or failing) because squirrel.exe --releasify thought signing (via the SEA) was still ongoing.

My guess is that it has something to do with stdout/stderr. If I log the error in the catch block using console.log or console.error, the process also does not terminate.

The issue was hard to debug. It took me ~4 hours to figure out. Hope this will save someone else from having to do the same.

@nikwen nikwen requested a review from a team as a code owner November 29, 2024 05:35
@felixrieseberg
Copy link
Member

Seems good to me, good catch, thank you!

@felixrieseberg felixrieseberg merged commit dfd4164 into electron:main Feb 13, 2025
1 check passed
@nikwen
Copy link
Contributor Author

nikwen commented Feb 13, 2025

Thank you both, @erickzhao and @felixrieseberg! 🙌

Copy link

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants