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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nikwen
Copy link

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant