Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Expo SDK50] npx sentry-expo-upload-sourcemaps dist throws error, sentry-cli is not recognized as an internal or external command #3613

Closed
5 of 11 tasks
leons1767 opened this issue Feb 21, 2024 · 8 comments · Fixed by #3643

Comments

@leons1767
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 5.17.0

react-native version: 0.73.4

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: process.env.SENTRY_DSN,
    enabled: !__DEV__, 
    debug: false 
  });

I have the following issue:

npx sentry-expo-upload-sourcemaps dist returns below error

⬆️ Uploading dist\_expo\static\js\ios\index-***.hbc bundle and sourcemap...
'D:\***\***\node_modules\@sentry\cli\bin\sentry-cli' is not recognized as an internal or external command,
operable program or batch file.
node:child_process:965
    throw err;
    ^

Error: Command failed: D:\***\***\node_modules\@sentry\cli\bin\sentry-cli sourcemaps upload --debug-id-reference dist\_expo\static\js\ios\index-***.hbc dist\_expo\static\js\ios\index-***.hbc.map
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at Object.<anonymous> (D:\***\***\node_modules\@sentry\react-native\scripts\expo-upload-sourcemaps.js:151:3)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 18904,
  stdout: null,
  stderr: null
}

Node.js v21.6.2

Steps to reproduce:

  1. Run eas update --branch production --platform ios to produce new sourcemaps in dist folder
  2. Run npx sentry-expo-upload-sourcemaps dist
  • Installed using npx expo install @sentry/react-native version 5.17.0.
  • Tried updating @sentry/react-native to version 5.19.0, same error.
  • eas build automatic sourcemaps upload is working fine

Actual result:

⬆️ Uploading dist\_expo\static\js\ios\index-***.hbc bundle and sourcemap...
'D:\***\***\node_modules\@sentry\cli\bin\sentry-cli' is not recognized as an internal or external command,
operable program or batch file.
node:child_process:965
    throw err;
    ^

Error: Command failed: D:\***\***\node_modules\@sentry\cli\bin\sentry-cli sourcemaps upload --debug-id-reference dist\_expo\static\js\ios\index-***.hbc dist\_expo\static\js\ios\index-***.hbc.map
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at Object.<anonymous> (D:\***\***\node_modules\@sentry\react-native\scripts\expo-upload-sourcemaps.js:151:3)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 18904,
  stdout: null,
  stderr: null
}

Node.js v21.6.2

Expected result:

New sourcemaps successfully updated to sentry.io

@krystofwoldrich
Copy link
Member

@leons1767

Thank you for the message,
it seems like the error is related to the environment, that's why it executes in eas build.

What command line are you using cmd, powershel, winbash?

@krystofwoldrich krystofwoldrich moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Feb 23, 2024
@Bi0max
Copy link

Bi0max commented Feb 23, 2024

Having the same bug at the moment

@krystofwoldrich
Copy link
Member

Hi @Bi0max, thank you for the message, what os are you on?

@Bi0max
Copy link

Bi0max commented Feb 23, 2024 via email

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 23, 2024
@leons1767
Copy link
Author

@leons1767

Thank you for the message, it seems like the error is related to the environment, that's why it executes in eas build.

What command line are you using cmd, powershel, winbash?

@krystofwoldrich, thank you for your response. I was using cmd and gitbash, both fail to execute successfully. Are you able to replicate the same problem?

@kahest
Copy link
Member

kahest commented Feb 27, 2024

@leons1767 thanks for confirming - we didn't replicate this yet but will tackle this soon

@CteixeiraPW
Copy link

I have the same error when I run the command npx sentry-expo-upload-sourcemaps dist and I tried on CMD, Git Batch, PowerShell (old and new version), on Windows 11. Any suggestion?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 27, 2024
@krystofwoldrich
Copy link
Member

@CteixeiraPW Thank you for the extra details. We will update this issue with more information soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants