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

[MM-54584] Fixed an issue where clicking on a link to an unregistered protocol on macOS would cause the app to crash #2868

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

devinbinnie
Copy link
Member

Summary

When calling shell.openExternal on macOS, it returns a Promise. If the protocol used in the URL provided is not registered, the Promise will reject.

We were not properly handling this rejection, and due to the changes in v5.4 that included unhandled promise rejections, the app was simply crashing even though it should just fail silently.

This PR adds the handler to catch the error, log in, and then fail silently like we would expect.

Ticket Link

https://mattermost.atlassian.net/browse/MM-54584

Fixed an issue where clicking on a link to an unregistered protocol on macOS would cause the app to crash.

… protocol on macOS would cause the app to crash
@devinbinnie devinbinnie added the 2: Dev Review Requires review by a core committer label Oct 3, 2023
Copy link
Member

@marianunez marianunez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @devinbinnie

@devinbinnie devinbinnie merged commit 013d46d into mattermost:master Oct 6, 2023
13 checks passed
@amyblais amyblais added this to the v5.6.0 milestone Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants