software-mansion / software-mansion/react-native-screens
RN 0.80 unstable modal and app crash
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 714
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 71
Description
Description
I'm using a button to let user choose which season of a series he want to watch, this button open a fullscreenModal and you can see from the provided videos what is now happening.
Before 0.80 (Working fine) ( I was in 0.79.3 but i don't remember the rn screens version, i'm sorry.)
https://github.com/user-attachments/assets/b3a15b1b-77e2-4392-a45b-b6733a9903f1
What happens when I click the close button which only call navigation.goBack (crash)
https://github.com/user-attachments/assets/3e8e2a6d-3698-470c-8dde-fcecca19d8b1
What happens when I click to choose a season. (another modal is spawned)
The function use navigation.popTo and nothing else is called.
The error of undefined is because the params are also not being merged, instead a new modal is spawned which only has the currentSeason, the screen is, of course, expecting the id to be always provided.
on the 0.79.3 I was just doing
navigation.popTo('Series') and it was working fine, with 0.80 it crash like the goBack, so I refractored to the whole navigation tree:
/** @ts-expect-error */
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
navigation.popTo('Tab', {
screen: activeTab,
params: {
screen: 'Series',
params: {
currentSeason: season,
merge: true,
},
},
});
and this is what happens:
https://github.com/user-attachments/assets/f1716da1-16e3-4730-9ed1-de536685bb13
Sorry I'm unable to provide a reproduction as I'm on a mac which barely can handle my project and I have just a few GB left, however I tried to catch the crash on xcode and this is the log, it point to react native fabric, tbh I didn't see any react-native-screens file involved into the error tree but watching what happens with the modal I think this is the right place to report this.
I waited two weeks before reporting this because I'm still not sure what is going on and I also tried to refractor a bit my code but it seems broken at all, I also tried the nightly version of rn screens.
TCP Conn 0x12e354be0 Failed : error 0:61 [61]
*** Assertion failure in -[RCTComponentViewRegistry _enqueueComponentViewWithComponentHandle:componentViewDescriptor:](), /Users/simo97/Desktop/app/node_modules/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.mm:115
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'RCTComponentViewRegistry: Attempt to recycle a mounted view.'
*** First throw call stack:
(0x196aa321c 0x193f3dabc 0x195da1810 0x10617d3cc 0x10617c798 0x1061c3d78 0x1061c3b68 0x1061c3b0c 0x1061c3ab4 0x1061c3a80 0x1061c2908 0x105f4f384 0x105f4e604 0x105f4e438 0x1061bde98 0x1061bdbc8 0x1061bd538 0x105d1730c 0x101568584 0x101582064 0x1015a2f70 0x101578548 0x101578484 0x1969f5d90 0x1969994f4 0x19699ac3c 0x1e3b79454 0x1993ad274 0x199378a28 0x19945a168 0x10580d3e8 0x10580d358 0x10580de78 0x1bd86ff08)
libc++abi: terminating due to uncaught exception of type NSException
Snack or a link to a repository
none
Screens version
latest and canary tried
React Native version
0.80
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone 12 Pro
Acknowledgements
Yes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the reported navigation.goBack and navigation.popTo flows, including the nested navigation parameters and modal behavior. Use the crash log's RCTComponentViewRegistry.mm assertion as the first native entry point, then investigate the RN 0.80, Fabric, iOS, and Hermes configuration. Done means reproducing the crash or narrowing it to a confirmed react-native-screens issue with a focused test or reproducible case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100