getsentry / sentry-wizard

Sentry Project Setup Wizard
MIT License
192 stars 48 forks source link

Loading Wizard failed. Please try again in a few minutes and let us know if this issue persists #405

Closed zhutoutoutousan closed 8 months ago

zhutoutoutousan commented 1 year ago

Environment

Node Version: v18.14.0 Windows 11 22H2

Steps to Reproduce

  1. Use turborepo to create a package based monorepo with pnpm workspace as manager
  2. Follow the official sentry nextjs pendo, execute npx @sentry/wizard -i nextjs --debug in {TURBOREPO_PATH}/app/{DESIRED_APP_PATH}/ where package.json resides

Expected Result

Loading Wizard should succeed and life should be right as rain ๐Ÿก

Actual Result

PS {DESIRED_APP_PATH}> npx @sentry/wizard -i nextjs --debug
Need to install the following packages:
  @sentry/wizard@3.10.0
Ok to proceed? (y) Y
{
        "_": [],
        "i": "nextjs",
        "integration": "nextjs",
        "debug": true,
        "uninstall": false,
        "skip-connect": false,
        "skipConnect": false,
        "quiet": false,
        "s": false,
        "signup": false,
        "disable-telemetry": false,
        "disableTelemetry": false,
        "$0": "C:\\Users\\Administrator\\AppData\\Local\\npm-cache\\_npx\\a8388072043b4cbc\\node_modules\\@sentry\\wizard\\dist\\bin.js"
}
Running Sentry Wizard...
version: 3.10.0 | sentry-cli version: 1.75.2
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)
Skipping connection to Sentry due files already patched

{
        "integration": {
                "_argv": {
                        "_": [],
                        "i": "nextjs",
                        "integration": "nextjs",
                        "debug": true,
                        "uninstall": false,
                        "skip-connect": false,
                        "skipConnect": false,
                        "quiet": false,
                        "s": false,
                        "signup": false,
                        "disable-telemetry": false,
                        "disableTelemetry": false,
                        "$0": "C:\\Users\\Administrator\\AppData\\Local\\npm-cache\\_npx\\a8388072043b4cbc\\node_modules\\@sentry\\wizard\\dist\\bin.js"
                },
                "_isDebug": true
        }
}

{
        "integration": {
                "_argv": {
                        "_": [],
                        "i": "nextjs",
                        "integration": "nextjs",
                        "debug": true,
                        "uninstall": false,
                        "skip-connect": false,
                        "skipConnect": false,
                        "quiet": false,
                        "s": false,
                        "signup": false,
                        "disable-telemetry": false,
                        "disableTelemetry": false,
                        "$0": "C:\\Users\\Administrator\\AppData\\Local\\npm-cache\\_npx\\a8388072043b4cbc\\node_modules\\@sentry\\wizard\\dist\\bin.js"
                },
                "_isDebug": true
        }
}

โ”Œ   Sentry Next.js Wizard 
โ”‚
โ—‡   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                 โ”‚
โ”‚  This Wizard will help you set up Sentry for your application.  โ”‚
โ”‚  Thank you for using Sentry :)                                  โ”‚
โ”‚                                                                 โ”‚
โ”‚  Version: 3.10.0                                                โ”‚
โ”‚                                                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡  Are you using Sentry SaaS or self-hosted Sentry?
โ”‚  Sentry SaaS (sentry.io)
โ”‚
โ—‡  Do you already have a Sentry account?
โ”‚  Yes
โ”‚
โ–   Loading Wizard failed.
โ”‚
โ””  Please try again in a few minutes and let us know if this issue persists: https://github.com/getsentry/sentry-wizard/issues
Lms24 commented 1 year ago

Hi @zhutoutoutousan

this message appears if an Http request to sentry.io fails. You can try running

 curl https://sentry.io/api/0/wizard/

and see if if you get a resonse similar to

{"hash":"<hash value>"}
Lms24 commented 1 year ago

Please let us know if, after trying the curl command, you still have this problem.

github-actions[bot] commented 1 year ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." โ€• Ella Wheeler Wilcox ๐Ÿฅ€

iArchin commented 1 year ago

I also have the same problem with React Native project

Lms24 commented 1 year ago

Hi @iArchin can you share a reproducible example? For instance, the exact parameters with which you called the wizard? Does this happen with the latest wizard version?

iArchin commented 1 year ago

Hi @Lms24. Yes this is the latest as the Getting Started section says I just enter the npx @sentry/wizard@latest -s -i reactNative and after the question about do I have a Sentry account I get this message:


โ–   Loading Wizard failed.
โ”‚
โ””  Please try again in a few minutes and let us know if this issue persists: https://github.com/getsentry/sentry-wizard/issues
Lms24 commented 1 year ago

I tried reproducing this and for me, things load fine: image

Have you tried the curl command I posted in my initial reply?

drop0118 commented 9 months ago

I tried curl but get Loading Wizard failed. again.

image
Lms24 commented 9 months ago

Hmm Honestly, I'm not sure what's going on here. Querying the api/0/wizard/ endpoint via curl seems to work while querying the exact same endpoint doesn't work in the wizard.

Sorry for the naive question but does this always happen or was it a one-of?

barghi commented 9 months ago

I tried curl but get Loading Wizard failed. again.

image

I am facing this issue too

drop0118 commented 9 months ago

Hmm Honestly, I'm not sure what's going on here. Querying the api/0/wizard/ endpoint via curl seems to work while querying the exact same endpoint doesn't work in the wizard.

Sorry for the naive question but does this always happen or was it a one-of?

Always happened.

Lms24 commented 9 months ago

Hi @barghi and @drop0118 - we just released a new version of the wizard which will log out more details of the error/reason why this request is failing for you. Please run the wizard again (make sure to use @sentry/wizard@latest) and paste the log output here. It's not an ideal way of debugging but I can't reproduce this at all on my end. thank you!

drop0118 commented 9 months ago

Hi @barghi and @drop0118 - we just released a new version of the wizard which will log out more details of the error/reason why this request is failing for you. Please run the wizard again (make sure to use @sentry/wizard@latest) and paste the log output here. It's not an ideal way of debugging but I can't reproduce this at all on my end. thank you!

image
Lms24 commented 9 months ago

Hey @barghi and @drop0118, I tried replacing our request library axios with node-fetch to see if there's a difference. Maybe Axios is adding something to the request that makes us or some party in between block the request. This is not yet released as a stable version but as a beta because I want to see if it changes anything at all. So to run this, please run

npx @sentry/wizard@3.20.3-beta.0

please let me know about the result, thanks!

barghi commented 9 months ago

@Lms24 yes the solution you mentioned fixed the issue for me thank you for that.

Lms24 commented 9 months ago

thanks for confirming!

@drop0118 since you were also affected - would you mind confirming the beta version fixes the issue for you too?

St-coder commented 9 months ago

me too; fix this bug,please!

Lms24 commented 9 months ago

@St-coder I'm rarely getting annoyed by GH users but if you wanna see a bug fixed, don't just downvote me when I outline my fix ;) For instance, you could let me know if running the beta fixed the issue for you.

St-coder commented 8 months ago

@St-coder I'm rarely getting annoyed by GH users but if you wanna see a bug fixed, don't just downvote me when I outline my fix ;) For instance, you could let me know if running the beta fixed the issue for you.

Sorry! I apologize for my behavior. I tried the method you provided, but it still gives an error. please help me solve it.

npx @sentry/wizard@3.20.3-beta.0

image image image

Lms24 commented 8 months ago

@St-coder no worries! Unfortunately, I still don't have a concrete idea what could be causing this difference in request behaviour. Given that the switch from axios tonode-fetch (which is what I did in the beta version) also didn't help, I don't think that it's something we do wrong in the wizard in particular. You can see for yourself, we only make a simple GET request to the very same URL: https://github.com/getsentry/sentry-wizard/blob/5a5187647fc3f755b30c5044dfa60b15abd6b8ed/src/utils/clack-utils.ts#L892

My overall suspicion for all of the errors mentioned in this thread is that an entity is interfering with the request (e.g. China's firewall). I cannot tell you how to work around this but so far all the reports we have received seem to confirm this pattern.

St-coder commented 8 months ago

@St-coder no worries! Unfortunately, I still don't have a concrete idea what could be causing this difference in request behaviour. Given that the switch from axios tonode-fetch (which is what I did in the beta version) also didn't help, I don't think that it's something we do wrong in the wizard in particular. You can see for yourself, we only make a simple GET request to the very same URL:

https://github.com/getsentry/sentry-wizard/blob/5a5187647fc3f755b30c5044dfa60b15abd6b8ed/src/utils/clack-utils.ts#L892

My overall suspicion for all of the errors mentioned in this thread is that an entity is interfering with the request (e.g. China's firewall). I cannot tell you how to work around this but so far all the reports we have received seem to confirm this pattern.

Thank you, I have found the cause. It may be due to the Chinese firewall. After taking the steps to privatize Sentry, the issue did not occur again.

Please help me close this issue. The problem has been solved. Thank you!