Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

try catch nodeRT module via require #138

Merged
merged 3 commits into from
Aug 1, 2020

Conversation

cscharf
Copy link
Contributor

@cscharf cscharf commented Jul 31, 2020

This is an attempt to fix bitwarden/desktop#495 by lazy-loading the offending module inside a try {} catch {} instead of using import. This should prevent an app crash as well as mark an isError flag on the biometric module so the UI can display a message as to why it's not available (i.e. not supported on machine or need dependency, etc.)

@kspearrin , I have been unable to test this, I can't get it build in my Windows VM and since I'm using macOS natively my build can't compile native Windows applications so I'm not able to test.

Can you please pull this draft PR and attempt a build/check. If it actually loads and Windows Hello still works, can you also please post it to 495 linked above for the user-community to test with as well (I also believe Luc can reproduce the issue so he'd also be able to test).

@cscharf cscharf requested a review from kspearrin July 31, 2020 23:46
@cscharf cscharf marked this pull request as ready for review August 1, 2020 18:21
@cscharf
Copy link
Contributor Author

cscharf commented Aug 1, 2020

Fixes bitwarden/desktop#495 (confirmed)

@cscharf cscharf requested a review from a team August 1, 2020 18:22
@cscharf cscharf merged commit 101c568 into master Aug 1, 2020
@cscharf cscharf deleted the fix/desktop/495-try-catch-require-nodert branch August 1, 2020 20:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desktop v1.20 crashes with JavaScript error on Windows after update
2 participants