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 race issue with protocol registration #19

Merged
merged 1 commit into from
Sep 8, 2019
Merged

Fix race issue with protocol registration #19

merged 1 commit into from
Sep 8, 2019

Conversation

dedo1911
Copy link
Contributor

@dedo1911 dedo1911 commented Sep 5, 2019

app.on('ready') is fired before app.waitReady and allows the protocol to be registered earlier.

Should fix #15 and fix #18

@sindresorhus
Copy link
Owner

This doesn't answer why it works in development and not in production though.

app.whenReady() should be equivalent to app.on('ready'). Can you open an Electron issue about this?

@sindresorhus sindresorhus changed the title Register file protocol on app ready Fix race issue with protocol registration Sep 8, 2019
@sindresorhus sindresorhus merged commit 758f59f into sindresorhus:master Sep 8, 2019
@sindresorhus
Copy link
Owner

Thanks for fixing this 🙌

@dedo1911
Copy link
Contributor Author

dedo1911 commented Sep 9, 2019

In my case it was working in development because the app was being served on a local development server (localhost:3000). That's why it appeared to be release only issue.
However forcing it to use the serve scheme in dev, it stopped working either.

@sindresorhus
Copy link
Owner

Ah, that makes sense.

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.

app scheme not working on packaged app Delayed protocol registration
2 participants