sentry-wizard icon indicating copy to clipboard operation
sentry-wizard copied to clipboard

Error 400 when setting up on Nextjs

Open danhab99 opened this issue 1 year ago • 3 comments

Environment

What version are you running? Etc.

    "@sentry/nextjs": "^7.13.0",
    "next": "^12.2.5",
    node -v v16.16.0

Steps to Reproduce

  1. Found this guide
  2. Ran npm install --save @sentry/nextjs
  3. Ran npx @sentry/wizard -i nextjs --debug
  4. Observed error

Expected Result

Setup complete

Actual Result

➜  sentry git:(dan/setup-sentry) ✗ npx @sentry/wizard -i nextjs --debug
{
        "_": [],
        "i": "nextjs",
        "integration": "nextjs",
        "debug": true,
        "uninstall": false,
        "skip-connect": false,
        "skipConnect": false,
        "quiet": false,
        "u": "https://sentry.io/",
        "url": "https://sentry.io/",
        "$0": "../../.npm/_npx/a8388072043b4cbc/node_modules/.bin/sentry-wizard"
}
Running Sentry Wizard...
version: 2.2.0 | sentry-cli version: 1.74.5
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)

✓ A compatible version of `next` is specified in `package.json`.
✓ A compatible version of `@sentry/nextjs` is specified in `package.json`.

/
Loading wizard for https://sentry.io/



Please open
https://sentry.io/account/settings/wizard/anbp5cgc7c6knzpi9c5hoh4tcg069ov5d00vr4rpkpxnyefnkjlnmv4k20k4lbc1/
in your browser (if it's not open already)


{
        "integration": {
                "_argv": {
                        "_": [],
                        "i": "nextjs",
                        "integration": "nextjs",
                        "debug": true,
                        "uninstall": false,
                        "skip-connect": false,
                        "skipConnect": false,
                        "quiet": false,
                        "u": "https://sentry.io/",
                        "url": "https://sentry.io/",
                        "$0": "../../.npm/_npx/a8388072043b4cbc/node_modules/.bin/sentry-wizard"
                },
                "_isDebug": true,
                "_sentryCli": {
                        "_argv": {
                                "_": [],
                                "i": "nextjs",
                                "integration": "nextjs",
                                "debug": true,
                                "uninstall": false,
                                "skip-connect": false,
                                "skipConnect": false,
                                "quiet": false,
                                "u": "https://sentry.io/",
                                "url": "https://sentry.io/",
                                "$0": "../../.npm/_npx/a8388072043b4cbc/node_modules/.bin/sentry-wizard"
                        }
                },
                "_shouldConfigure": {}
        },
        "hash": "anbp5cgc7c6knzpi9c5hoh4tcg069ov5d00vr4rpkpxnyefnkjlnmv4k20k4lbc1"
}

/
Polling: https://sentry.io/api/0/wizard/anbp5cgc7c6knzpi9c5hoh4tcg069ov5d00vr4rpkpxnyefnkjlnmv4k20k4lbc1/

/ Waiting for Sentry...
Polling received data


Polling received:


Error: Received status 400
    at WaitForSentry.<anonymous> (/home/dan/.npm/_npx/a8388072043b4cbc/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:95:63)
    at step (/home/dan/.npm/_npx/a8388072043b4cbc/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:46:23)
    at Object.next (/home/dan/.npm/_npx/a8388072043b4cbc/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:27:53)
    at fulfilled (/home/dan/.npm/_npx/a8388072043b4cbc/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:18:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

| Waiting for Sentry...%

danhab99 avatar Sep 15 '22 14:09 danhab99

Hi, just tried it out. Even though It looks weird I believe this behavior is fine. The Sentry wizard endpoint will return 400 to the polling request, until you have logged in via browser.

Were you able to do that?

lforst avatar Sep 22 '22 12:09 lforst

I'm running the wizard on a remote machine, there's no browser to open. I was expecting the wizard to wait for me to open the link but it doesn't.

danhab99 avatar Sep 28 '22 13:09 danhab99

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 🥀

github-actions[bot] avatar Oct 20 '22 00:10 github-actions[bot]