Sentry-react-native: Auto Sourcemap upload script on Xcode fails unless --force_foreground is present

Created on 23 Mar 2021  路  6Comments  路  Source: getsentry/sentry-react-native

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
React Native 2.3.0

Description

At the end of the compilation procedure on Android the source maps are uploaded correctly, but with iOS the files are not uploaded on sentry and no errors are shown

Build Phases

Bundle React Native code and images code

export SENTRY_PROPERTIES=sentry.properties
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map"
export NODE_BINARY=node
yarn buildTsCode
export ENTRY_FILE="artifacts/index.js"
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh

Upload Debug Symbols to Sentry

export SENTRY_PROPERTIES=sentry.properties
../node_modules/@sentry/cli/bin/sentry-cli upload-dsym

Type Bug CLI Awaiting Fix

Most helpful comment

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

All 6 comments

What does yarn buildTsCode do, I assume it builds ts code into js? Can you pass --verbose to the sentry-cli command, and see what it logs?

../node_modules/@sentry/cli/bin/sentry-cli react-native xcode --verbose ../node_modules/react-native/scripts/react-native-xcode.sh

Hi @jennmueng, buildTsCode is a custom script that i made to build the typescript code and do other actions.

I tried to put --verbose in the "Bundle React Native code and images code" script and these are the logs:

Schermata 2021-03-25 alle 10 24 46

Hi, probably same issue. I created an issue in sentry-cli repository. https://github.com/getsentry/sentry-cli/issues/932

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

Hi, actually --force-foreground flag worked well. Thanks for your help.

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

Hi, i'm sorry for my absence. Everything works with --force-foreground. Thank you

Was this page helpful?
0 / 5 - 0 ratings