question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@sentry/react-native No such file or directory (os error 2)

See original GitHub issue

I wanted to reply on #2501 but it’s forbidden, so I have to open a new issue here

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (5.0.0-alpha4)
  • react-native-sentry (<= 0.43.2)

react-native version: 0.70.1

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

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

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
});

I have following issue:

[Description]

-> I installed @sentr/react-native 5.0.0, then npx sentry-wizard --url https://mysecretsentryurl.com -i reactNative -p ios android -> I tried to build, still failing with the same error -> I tried to change the shellScript according to that doc, putting

shellScript = "set -e\nexport SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI_PATH=\"../node_modules/@sentry/cli/bin/sentry-cli\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE\\\"\"";

but still the same error.

I fill stuck ! did I do something wrong ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
imanodaysoffdotcomcommented, Oct 2, 2022

@arnaudambro This worked for me -> https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/

In specifc i had to add this line “…/node_modules/react-native/scripts/react-native-xcode.sh” to the Bundle React Native code and images section in Build Phases. (Xcode)

Hope this works for you!

Screen Shot 2022-10-01 at 8 32 55 PM
2reactions
krystofwoldrichcommented, Oct 3, 2022

Thank you for the details. @imanodaysoffdotcom

This happens because sentry-react-native v4 doesn’t support RN v0.69 and above out of the box and wizard won’t work. And manual steps are required as described https://docs.sentry.io/platforms/react-native/troubleshooting/

If you want out-of-the-box support with the wizard please use the v5, currently in alpha.

@arnaudambro Were you upgrading from v4 to v5 or did you install v5 into a clean project?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No such file or directory (os error 2) for sentry-cli on step ...
Run or 'react-native run-ios' works. ... Everything works if I remove the sentry-cli part. ... Tried to install node_modules with both npm and...
Read more >
Troubleshooting for React Native | Sentry Documentation
Try passing --force-foreground to the Sentry CLI command in the build script. This is possibly a bug with our CLI that we are...
Read more >
Your Answer - Stack Overflow
I am attempting to launch npm run ios my react native app (fresh except for i installed Sentry), and the build fails at...
Read more >
No such file or directory (os error 2) for sentry-cli on step ...
No such file or directory (os error 2) for sentry-cli on step bundle RN code and images.
Read more >
Advanced Setup for React Native - Sentry Documentation
You will want to make sure you have already created a sentry.properties file at the root of your react native project. An example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found