sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Expo managed workflow, local xcode builds and SENTRY_DISABLE_AUTO_UPLOAD

Open leemhenson opened this issue 1 year ago • 3 comments

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [ ] Android

SDK:

  • [x] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 5.17.0

react-native version: 0.73.0

Are you using Expo?

  • [x] Yes
  • [ ] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

N/A

Configuration:

(@sentry/react-native)

withSentry({
  // .. my expo config
}, {
  organization: "my-organization",
  project: "my-project",
});

I have the following issue:

I can't see an easy way to set the SENTRY_DISABLE_AUTO_UPLOAD environment variable in .xcode.env.local so that building my app in xcode locally completes without popping up an warning about failure to upload:

image

and clicking "Show details" reveals:

image

As an Expo managed workflow user I am not in control of .xcode.env.local, it gets generated by expo prebuild. I can write a custom Expo plugin to modify that file but it seems like a lot of effort. Ideally I'd like to see this supported:

withSentry({
  // .. my expo config
}, {
  organization: "my-organization",
  project: "my-project",
  uploadSourcemaps: false, // for example
});

Steps to reproduce:

  • Create Expo app with managed workflow
  • Install @sentry/react-native per the docs
  • expo prebuild
  • Open xcode and attempt to build the app

Actual result:

As described above.

Expected result:

No errors about uploads when I'm building locally.

leemhenson avatar Jan 25 '24 12:01 leemhenson

Hi @leemhenson, thank you we agree, this is a valuable option to be included in the @sentry/react-native/expo plugin options.

krystofwoldrich avatar Jan 30 '24 17:01 krystofwoldrich

Also running an expo app and would like to have this option to disable the upload for local development builds

Including SENTRY_DISABLE_AUTO_UPLOAD in the .env files doesn't seem to have an effect on prebuild

AdamTyler avatar Mar 22 '24 17:03 AdamTyler

@AdamTyler Thank you for the message, currently only .xcode.env files are loaded in the build phases.

krystofwoldrich avatar Mar 25 '24 10:03 krystofwoldrich