magiclabs/magic-js

Expo crashes when closing Magic login popup window

yogiben opened this issue ยท 2 comments

๐Ÿ› Description

Expo simulator crashes when Magic popup is closed e.g. by pressing "X"

๐Ÿงฉ Steps to Reproduce

  1. Open popup
  2. Enter bad email
  3. Click X button

๐Ÿค” Expected behavior

Closes webview

๐Ÿ˜ฎ Actual behavior

Whole app crashes on simulator.
error log.txt

Hi @yogiben

I was unable to reproduce this issue on my end. I ran our React Native expo demo locally, entered in an invalid email address, and was then able to close the modal successfully. I also tried with a valid email address, but then clicked the "x" before entering in the OTP, and was again able to successfully close the modal without it crashing. Are you attempting this in our demo app, or your own?

Hey @joshuascan

I managed to fix this by moving it to a higher component in the app. I think it was caused by the component rendering within a component where the state change was causing the ML component to disappear.