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

CardField crashes the app when it's focused and unmounted while using the new architecture (Fabric) #1732

Open
aganov opened this issue Sep 17, 2024 · 1 comment

Comments

@aganov
Copy link
Collaborator

aganov commented Sep 17, 2024

Using the new NEW_ARCH (Fabric), the app crashes with the error: Swift runtime failure: force unwrapped a nil value + 0 [inlined] closure #1 in CardFieldManager.blur(_:) + 484 when the component containing CardField is unmounted while the CardField is focused.

To Reproduce
Steps to reproduce the behavior:

  1. Create a screen with a CardField component and compile the iOS app with RCT_NEW_ARCH_ENABLED=1.
  2. Focus on the CardField.
  3. Unmount the screen (e.g., using navigation.goBack, bottomsheet.close, etc.).
  4. See the crash.

Expected behavior
The app should dismiss keyboard and unmount the screen without crashing, even when the CardField is focused.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: iOS
  • Browser: N/A
  • Version: N/A

Smartphone (please complete the following information):

  • Device: iPhone15
  • OS: iOS 18.5
  • Browser: N/A
  • Version: N/A

Additional context
This issue occurs only when using the new Fabric architecture with RCT_NEW_ARCH_ENABLED=1. I have not tested on Android yet, the issue may also be present there.

@griffinshuth
Copy link

Android does not even show the CardField with Fabric enabled. This is a huge issue since react native 76 which is coming out next month will have the new Architecture enabled by default which will make this library unusable at that point. @charliecruzan-stripe any update on supporting Fabric?
Screenshot 2024-09-24 at 12 23 37 PM

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

No branches or pull requests

2 participants