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

in new arch the modal stopped working correctly #2455

Open
philipheinser opened this issue Oct 27, 2024 · 16 comments
Open

in new arch the modal stopped working correctly #2455

philipheinser opened this issue Oct 27, 2024 · 16 comments
Assignees
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@philipheinser
Copy link

Description

new buggy behavior with new arch enabled:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-27.at.13.04.03.mp4

with old arch:

ScreenRecording_10-27-2024.13-05-13_1.MP4

Steps to reproduce

  1. enable new arch

  2. have a

<Stack.Screen
        options={{
          gestureEnabled: true,
          presentation: 'modal',
          headerShown: false,
        }}
        name="SettingsModal"
        component={SettingsStackNavigator}
      />

that pushes a navigation stack

Snack or a link to a repository

https://snack.expo.dev/@philipheinser/gnarly-red-bagel

Screens version

4.0.0-beta.14

React Native version

0.76.0

Platforms

iOS

JavaScript runtime

JSC

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

Real device

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided labels Oct 27, 2024
@RyanTG
Copy link

RyanTG commented Oct 28, 2024

Might be useful to describe the buggy behavior with words, in addition to your videos. Sometimes videos do not speak for themselves. Plus, your second video isn't loading for me.

@alduzy alduzy self-assigned this Oct 29, 2024
@alduzy
Copy link
Member

alduzy commented Oct 29, 2024

@philipheinser Thanks for reporting. Unfortunately I was unable to reproduce the problem. Can you confirm that you're able to replicate it using the snack provided?

The versions of the dependencies in the snack appear to be different from those reported here. Please specify the versions you're using.

@philipheinser
Copy link
Author

@alduzy the code provided should work in a new arch project not in the snack link. It was just required to open the issue for some reason. We don't use snack or expo we have a bare react native project.

@alduzy
Copy link
Member

alduzy commented Oct 29, 2024

@philipheinser Okay I get it. Can you confirm that you're able to reproduce the issue by pasting the contents of App.tsx file into a bare react native project then? It does not work for me, that's why I am asking.

@chrfalch
Copy link

Can confirm that this also fails in a bare react native project (0.76/new arch). The problem seems to be related to how the Modal screen in RNScreens 4.0 calculates layout when using the new arch.

To reproduce I used the following dependencies:

"@react-navigation/native": "7.0.0-rc.20",
"@react-navigation/native-stack": "7.0.0-rc.28",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.0.0-beta.14"

@chrfalch
Copy link

I've made a reproduction using bare RN 0.76 that shows the error. The strange thing is that I'm able to narrow it down to using an Animated.View (REA) with an animated style. Removing the animated style removes the error above...

This repro contains all the details:

https://github.com/chrfalch/screens-repro

@alduzy
Copy link
Member

alduzy commented Oct 31, 2024

Hey @chrfalch thanks for reporting. It looks like it's a reanimated problem.

I copied your reproduction code into a workspace with older versions to see if that's a regression and it worked as expected. Eventually found out downgrading reanimated to 3.14.0 resolves the issue for me.

@chrfalch
Copy link

Hi @alduzy - thanks!! Did you try all the versions from 3.16 -> 3.14?

@alduzy
Copy link
Member

alduzy commented Oct 31, 2024

@chrfalch just 3.15 and 3.14

@chrfalch
Copy link

Just wondering if we could try to pinpoint/identify the change that introduced this bug...?

@alduzy
Copy link
Member

alduzy commented Oct 31, 2024

I didn't go that far into the investigation

@chrfalch
Copy link

chrfalch commented Oct 31, 2024

image

I understand why you didn't try each of them :) :)

@alduzy
Copy link
Member

alduzy commented Oct 31, 2024

@philipheinser Are you using reanimated as well? I feel like it's not the same issue we're talking about 😅

Let me know when you manage to prepare the reproducible code so that I can check it. Looking at the recordings, I suspect that your issue may be related to navigation, but cannot confirm without a working repro.

@chrfalch
Copy link

chrfalch commented Oct 31, 2024

Reverting the commits from this PR when using 3.15.0 or REA seems to fix the issue:

software-mansion/react-native-reanimated#6214

I'll make an issue referencing this issue in the REA repo.

@philipheinser
Copy link
Author

@alduzy we use reanimated in the project but not in the screen that we are pushing.

@chrfalch
Copy link

chrfalch commented Nov 1, 2024

software-mansion/react-native-reanimated#6659

I think we can close this one then, @alduzy - and continue tracking in the REA issue.

@alduzy alduzy added the Close when stale This issue is going to be closed when there is no activity for a while label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

4 participants