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

Warn users when a white space is detected in source map path in Xcode builds

Open krystofwoldrich opened this issue 1 year ago • 0 comments

Description

React Native Xcode builds fail to generate source maps if a white space character is on the path to the source map, https://github.com/facebook/react-native/issues/41652.

This can happen:

  • because the project itself is on a patch with a white space
  • SOURCEMAP_FILE was set to a path with white space
  • Scheme name contains white space

This doesn't affect build without source maps, source maps are disabled by default. When developers add Sentry, which enables source maps, it looks like Sentry is causing the build to fail.

We can't fix the underlying issue, but we can warn our users about it when we detect the white space.

### Tasks
- [ ] Warn users about white space on the source map path (should give solution)
- [ ] If it's a schema name can we generate the source map elsewhere? (This would be P2)
- [ ] Should we skip generating the source map to avoid failing the build? (This could introduce a new issue, source maps not generated)
  • Related issue https://github.com/getsentry/sentry-react-native/issues/3583

krystofwoldrich avatar Feb 29 '24 10:02 krystofwoldrich