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

Minimal Expo 52 app crashes when using form sheet modals when using RNTP #2507

Closed
doughsay opened this issue Nov 14, 2024 · 10 comments · Fixed by #2526
Closed

Minimal Expo 52 app crashes when using form sheet modals when using RNTP #2507

doughsay opened this issue Nov 14, 2024 · 10 comments · Fixed by #2526
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@doughsay
Copy link

doughsay commented Nov 14, 2024

Description

When using react-native-track-player, which uses a Headless JS Task, form sheet modals crash when being opened after the app has been closed once. I haven't been able to reproduce this without using react-native-track-player, but the maintainers there seem to think it's not related to their package. I'm having a hard time knowing where to look for help, and what else to try.

Video showing the crash:

rntp-crash.webm

Steps to reproduce

  1. open the app
  2. see that the form sheet modal opens
  3. close the app (not just background)
  4. open the app again
  5. try and open the modal and see that it crashes instead

Snack or a link to a repository

https://github.com/doughsay/expo-test-app

Screens version

4.0.0

React Native version

0.76.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

Pixel 9 Pro XL API 35

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snack or repo is provided Platform: Android This issue is specific to Android labels Nov 14, 2024
@doughsay
Copy link
Author

Updated to react-native 0.76.2, it didn't help

@doughsay
Copy link
Author

Updated to react-native-screen 4.1.0, no change, still crashes. If anyone here thinks this isn't related to anything in react-native-screens, please let me know so I can maybe file an issue somewhere else. It's a bit over my head, and I really need help figuring it out.

@radko93
Copy link
Contributor

radko93 commented Nov 18, 2024

Are you using new architecture? headless is broken with new arch facebook/react-native#47570

@doughsay
Copy link
Author

doughsay commented Nov 18, 2024

Are you using new architecture? headless is broken with new arch facebook/react-native#47570

No, old architecture, although I've tried both with no differences to the crash. But you can see in my repo I have it currently disabled.

@mikehardy
Copy link
Contributor

👋 I'm looking into upstream facebook/react-native/issues/47570 and having trouble reproducing

Right now there is definitely a problem with old-architecture and headlessJS - I have a clean reproducer up and it is tracking in facebook/react-native/issues/47592

I am unable to reproduce failures yet with new architecture and 0.76.1 or .2 but I understand from comments you do reproduce here. I'll see what I can do about converging the two reproducers to something truly minimal (no react-native-track-player needed if possible...) and post it up on 47570

@mikehardy
Copy link
Contributor

I don't believe this is related to headlessJS crashes. I think this is something different now.

@doughsay
Copy link
Author

Thanks for chiming in, and I'll follow those two issues just in case they do end up being related. But in this case it doesn't appear to be related to the architecture, I get the same crash either way.

I don't really have the skills in react native to investigate any further on my end, so I'm rewriting my form sheet modals to use gorhom-bottom-sheet instead for now. If this gets resolved in the future I hope I can switch back to using the form sheets provided by react-native-screens.

@kkafar
Copy link
Member

kkafar commented Nov 20, 2024

Could someone confirm whether applying this patch resolves the issue for you?

https://github.com/software-mansion/react-native-screens/pull/2526.patch

You can either apply this patch or try to install react-native-screens directly from branch:

"react-native-screens": "software-mansion/react-native-screens#@kkafar/fix-crash-with-proxy-already-registered"

The #2526 aims to fix #2519, however it might help here too (in case the issue is caused by this library)

@doughsay
Copy link
Author

@kkafar yes, I can confirm that this fixes the crash!

@kkafar
Copy link
Member

kkafar commented Nov 21, 2024

Thanks for confirmation. I'll release it later today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
4 participants