getsentry/sentry-wizard

Error during setup with wizard on a brand new react-native project

nromptea42 opened this issue · 10 comments

Environment

macOS 14.2.1 (23C71)
node v20.6.1
npx v9.8.1
yarn v1.22.19
react-native 0.73.3

Steps to Reproduce

$ npx react-native init Test123
$ npx @sentry/wizard -s -i reactNative

Expected Result

The documentation said that the wizard would patch the natives files but it stopped during the installation of the package.

Actual Result

Screenshot 2024-01-30 at 17 41 37

During the step Installed @sentry/react-native with Yarn. I got this :

TypeError: Cannot read properties of undefined (reading 'dsn')
    at /Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/wizard/dist/src/react-native/react-native-wizard.js:179:81
    at /Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/wizard/dist/src/telemetry.js:129:90
    at handleCallbackErrors.handleCallbackErrors.status.status (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/tracing/trace.js:85:13)
    at Object.handleCallbackErrors (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js:26:26)
    at /Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/tracing/trace.js:84:33
    at Hub.withScope (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/hub.js:145:28)
    at Object.withScope (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/exports.js:170:20)
    at startSpan (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/core/cjs/tracing/trace.js:74:20)
    at traceStep (/Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/wizard/dist/src/telemetry.js:129:33)
    at /Users/nathan/.npm/_npx/ddb126e78325956c/node_modules/@sentry/wizard/dist/src/react-native/react-native-wizard.js:178:68

Maybe I did something wrong or I'm using an unsupported version. Feel free to let me know if you need anything else.
Thank you

Hi @nromptea42 thanks for writing in!

Gonna tag @krystofwoldrich - could you take a look at this please? Thanks!

I also experience a similar error, whenever i try to setup sentry on my app it give me this error.

Screenshot 2024-02-01 at 1 59 30 PM

At first i thought the cause of the error is my app.tsx already having the declaration of sentry so i tried to remove it and let sentry do it.

Screenshot 2024-02-01 at 2 01 33 PM

But i still receive this error. so in the end, inside my android and ios folder, i have no setting file with sentry informations

Hey @ElSeniorMikael thanks for reporting! I believe the problem you're experiencing happens at a later stage but we'll take a look.

Hi everyone,
the original error /@sentry/wizard/dist/src/react-native/react-native-wizard.js:179:81 is caused by the Sentry API not returning the selected project.

Hey @ElSeniorMikael thanks for reporting! I believe the problem you're experiencing happens at a later stage but we'll take a look.

Would you rather i make a new issue or we can do the follow up over here ?

@ElSeniorMikael A new issue would be better.

Hi everyone, the original error /@sentry/wizard/dist/src/react-native/react-native-wizard.js:179:81 is caused by the Sentry API not returning the selected project.

Should I create and use a new project in my organisation ? Or is it a problem with my organisation ?

@nromptea42 if you try creating a new project and selecting it in the wizard does anything change for you?

@nromptea42 if you try creating a new project and selecting it in the wizard does anything change for you?

Hello, it worked after creating a new project and using it.
I'm closing this, thanks a lot !

great to hear that it worked! Still kinda weird that this happened for your original project. For now let's treat this as a one-of but I'm curious if this is going to happen in the future. Regardless, sorry for the inconvenience and I hope things work now for you!