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

Adding Expo modules to a bare React Native app disables concurrent features. #25024

Closed
ahmetbicer opened this issue Oct 25, 2023 · 3 comments · Fixed by #25415
Closed

Adding Expo modules to a bare React Native app disables concurrent features. #25024

ahmetbicer opened this issue Oct 25, 2023 · 3 comments · Fixed by #25415

Comments

@ahmetbicer
Copy link

ahmetbicer commented Oct 25, 2023

Minimal reproducible example

https://github.com/ahmetbicer/expo-modules-concurrent-root-issue

Summary

After adding Expo modules to a bare React Native app with new arch enabled, concurrentRoot: true disappears, and React 18 features, such as automatic batching, are not working. This issue is observed only in Android; iOS works as expected.

Steps to Reproduce:

  • Create a new React Native app with npx react-native@latest init ConcurrentRootTest
  • Turn newArchEnabled flag to true in gradle.properties.
  • Run the app, see concurrentRoot: true in metro logs
  • Add Expo modules to the project with npx install-expo-modules@latest
  • Run the app, concurrentRoot: true disappears and react 18 features such as automatic batching are not working.

Expected Behavior:
The concurrentRoot: true property should persist even after Expo modules are added.

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.5.2
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 2023.07.24.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ^49.0.0 => 49.0.16
react: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
Expo Workflow: bare

@ahmetbicer ahmetbicer added the needs validation Issue needs to be validated label Oct 25, 2023
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Oct 25, 2023
@Kudo Kudo added Android Issue accepted and removed needs review Issue is ready to be reviewed by a maintainer labels Oct 31, 2023
@Kudo Kudo self-assigned this Oct 31, 2023
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@ahmetbicer
Copy link
Author

Hi @Kudo, did you have time to look at this issue? Thanks in advance 🙏

Kudo added a commit that referenced this issue Dec 4, 2023
# Why

fixes #25024
close ENG-10499

# How

i missed aligning the ReactActivityDelegate changes during react native upgrade. this pr tried to fill the `launchOptions` from  `composeLaunchOptions()` as upstream: https://github.com/facebook/react-native/blob/5029cef0a99469e37bc2f4d72ca2e1f3d6791511/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java#L102-L109

# Test Plan

test repro from #25024
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this issue Jan 15, 2024
…#25415)

# Why

fixes expo#25024
close ENG-10499

# How

i missed aligning the ReactActivityDelegate changes during react native upgrade. this pr tried to fill the `launchOptions` from  `composeLaunchOptions()` as upstream: https://github.com/facebook/react-native/blob/5029cef0a99469e37bc2f4d72ca2e1f3d6791511/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java#L102-L109

# Test Plan

test repro from expo#25024
@FightFarewellFearless
Copy link

I think this problem still persists in react-native version 0.74 and expo sdk 51.0.0-preview.3

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

Successfully merging a pull request may close this issue.

4 participants