fix(auth, android): handle native exception in signInWithEmailLink #8502
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@Willham12 pointed out multiple problems with our sign in link handling, and even submitted a PR that handled part of the problem already - this PR handles the remaining two aspects of the problem - a docs update and a native error handling fix
Specifically, the native android signInWithEmailLink method throws an error outside it's Task continuation failure handling, which was unexpected and unhandled in our code. This PR handles that correctly now
Related issues
Release Summary
two conventional commits ready for a rebase and a semantic release
Checklist
Android
iOS
Other
(macOS, web)e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Subtle to fix, but correctness was enforced because I started it by adding an e2e test and then made our code meet the test expectations
One very subtle thing (for me) is that the new react-native new architecture error handling for bridgeless compatibility mode code is to helpfully package up even unhandled native code exceptions. This changed since the error was logged so I was seeing different behavior in the unhandled exception case - not IllegalArgumentException + crash like expected, but a 'HostError' javascript error object that wasn't from us but was from react-native
Anyway, all handled now
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter