facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
116.9k stars 24.05k forks source link

UI Binding Issue with Consecutive Modal Prompts on Latest iOS Versions #45137

Open capillaryjaico opened 1 week ago

capillaryjaico commented 1 week ago

Description

Hi team,

Currently, I am using two Modal prompts consecutively to display force update popups based on a condition. However, there's an issue where the UI thread is occasionally not binding properly after dismissing the first prompt. Please ensure that after dismissing the first prompt, the second prompt is not bound.

After reviewing everything, I understand this is an iOS core library binding issue and it's occurring from the latest iOS version onwards. Could you please provide me with a solution to resolve this issue?

Thank you!

Steps to reproduce

  1. Reproduce the Issue: Ensure you can consistently replicate the problem where the UI thread fails to bind properly after dismissing the first modal prompt and attempting to display the second.

  2. the issue specifically occurs on the latest iOS versions and doesn't affect earlier versions.

  3. Investigate how the core iOS libraries handle modal prompt bindings, especially focusing on changes or updates in the latest iOS versions.

  4. UI thread when dismissing and attempting to bind subsequent modal prompts. Look for any inconsistencies or errors in the binding process.

  5. Refer to Apple's official documentation, release notes, and developer forums to see if there are known issues or changes related to modal prompt handling in the latest iOS versions.

React Native Version

0.74

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M3
  Memory: 203.80 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.7.3
    path: ~/.nvm/versions/node/v21.7.3/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v21.7.3/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/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

npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-logical-assignment-operators@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.
npm WARN deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

Reproducer

https://github.com/react-native-modal/react-native-modal/issues/161

Screenshots and Videos

Currently, I am using two Modal prompts consecutively to display force update popups based on a condition. However, there's an issue where the UI thread is occasionally not binding properly after dismissing the first prompt. Please ensure that after dismissing the first prompt, the second prompt is not bound.

After reviewing everything, I understand this is an iOS core library binding issue and it's occurring from the latest iOS version onwards. Could you please provide me with a solution to resolve this issue?

github-actions[bot] commented 1 week ago
:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2
github-actions[bot] commented 1 week ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.