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 · 17 comments

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

@iM-GeeKy
Copy link

@davidme-stripe @charliecruzan-stripe is there any update on this? New arch support appears to be landing soon and this is one issue we are seeing in our preparations.

@griffinshuth
Copy link

any update on this react native 0.76.0 was just released today with the New Arch turned on by default and this library does not work with it are you guys going to update it?

@angelica-snowit
Copy link

any update?

@FladioArmandika
Copy link

any update?

1 similar comment
@MohamadAlAdraa
Copy link

any update?

@Jleban
Copy link

Jleban commented Nov 20, 2024

any update ? This is very problematic

@Jleban
Copy link

Jleban commented Nov 20, 2024

did you solve it @aganov ?

@ole-nikitas
Copy link

ole-nikitas commented Nov 27, 2024

Try to create hidden input and focus on it before hide keyboard or close page.

@iM-GeeKy
Copy link

Is there a patch we can apply temporarily until this issue is resolved? @tjclawson-stripe @ianjabour-stripe @charliecruzan-stripe

@sajorahasan
Copy link

Faced the same issue, and its keeping us from migrating to new architecture.

@firasrashidi
Copy link

Any updates?

@tjclawson-stripe
Copy link
Collaborator

Hi all, thanks for reporting. We're working on updating to the new architecture and will post an update when completed.

@firasrashidi
Copy link

Thank you, any timeline though?

@sajorahasan
Copy link

Any update on this?

@RepoCheyo
Copy link

RepoCheyo commented Dec 26, 2024

hi trying to implement add card functionality to react native app, the thing here its that only with navigation going back or closing the component where the CardField its inside whether is focused or has been focused once it crashes in auto the app. Tried using inside react navigation lib the method navigate.popToTop it still not working.

@haris18896
Copy link

is there any update on this, On ios my app crashes when I close the bottomSheet or navigate to another screen, and on android I'm not getting the cardDetails in the callback function onCardChange

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