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

Minimal Expo 52 app crashes when using form sheet modals #2401

Open
doughsay opened this issue Nov 14, 2024 · 7 comments
Open

Minimal Expo 52 app crashes when using form sheet modals #2401

doughsay opened this issue Nov 14, 2024 · 7 comments
Labels
Bug Platform: Android Platform: Expo An issue exclusively in Expo

Comments

@doughsay
Copy link

Describe the Bug
In a minimal expo 52 app with new arch disabled, having a set-up track player causes a crash when attempting to open a form sheet modal, but only after first closing the app once.

Steps To Reproduce
I have provided a minimal reproducing case that should demonstrate the issue. I've also recorded a short video showing the issue:

rntp-crash.webm

Steps:

  1. open the app
  2. see that the form sheet modal opens
  3. close the app (not just background)
  4. open the app again
  5. try and open the modal and see that it crashes instead

This only happens when track player has been set up.

Code To Reproduce
Minimal expo repro app here: https://github.com/doughsay/expo-test-app

Replicable on Example App?
Can you replicate this bug in the React Native Track Player Example App?

N/A / example app doesn't use expo

Environment Info:

System:
  OS: Linux 6.9 Pop!_OS 22.04 LTS
  CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
  Memory: 12.14 GB / 30.50 GB
  Shell:
    version: 3.3.1
    path: /usr/bin/fish
Binaries:
  Node:
    version: 22.11.0
    path: ~/.asdf/installs/nodejs/22.11.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.yarn/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.asdf/plugins/nodejs/shims/npm
  Watchman:
    version: 4.9.0
    path: /usr/bin/watchman
SDKs:
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 34.0.0
      - 35.0.0
      - 35.0.0
    System Images:
      - android-30 | Google Play Intel x86 Atom
      - android-33 | Google Play Intel x86_64 Atom
      - android-34 | Google Play Intel x86_64 Atom
      - android-35 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: AI-242.23339.11.2421.12550806
Languages:
  Java:
    version: 22.0.2
    path: /home/chris/.asdf/shims/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Paste the exact react-native-track-player version you are using: [email protected]
Real device? Or simulator?: both
What OS are you running?: linux

How I can Help
What can you do to help resolve this?

If this is a bug in react-native-screens or expo, I can help by opening issues with those repos as well; but since it only happens with RNTP setup, I figured I'd ask here first for some guidance.

Have you investigated the underlying JS or Swift/Android code causing this bug?

No, I don't really know where to start.

Can you create a Pull Request with a fix?

I don't know what the problem is yet.

@doughsay doughsay added the Bug label Nov 14, 2024
@puckey
Copy link
Collaborator

puckey commented Nov 14, 2024

Guessing that this is related to the timers bug which will be fixed when this pr ships: facebook/react-native#47496

@jspizziri jspizziri added Platform: Android Platform: Expo An issue exclusively in Expo labels Nov 14, 2024
@lovegaoshi
Copy link
Contributor

im rather inclined to believe this is an expo issue. try reproducing without rntp.

@doughsay
Copy link
Author

im rather inclined to believe this is an expo issue. try reproducing without rntp.

I tried and wasn't able to, the only thing to start causing it was adding rntp. I was thinking it might have something to do with the headless js task that rntp creates? So I was thinking of trying to repro today with a non-rntp headless task, if that's even possible on expo.

@doughsay
Copy link
Author

Guessing that this is related to the timers bug which will be fixed when this pr ships: facebook/react-native#47496

I thought this only affected the new architecture, which I have turned off.

@lovegaoshi
Copy link
Contributor

u can register a headless task via AppRegistry.registerHeadlessTask. see https://reactnative.dev/docs/headless-js-android

@doughsay
Copy link
Author

I tried using expo-background-fetch to repro, no dice; works as expected. But I guess that's not really the same thing...?

@doughsay
Copy link
Author

opened an issue here, maybe someone there can help me: software-mansion/react-native-screens#2507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform: Android Platform: Expo An issue exclusively in Expo
Projects
None yet
Development

No branches or pull requests

4 participants