You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to react-native-community/cli#1537 some things in your react-native.config.js have been deprecated and removed, thus failing autolinking schema validation (for example ios.sharedLibraries).
Steps to Reproduce
Create a vanilla RN project with latest 0.69 RC with npx react-native init Example --version 0.69.0-rc.6.
Additionally, we need to remove the sharedLibraries from react-native.configs in order to allow the auto link to happen.
Or add a filter to not include those fields if running 0.69 or higher ( if that's possible)
Despite removing those fields, something is odd with Sentry CLI
Another change for 0.69: when using XCode, there is now a .xcode.env file that allows you to set the proper environment variables for the bundle build step, for example $NODE_BINARY.
It comes with a react-native/scripts/xcode/with-environment.sh script that will set the env var, then call its argument.
Unfortunately, this breaks @sentry/cli and I am not sure why:
Node found at: /Users/renchap/.nvm/versions/node/v16.14.0/bin/node # <== this is the first `with-environment.sh` call for expo-constants
Node found at: /Users/renchap/.nvm/versions/node/v16.14.0/bin/node # <== this is the second `with-environment.sh` call for sentry-cli
sentry-cli 1.74.4
Command line utility for Sentry.
This tool helps you manage remote resources on a Sentry server like
sourcemaps, debug symbols or releases. Use `--help` on the subcommands
to learn more about them.
USAGE:
sentry-cli <SUBCOMMAND>
OPTIONS:
--api-key <API_KEY> The given Sentry API key.
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
-h, --help Print this help message.
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug,
info, warn, error]
--url <URL> Fully qualified URL to the Sentry server.
[defaults to https://sentry.io/]
-V, --version Print version information.
SUBCOMMANDS:
bash-hook Prints out a bash script that does error handling.
difutil Locate or analyze debug information files.
help Prints this message or the help of the given subcommand(s)
info Print information about the Sentry server.
issues Manage issues in Sentry.
login Authenticate with the Sentry server.
projects Manage projects on Sentry.
react-native Upload build artifacts for react-native projects.
releases Manage releases on Sentry.
repos Manage repositories on Sentry.
send-event Send a manual event to Sentry.
upload-dif Upload debugging information files.
upload-proguard Upload ProGuard mapping files to a project.
I guess the CLI does not properly looks up its arguments, and as it is wrapped by with-environment.sh it tries to parse sentry-cli as an argument?
I'm currently working on a troubleshooting page with a workaround in order to unblock folks. getsentry/sentry-docs#5208 -> preview
We'll work on a fix as soon as we know what has to be changed.
Hi there! Just checking on that status of this? Should I not wait and just go w/ the workaround?
Reacted by Tomas Mozeris, Jie Li, Tapani Saarinen, Dr. Sergey Pogodin, Leonardo Silva, LydGol90, Mohamed Moussa, Will Tsang, Tom Corvus, Steffen Kleinle and 2 more
Manoel is back online tomorrow so we should see this patch merged, and a new release of sentry-wizard coming out soon. Sorry for the delay on this one folks.
Reacted by Christopher McKirgan and James
Reacted by LydGol90, Christopher McKirgan and kahakai
Activity
marandaneto commentedon Jun 7, 2022
Thanks @oblador we will have a look at it.
Likely a side effect of #2226
oblador commentedon Jun 7, 2022
@marandaneto no it's unrelated, it's because of the linked PR.
renchap commentedon Jun 21, 2022
I can confirm this.
After upgrading to the latest RN 0.69-rc6 version and running
pod update, I get:Please note the
Removing Sentryline.And after the upgrade, there is no Sentry-related packages in my
Podfile.lock.As the OP said, this is most probably due to the removal of
react-native linkcommand and the refactor of auto-linking made in the PR mentioned above.kelset commentedon Jun 22, 2022
@marandaneto just as an headsup, we are planning on releasing 0.69.0 this week
marandaneto commentedon Jun 22, 2022
We're going to look into this, thanks for the heads up.
Edit: maybe useful read: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
hookswere removed so there's a problem when doing this:sentry-react-native/react-native.config.js
Lines 11 to 16 in 8830dab
lucas-zimerman commentedon Jun 22, 2022
Additionally, we need to remove the
sharedLibrariesfrom react-native.configs in order to allow the auto link to happen.Or add a filter to not include those fields if running 0.69 or higher ( if that's possible)
Despite removing those fields, something is odd with Sentry CLI
Not sure which file or folder is missing.
marandaneto commentedon Jun 23, 2022
@lucas-zimerman iirc React Native has changed the way how it finds
node, it could be related to that.https://reactnative.dev/blog/2022/06/21/version-069#highlights-of-069
Addition of the new .xcode.env configuration file for more deterministically sourcing the node executable
marandaneto commentedon Jun 23, 2022
sentry-wizardpatches the xcode project file in order to be able to auto-upload debug symbols.The default code script has changed https://github.com/facebook/react-native/blob/main/template/ios/HelloWorld.xcodeproj/project.pbxproj#L267=
and I guess that sentry-wizard is replacing its default react-native configuration, this could also be the culprit for sentry-cli to fail.
Edit: also react/react-native#33777 (comment)
renchap commentedon Jun 24, 2022
Another change for 0.69: when using XCode, there is now a
.xcode.envfile that allows you to set the proper environment variables for the bundle build step, for example$NODE_BINARY.It comes with a
react-native/scripts/xcode/with-environment.shscript that will set the env var, then call its argument.The bundle build step becomes something like:
Unfortunately, this breaks
@sentry/cliand I am not sure why:I guess the CLI does not properly looks up its arguments, and as it is wrapped by
with-environment.shit tries to parsesentry-clias an argument?marandaneto commentedon Jun 24, 2022
I'm currently working on a troubleshooting page with a workaround in order to unblock folks.
getsentry/sentry-docs#5208 -> preview
We'll work on a fix as soon as we know what has to be changed.
5 remaining items
ken0nek commentedon Jun 30, 2022
It would be great if we can respect
.xcode.env, keepWITH_ENVIRONMENTand also make sentry work. Will take a look.marandaneto commentedon Jul 1, 2022
That's already possible, See docs getsentry/sentry-docs#5240
ken0nek commentedon Jul 1, 2022
Thank you so much for the info!
jmz527 commentedon Jul 12, 2022
Hi there! Just checking on that status of this? Should I not wait and just go w/ the workaround?
scrgh commentedon Jul 19, 2022
Any update on release fix ?
bruno-garcia commentedon Jul 19, 2022
The patch from @marandaneto has been approved by @kamilogorek : getsentry/sentry-wizard#173 (review)
Manoel is back online tomorrow so we should see this patch merged, and a new release of sentry-wizard coming out soon. Sorry for the delay on this one folks.
marandaneto commentedon Jul 21, 2022
I'll release a new version once https://github.com/getsentry/sentry-wizard
2.0.0and #2332 gets released.marandaneto commentedon Jul 22, 2022
Going to be released as 5.0.0-alpha.0