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

Issue when displaying a modal after dismissing another modal #48611

Open
yonitou opened this issue Jan 10, 2025 · 12 comments
Open

Issue when displaying a modal after dismissing another modal #48611

yonitou opened this issue Jan 10, 2025 · 12 comments

Comments

@yonitou
Copy link

yonitou commented Jan 10, 2025

Description

Before RN 0.76.5, on iOS it was possible to show a modal and after dismissing it, showing another one.
Now, when doing the exact same thing on the old architecture the second modal is not showing up.
#47694
#48245
#48559

The error is not happening on new architecture

Steps to reproduce

  1. Create two different modals
  2. Show the first one by clicking on a button
  3. Then, create a button that will dismiss the first modal and display the second one
  4. The second one won't show up

React Native Version

0.76.5

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.2
  CPU: (10) arm64 Apple M1 Max
  Memory: 482.95 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.12.0
    path: ~/.nvm/versions/node/v22.12.0/bin/node
  Yarn: Not Found
  npm:
    version: 8.19.4
    path: ~/code/yonitou/hygo/node_modules/.bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.11.2
    path: /Users/yonitouboul/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/yonitouboul/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found


### Stacktrace or Logs

```text
No errors logs

Reproducer

https://github.com/yonitou/modal-bug

Screenshots and Videos

When I click on the button "Close modal", it should dismiss the red one and show the blue one but the blue one never shows.
You will notice that if enabling new architecture, the problem disappears
https://github.com/user-attachments/assets/72aca692-d90d-40f7-b500-ef574ae26658

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cortinico
Copy link
Contributor

The error is not happening on new architecture

Out of curiosity, what's the reason you can't use the old architecture?

Asking as, in the future we'll be dropping support for old arch. So yes, we can look into fixing this, but you should consider using new arch, especially if this behavior is already fixed.

@yonitou
Copy link
Author

yonitou commented Jan 10, 2025

I can't because I'm using react-native-maps which is not compatible with new architecture (yet) (we can see it on react native directory and on the repo itself)
It's the only package we are having that is not compatible.
But believe me, I'm just waiting to opt-in to new architecture :)

@cortinico
Copy link
Contributor

I can't because I'm using react-native-maps which is not compatible with new architecture (yet) (we can see it on react native directory and on the repo itself) It's the only package we are having that is not compatible. But believe me, I'm just waiting to opt-in to new architecture :)

Thanks for the insights 👍 Super valuable for us

@yonitou
Copy link
Author

yonitou commented Jan 14, 2025

Glad it helps ! Do you think it's possible to fix it in the next patch ?

@cortinico
Copy link
Contributor

Glad it helps ! Do you think it's possible to fix it in the next patch ?

The best course of action is actually to ask react-native-maps to migrate to New Architecture.
It's surprising this to me as I recall we supported the maintainer of react-native-maps to migrate to New Architecture last year:

@yonitou
Copy link
Author

yonitou commented Jan 14, 2025

Yes but even if it's the case, our app is quite big and we have more than 50k users. When I'll switch to the new architecture, I will need to make some tests, check that everything works well, it'll be a breaking change. Right now, we just need to release some fixes to our users and we are stuck because of this issue. We really need it to be fixed please 🙏

@andreamazzarella
Copy link

If useful (in case this issue is 'upvotable') - we are in the same situation: this issue affects our app, and we are not in a position to migrate to the New Architecture as we have a few dependencies not yet supporting it

@cortinico
Copy link
Contributor

Before RN 0.76.5

Do we know in which version this has regressed? Was it behaving correctly in 0.75?

@yonitou
Copy link
Author

yonitou commented Jan 16, 2025

I can just tell you that it was working perfectly in 0.74.5. I didn't try 0.75. I jumped from 0.74.5 to 0.76.5

@WilliamWelsh
Copy link

Last version I had where it worked was 0.74.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants