react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

RN 0.80 unstable modal and app crash

Open Pnlvfx opened this issue 6 months ago • 3 comments

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

Pnlvfx avatar Jun 24 '25 21:06 Pnlvfx

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar Jun 24 '25 21:06 github-actions[bot]

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Steps to reproduce section.

github-actions[bot] avatar Jun 25 '25 11:06 github-actions[bot]

Possibly related: https://github.com/react-navigation/react-navigation/issues/11270

Pnlvfx avatar Aug 02 '25 23:08 Pnlvfx