expo / sentry-expo

MIT License
202 stars 83 forks source link

Audio assets not bundled correctly into EAS app #255

Closed mfkrause closed 2 years ago

mfkrause commented 2 years ago

Summary

We've implemented Sentry in our Expo EAS app using this package and @sentry/react-native. Everything worked fine up to the uploading of the source maps. However, a few days into it, we've noticed a ton of thrown issues on Sentry in regards to our audio module powered by react-native-sound. Turns out, that in our iOS production builds the app wasn't able to find its audio assets at all. All attempts to load an audio file failed with the native iOS error "OSStatus error 2003334207", meaning that the asset couldn't be found. In the development builds and on Android everything works fine. As soon as we remove Sentry from the app, it works fine again.

I suspect this has something to do with the asset bundling of expo-updates but am not sure, since I haven't found a way how to use this package without expo-updates and the docs aren't too clear about why this package is needed in the first place. If I could isolate this to Expo Updates, I'd move the issue to the main repo. There has been an issue in the main Expo repo about a year ago about exactly this problem in regards to expo-updates - from the comments, this should have been fixed though. I've checked yarn why expo-asset and the version is 8.4.6, while the bug was supposed to be fixed in 8.3.3. So again not sure if this really comes from Expo Updates.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

44

Environment

expo-env-info 1.0.3 environment info:
    System:
      OS: macOS 12.3.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.18 - ~/Projects/visiontest/app/node_modules/.bin/yarn
      npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
      Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    IDEs:
      Android Studio: 2021.1 AI-211.7628.21.2111.8139111
      Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~44.0.0 => 44.0.6
      react: 17.0.1 => 17.0.1
      react-dom: 17.0.1 => 17.0.1
      react-native: 0.64.3 => 0.64.3
      react-native-web: 0.17.1 => 0.17.1
    npmGlobalPackages:
      eas-cli: 0.51.0
      expo-cli: 5.3.0
    Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

Can't share a simple code snippet for repro - however I'd be happy to provide a quick demo project if needed. Setting up a repro isn't too complicated, though:

  1. Set-up a new Expo EAS project.
  2. Add react-native-sound to it and play any local MP3 file.
  3. Build a production build using EAS.
  4. Note that it works fine in production builds.
  5. Add Sentry according to the Expo documentation.
  6. Build a production build using EAS again.
  7. Note how the sound doesn't play anymore.
github-actions[bot] commented 2 years ago

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

github-actions[bot] commented 2 years ago

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.