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

bridge.surfacePresenter is not set on Fabric #25968

Closed
tjzel opened this issue Dec 15, 2023 · 3 comments
Closed

bridge.surfacePresenter is not set on Fabric #25968

tjzel opened this issue Dec 15, 2023 · 3 comments
Assignees
Labels
Development Builds needs review Issue is ready to be reviewed by a maintainer outdated stale

Comments

@tjzel
Copy link

tjzel commented Dec 15, 2023

Summary

This issue was reported to Reanimated: software-mansion/react-native-reanimated#5497.

In Reanimated we have the following line:

Screenshot 2023-12-15 at 14 56 00

Which is executed on boot of the app and after a reload. It works fine without Expo. With Expo however, self.bridge.surfacePresenter is correct on boot and nil after a reload.

After a reload the setter here

Screenshot 2023-12-15 at 14 59 03

doesn't get called for the bridge acquired by Reanimated. This causes the app to crash. Keep in mind you don't need to use Reanimated, only have it installed.

It might be related to the fact that

Screenshot 2023-12-15 at 14 58 09

is only executed on boot, but I'm not sure about that.

Managed or bare workflow?

bare

What platform(s) does this occur on?

iOS

Package versions

  • Expo 50.0.0-preview.3 (happens on 49 as well)
  • expo-dev-client 3.3.2
  • react-native 0.73.0

Environment

expo-env-info 1.0.5 environment info:
  System:
    OS: macOS 13.5.2
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    Watchman: 2023.12.04.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.14.2 - /Users/user/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2
    Android SDK:
      Android NDK: 23.1.7779620
  IDEs:
    Android Studio: 2022.3 AI-223.8836.35.2231.10811636
    Xcode: 15.1/15C65 - /usr/bin/xcodebuild
  npmPackages:
    expo: ~50.0.0-preview.3 => 50.0.0-preview.3
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    react-native: 0.73.0 => 0.73.0
    react-native-web: ~0.19.6 => 0.19.9
  Expo Workflow: bare

Reproducible demo

Follow the reproduction steps provided here software-mansion/react-native-reanimated#5497.

Stacktrace (if a crash is involved)

No response

@gabrieldonadel
Copy link
Member

Hi @tjzel I believe this is actually a race condition happening while the bridge is being invalidated, I can reproduce this same issue in a project without expo by reloading the app by double pressing "r"

Screen.Recording.2023-12-20.at.10.38.08.mov

Copy link
Contributor

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Mar 19, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development Builds needs review Issue is ready to be reviewed by a maintainer outdated stale
Projects
None yet
Development

No branches or pull requests

3 participants