Git Product home page Git Product logo

sentry-wizard's Introduction

Sentry

Sentry Wizard

The Sentry Wizard helps you set up your React Native, Cordova, Electron or Next.js projects with Sentry.

npm version npm dm npm dt Discord Chat

deps deps dev deps peer

Wizard in action

Usage

There are multiple ways to run the Wizard.

  1. Install globally and run it anywhere:
npm install -g @sentry/wizard
# or
yarn global add @sentry/wizard

sentry-wizard
  1. Install and run it in your project with yarn:
yarn add @sentry/wizard
yarn sentry-wizard
  1. Run it directly without installing:
npx @sentry/wizard

At the current moment, the wizard is meant to be used for React Native, Cordova, Electron or Next.js. If you have other platforms you would like the wizard to support, please open a GitHub issue!

Options

Options:
  --help             Show help                                         [boolean]
  --version          Show version number                               [boolean]
  --debug            Enable verbose logging
                     env: SENTRY_WIZARD_DEBUG                          [boolean]
  --uninstall        Revert project set up process
                     env: SENTRY_WIZARD_UNINSTALL                      [boolean]
  --skip-connect     Skips the connection to the server
                     env: SENTRY_WIZARD_SKIP_CONNECT                   [boolean]
  --quiet            Do not fallback to prompting user asking questions
                     env: SENTRY_WIZARD_QUIET                          [boolean]
  -i, --integration  Choose the integration to set up
                     env: SENTRY_WIZARD_INTEGRATION
                       [choices: "reactNative", "cordova", "electron", "nextjs"]
  -p, --platform     Choose platform(s)
                     env: SENTRY_WIZARD_PLATFORM
                                             [array] [choices: "ios", "android"]
  -u, --url          The url to your Sentry installation
                     env: SENTRY_WIZARD_URL      [default: "https://sentry.io/"]
  -s, --signup       Redirect to signup page if not logged in
                     Use if don't have a Sentry account                [boolean]

Resources

  • Forum
  • Discord
  • Stack Overflow
  • Twitter Follow

sentry-wizard's People

Contributors

11joselu avatar abhiprasad avatar andreysam avatar bruno-garcia avatar brustolin avatar dependabot[bot] avatar getsentry-bot avatar hazat avatar iker-barriocanal avatar jan-auer avatar jbfm avatar jennmueng avatar kamilogorek avatar koenpunt avatar krystofwoldrich avatar lforst avatar lms24 avatar lobsterkatie avatar lucas-zimerman avatar marandaneto avatar markushi avatar neo-zhixing avatar onurtemizkan avatar rhcarvalho avatar romtsn avatar scefali avatar shubhdeep12 avatar snyk-bot avatar timfish avatar vladanpaunovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-wizard's Issues

Update Inquirer to resolve ansi-regex audit issue

Steps to Reproduce

  1. npm init
  2. npm i @sentry/[email protected]
  3. npm audit

Expected Result

clean audit

Actual Result

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.1.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @sentry/wizard                                               │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @sentry/wizard > inquirer > string-width > strip-ansi >      │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘

Later versions of Inquirer have removed the dependency on string-width (and subsequent issues)

wizard Not working

Environment

SaaS (https://sentry.io/)

Version

No response

Steps to Reproduce

versions:
npm 7.22
next 11.1.2
@sentry/nextjs 6.12

I created my project, Now I want to add sentry to the existing project.
When I want to use the wizard to add files and packages, Only packages are added and files are not (Not even once).

I try to add and configure files manually

Expected Result

Install configuration with wizard

Actual Result

not installed

Stuck on "Waiting for wizard to connect"

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?
React Native 0.64.0
Windows 10

Steps to Reproduce

  1. npx @sentry/wizard -i reactNative -p ios android
  2. � Successfully set up Sentry for your project �
  3. Waiting for wizard to connect (forever)

Allow skipping XCode build phases via envvar

It would be great if it were possible to skip the xcode build phases for stripping unused architectures and uploading dsym data via an environment variable. This would be useful during tasks like snapshot generation where multiple builds are executed and these phases are not necessarily useful.

Option to skip platforms in sentry-symbols.js

Hello,

We were recently debugging a native electron crash and decided to upload the symbols.

We do not have a great internet connection, so were put off by the 1.3GB of native darwin symbols. The Windows ones were only a few meg.

Please can you add the option to skip symbols for certain platforms?

We ended up commenting out chunks of the script to do the bits we needed.

[React Native] Setup not working properly for iOS when using Swift

I've went through the react-native integration since I couldn't manage to get it to work in my react-native project and apparently the wizard only works when the AppDelegate is in objC.

Even if I try to add the code myself it still doesn't work.
I was wondering if you could update the wizard to work with Swift.
And also, are we supposed to do pod install after linking? or is the wizard supposed to do that?

Thanks in advance.

Error in Sentry upload (app:bundleReleaseJsAndAssets_SentryUpload FAILED)

I get the following build error app:bundleReleaseJsAndAssets_SentryUpload FAILED when I updated my react native app with latest sentry library, So i removed cli.executable line under android/sentry.properties file. Now the builds start working , So this is the correct fix ?

Please help us regarding this

Next 12 not supported

Core or SDK?

Platform/SDK

Which part? Which one?

Sentry wizard

Description

npx @sentry/wizard -I nextjs fails with ✗ Your 'package.json' specifies a version of 'next' outside of the compatible version range >=10.0.8 <12.0.0.

The docs say Next JS 10.0.8 is the minimum, but Next JS 12 is not supported yet. Had to dig through GitHub to find the commit message explaining this.

Suggested Solution

Support Next 12 :smile

Critical security issue for `open` dependency

At 16th of may a critical security issue with a CVSS score of 10 has been reported for the open dependency. Right now there are is no patch to fix this, but I thought this would be crucial info to know and create a potential fix in the future. For more info about this advisory, see https://nodesecurity.io/advisories/663.

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Command Injection                                                  │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ open                                                               │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 10 (Critical)                                                      │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.0.5                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ All                                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ None                                                               │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ <our-project> > [email protected] >                      │
│            │ [email protected] > @sentry/[email protected] > [email protected]     │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/663                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

Error: Cannot find module '/root/.npm/_npx/43/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli/scripts/install.js'

Environment

# cat Dockerfile | grep FROM
FROM node:lts-alpine

# uname -a
Linux 0e67118bc785 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 Linux

# node -v
v14.17.0

# cat package.json | grep next
    "@sentry/nextjs": "^6.12.0",
    "next": "^11.0.1",

Steps to Reproduce

  1. https://sentry.io/onboarding/ajoasi/get-started/
  2. yarn add @sentry/nextjs
  3. npx @sentry/wizard -i nextjs

Expected Result

Sentry wizard will automatically patch your application:

Actual Result

Error: Cannot find module '/root/.npm/_npx/43/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli/scripts/install.js'

I ran the yarn add @sentry/nextjs under /app and it was installed in /app/node_modules but the error shows something is trying to pull a script from /root

Issue with install (permission denied)

Platform: macOS Catalina (10.15.3)

Followed the instructions here

Recieved permissions issues even through I ran the script with sudo.

Install Output
sudo npm install -g @sentry/wizard
Password:
/usr/local/bin/sentry-wizard -> /usr/local/lib/node_modules/@sentry/wizard/dist/bin.js

> @sentry/[email protected] install /usr/local/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli
> node scripts/install.js

fs.js:115
    throw err;
    ^

Error: EACCES: permission denied, copyfile '/Users/anonymous/.npm/sentry-cli/b1e176-sentry-cli-Darwin-x86-64' -> '/usr/local/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli/sentry-cli'
    at Object.copyFileSync (fs.js:1724:3)
    at downloadBinary (/usr/local/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli/scripts/install.js:117:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/@sentry/wizard/node_modules/@sentry/cli/scripts/install.js:194:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @sentry/[email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @sentry/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/anonymous/.npm/_logs/2020-04-22T21_37_39_209Z-debug.log

[React Native] sentry-wizard does not work (Error: EISDIR: illegal operation on a directory, read)

RN 0.57
after run react-native link react-native-sentry
it crash on step run sentry-wizard
i tried install sentry-wizard manually and run it, but get the same error

yarn run v1.12.3
$ /Users/user/projects/ReactApp/node_modules/.bin/sentry-wizard
Running Sentry Wizard...
version: 0.12.1 | sentry-cli version: 1.37.1
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)
? What integration do you want to set up? React Native
? Select the platforms you like to set up: (Press <space> to select, <a> to toggle all, <i> to invert selection)iOS, Android
Skipping connection to Sentry due files already patched

🎉  Successfully set up Sentry for your project 🎉
(node:8339) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:494:3)
    at tryReadSync (fs.js:333:20)
    at Object.readFileSync (fs.js:370:19)
    at /Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Helper/File.js:50:18
    at Array.reduce (<anonymous>)
    at Object.matchesContent (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Helper/File.js:47:20)
    at ReactNative.<anonymous> (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:169:29)
    at step (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:45:23)
    at Object.next (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:26:53)
    at /Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:20:71
(node:8339) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:8339) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:8339) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:494:3)
    at tryReadSync (fs.js:333:20)
    at Object.readFileSync (fs.js:370:19)
    at /Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Helper/File.js:50:18
    at Array.reduce (<anonymous>)
    at Object.matchesContent (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Helper/File.js:47:20)
    at ReactNative.<anonymous> (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:169:29)
    at step (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:45:23)
    at Object.next (/Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:26:53)
    at /Users/user/projects/ReactApp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:20:71
(node:8339) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
✨  Done in 8.19s.
```

Sentry wizard fails to connect when executed from WSL

Environment

It appears that the wizard simply dies after trying to open the browser when being executed from within WSL. I switched over to powershell in the same WSL directory and everything worked fine.

Windows 10
WSL 2

How do you use Sentry?
Sentry SaaS

Which SDK and version?
Sentry wizard: v1.2.13

Steps to Reproduce

Open a WSL terminal, navigate to a code directory and execute sentry-wizard. It will die on "Waiting for Sentry..."

Expected Result

It opens the browser for me, and waits for the incoming sentry connection.

Actual Result

The wizard dies, likely from trying to open the browser from within WSL. Logs here:

myproject $ 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": "sentry-wizard"
}
Running Sentry Wizard...
version: 1.2.13 | sentry-cli version: 1.69.1
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)

✓ next >= 10.0.8 is installed

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



Please open
https://sentry.io/account/settings/wizard/XXX/
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": "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": "sentry-wizard"
                        }
                },
                "_shouldConfigure": {}
        },
        "hash": "XXX"
}

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

/ Waiting for Sentry...
[Process exited]

Note that I'm not blocked by this as I figured it out, but the UX was quite confusing, so might be worth trying to detect WSL or at the minimum not dying if a browser window can't be opened.

sentry-symbols.js doesn't conform to strict mode

I added sentry-symbols.js to my project, and this line causes our linter (ESLint) to fail with Parsing error: package is a reserved word in strict mode. This seems like a Babel parsing issue, not an ESLint configuration issue—it seems that Babel's default is to use strict mode. I can't find an easy way to tell Babel "it's okay for this single file to not use strict mode".

It's extra annoying because we have our linting pretty refined, and there's not a workaround other than going off-happy-path and renaming the variable ourselves.

Use internal integrations instead of personal auth token

When using the wizard to configure the Sentry client, it creates a auth token under the Sentry user's account to presumably access Sentry.

If one looks at the auth token in the Sentry web UI, one is immediately faced with this warning:

Auth Tokens are tied to the logged in user, meaning they'll stop working if the user leaves the organization! We suggest using internal integrations to create/manage tokens tied to the organization instead.

Unfortunately, neither the wizard documentation nor the manual config documentation explain what the auth token is for or why it is used instead of an internal integration.

[...] create .sentryclirc with the auth token for sentry-cli (which is automatically added to the .gitignore)

The SentryWebpackPlugin uses sentry-cli to manage releases and source maps, [...]

[...] and the auth token authenticates your user account.

This seems to suggest that my personal auth token will be needed to upload source maps. Does this mean that disabling my user account in Sentry or leaving the organization will effectively disable uploading source maps and releases? If so, how can an internal integration (at the organization level) be used instead, as recommended by the warning on the auth token page? Can this be option be added to the docs and would that make a better default for the wizard?

TypeError [ERR_INVALID_ARG_TYPE] (Node 14)

Environment

USE: SAAS
SDK: "@sentry/react-native": "^2.2.1",
node: v14.17.0
react-native-cli: 2.0.1
react-native: 0.61.5

Steps to Reproduce

  1. run: react-native link @sentry/react-native

Expected Result

The linkening.

Actual Result

✅ Patched build.gradle file.
✅ Patched App.js file.
✅ Added sentry.properties file to android
Successfully set up android for react-native
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Object.writeFileSync (fs.js:1517:5)
    at /.../git/.../node_modules/@sentry/wizard/dist/lib/Helper/File.js:33:20
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

🎉  Successfully set up Sentry for your project 🎉
done

NOTE

This worked (not great, as the releases never reflected the events in the web portal), in 12.x., but it seems like 14 has dialed up the strictness.

Problem with configuration

Hi,

I downloaded the package, but when I try to execute it, I receive this error:
zsh: command not found: sentry-wizard

I am on MacOS, can you please help me?
Thank you in advance

No platform selected

This is a copy of this issue. I'm placing it here because it belongs in this repo.

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?

@sentry/react-native: 2.2.2
react-native: 0.63.3

Steps to Reproduce
Follow the installation guide and running
npx @sentry/wizard -i reactNative -p android
Getting this:
✅ Patched build.gradle file. Error: No platform selected at ReactNative.MobileProject.getPlatforms (/Applications/MAMP/htdocs/shkolo/shkolo-mobileapp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/MobileProject.js:65:19) at ReactNative._patchJs (/Applications/MAMP/htdocs/shkolo/shkolo-mobileapp/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:224:14) at /Applications/MAMP/htdocs/shkolo/shkolo-mobileapp/node_modules/@sentry/wizard/dist/lib/Helper/File.js:28:45 at processTicksAndRejections (node:internal/process/task_queues:94:5) 🎉 Successfully set up Sentry for your project 🎉3. But android/sentry.properties is not generated and after that when I try to build the android app I get:`

Task :app:bundleReleaseJsAndAssets_SentryUpload_89 FAILED
error: An organization slug is required (provide with --org)
`

Expected Result
The Sentry setup should be successful and the app should be build successfully

Actual Result
I get both errors described in the steps.

Does not detect next version "^10.2" as valid

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
e.g: JavaScript 5.11.1, .NET 1.2.0
"@sentry/nextjs": "^6.8.0",

Steps to Reproduce

I have my next version as "next": "^10.2" (or "^10.2.x" in another project)

$ ./node_modules/.bin/sentry-wizard -i nextjs
Running Sentry Wizard...
version: 1.2.10 | sentry-cli version: 1.67.1
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)

✗ Your installed version of next is not supported, >10.0.0 needed

Expected Result

It should detect that "^10.2" is > "10.0.0"

Actual Result

Complains the next version is not supported

Missing react/javascript integration options

Steps to Reproduce

npx @sentry/wizard

Expected Result

I'm trying to use sentry-wizard to setup sentry integration in my react webpack project. The What integration do you want to setup prompt should come with a React or at least JavaScript option.

Actual Result

No such options.

image

Skip Sentry connect variable

I'm trying to configure Sentry in my ci service. I've set the SENTRY_WIZARD_SKIP_CONNECT environment variable to true but I get the following result:

    "sentryCli": {
        "argv": {
            "_": [],
            ...
            "debug": true,
            "skip-connect": false,
            "skipConnect": true,
            ...

I assume the variable isn't translated correctly. Kinda stuck with the configuration currently :)

TypeError [ERR_INVALID_ARG_TYPE]

Hi. Having an issue installing react native to iOS.

Version: 1.1.4

yarn sentry-wizard -i reactNative -p ios

lease select your project in Sentry: xxxxxxxxxx / xxxxxxxxxx
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at Object.writeFileSync (fs.js:1380:5)
at /Users/xxxx/Desktop/apps/xxxxxxxxxxx/node_modules/@sentry/wizard/dist/lib/Helper/File.js:23:20
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Thanks

Sentry on Next.js - Stuck on "Waiting for wizard to connect"

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
version: 1.2.17 | sentry-cli version: 1.74.4
Next 12.1.6

Steps to Reproduce

  1. yarn add @sentry/nextjs
  2. npx @sentry/wizard -i nextjs
  3. Browser opens

image

Expected Result

What you thought would happen.
Sentry will connect

Actual Result

No errors and no connection to sentry
image

Reconsider Defaulting Sample Rate to 100% w/ Next JS Wizard?

Hi! Just flagging that it is extremely easy to miss that the default sample rate for transactions on production is 100%. Speaking from personal experience, it's thereby really easy to go through your monthly usage very quickly by accident. (I accept all blame.)

I think it might be worth reconsidering the default production value on the wizard, or at least surfacing to users in the CLI that they should adjust it. Just a thought that might help prevent this for some other users in the future who are moving quickly and didn't read things as carefully as they should!

Add 'SENTRY_WIZARD_PROJECT' Option

Please add an argument for passing in the Project when the Quiet is being used in a cicd pipe.
Additionally, it's not clear how Quiet would work otherwise.

Thanks,
A

Electron configuration instructions are wrong

The electron integration emits this code to be added to the project:

const Sentry = require('@sentry/core');
const SentryElectron = require('@sentry/electron');

Sentry.create(<url>)
  .use(SentryElectron)
  .install();

But this is is wrong (and make me spend a few hours figuring it out). The right code with the current versions of the libraries is:

const { SentryClient } = require('@sentry/electron');
SentryClient.create({
  dsn: <url>
});

This is extremely confusing so I'd recommend updating the text.

Unable to find project in organisation list

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
"@sentry/nextjs": "^6.3.0"

Steps to Reproduce

npx @sentry/wizard -i nextjs

? Please select your project in Sentry:

Expected Result

My project is in the list and I am able to select it.

Actual Result

My project is not in the list and I am unable to select it.

Is there a limit to the amount of projects the list can render? We have ~67 projects associated with our organisation.

No option to create new project

Hi, I'm installing sentry for a new project and the wizard is only giving me option to add the ones in my sentry account, not to create a new one.

react-native: javascript not patched when using typescript

The current template for new react native projects using typescript has App.tsx file instead of App.js.
When running the wizard, I've noticed this output:

✅ Patched build.gradle file.
✅ Patched App.js file.
✅ Added sentry.properties file to android
Successfully set up android for react-native
✅ Patched build script in Xcode project.
✅ Patched App.js file.
✅ Added sentry.properties file to ios
Successfully set up ios for react-native

And I confirmed, the App.js file was not patched (it doesn't exist) - the step passed without actually patching anything.

Link to current typescript template: https://github.com/react-native-community/react-native-template-typescript/tree/master/template
Link to current steps to initialize react native project with typescript: https://facebook.github.io/react-native/docs/typescript

I think adding another block here: https://github.com/getsentry/sentry-wizard/blob/master/lib/Steps/Integrations/ReactNative.ts#L51-L63
would fix this step:

await patchMatchingFile(
    'App.tsx',
    this.patchJs.bind(this),
    answers,
    platform,
);

But probably this section of code could be refactored to more sophisticated context detection.

Error: bundling failed `index.ios.js` was not found - after Sentry installation

Hi,

when I compile the react-native app with Xcode, I saw on the terminal window this message:
[03/Oct/2018:08:42:14 +0000] "GET /index.ios.map?platform=ios&dev=true HTTP/1.1" 404 - "-" "sentry-cli/1.36.1"
error: bundling failed: Error: The resource '/Users/yoss/Repo/Project/index.ios.js' was not found.

Indeed is correct, because I have only index.js.
The build with Xcode will run correctly, but I don't know why after the installation of sentry/sentry-cli/sentry-wizard I can see this error on the terminal.

Is there a way to fix this? I tried to run the old branch (before Sentry) and when I compile I don't have that error.

In fact I have:
sentry/sentry-cli/sentry-wizard --> [ios, dev] ./index.ios.js
Nosentry/sentry-cli/sentry-wizard --> [ios, dev] ./index.js

Tell me if you need some tests I can do, if you need more infos.
Thank you

SentryCli is not defined

When executing node sentry-symbols.js i receive the following error:

const sentryCli = new SentryCli("./sentry.properties")
                  ^

ReferenceError: SentryCli is not defined

Which makes sense as const are block-scoped you should wrapp all the code in to the try/catch

try {
const SentryCli = require('@sentry/cli');
const download = require('electron-download');
} catch (e) {

Confusing installation instructions

The looping gif video is not helpful. It should be a video that you can pause to see what it's doing, or nothing at all.

The instructions "call sentry-wizard" also are vague, what it actually means is yarn sentry-wizard, not everyone is going to just know that call == yarn, would be better to just specify what command to run exactly instead of leaving people guessing.

Also the gif shows the command yarn try which doesn't seem to do anything.

More clarity as to the purpose of this wizard

This wizard seems to be geared only towards mobile and hybrid web/native applications but this is not reflected in any docs that I could find.

This should be more clear or better yet, add support for regular web applications.

Sentry Wizard failed with: no projects

[

Version:

    "next": "11.1.2",
   "@sentry/nextjs": "6.14.0",

Description

following the documentation here to install sentry on my next.js project

https://docs.sentry.io/platforms/javascript/guides/nextjs/

running 'npx @sentry/wizard -i nextjs' gives the error

Running Sentry Wizard...
version: 1.2.15 | sentry-cli version: 1.71.0
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)

✓ A compatible version of `next` is specified in `package.json`.



Please open

in your browser (if it's not open already)


Sentry Wizard failed with:
no projects

Protip: Add --debug to see whats going on
OR use --help to see your options

Error when running the @sentry/wizard script

I am trying to set up sentry in my react native project. But when I try to execute the script "npx @sentry/wizard -i reactNative -p ios android" this error occurs

Environment

Node
v16.13.0

React native
"react-native": "0.63.4",

Sentry
"@sentry/react-native": "^3.4.2",

Steps to Reproduce

  1. Execute the command

Actual Result

image

image

Does not correctly patch index.js

NEw React Native projects now have a single index.js file instead of an index.ios.js and index.android.js file. The automated setup does not correctly patch this shared index file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.