Repository sentry-module

simllll

simllll posted a new question

sentry-module • 7 days ago

Webpack Sentry plugin for sourcemaps

See https://github.com/40thieves/webpack-sentry-plugin

Would be great if this module does this also.

sdr0x07b6

sdr0x07b6 posted a new question

sentry-module • a month ago

pretty-error <-- nuxt <-- loud-rejection <-- raven

In my project occasionally "pretty-error" caused errors.
Because "pretty-error" is used directly by Nuxt, I don't know where to fix🤔

"raven" appears in the back trace.
I am using "@nuxtjs/sentry" v1.1.3, but is this a problem?

  • nuxt v1.4.2
TypeError: Cannot read property 'wrapper' of undefined
    at ParsedError.module.exports.ParsedError._parse (/Users/sdr/myproj/node_modules/pretty-error/lib/ParsedError.js:17:20)
    at new ParsedError (/Users/sdr/myproj/node_modules/pretty-error/lib/ParsedError.js:9:10)
    at PrettyError.module.exports.PrettyError.getObject (/Users/sdr/myproj/node_modules/pretty-error/lib/PrettyError.js:357:11)
    at PrettyError.module.exports.PrettyError.render (/Users/sdr/myproj/node_modules/pretty-error/lib/PrettyError.js:346:16)
    at Object.exports.renderError (/Users/sdr/myproj/node_modules/nuxt/lib/common/utils.js:15:29)
    at Object.exports.printError (/Users/sdr/myproj/node_modules/nuxt/lib/common/utils.js:22:25)
    at process.on._error (/Users/sdr/myproj/node_modules/nuxt/bin/nuxt:14:9)
    at process.emit (events.js:187:15)
    at processEmit [as emit] (/Users/sdr/myproj/node_modules/signal-exit/index.js:155:32)
    at emitPromiseRejectionWarnings (internal/process/promises.js:105:20)
    at process._tickCallback (internal/process/next_tick.js:69:34)
Error: Promise rejected with value: undefined
    at /Users/sdr/myproj/node_modules/loud-rejection/index.js:27:12
    at Array.forEach (<anonymous>)
    at EventEmitter.<anonymous> (/Users/sdr/myproj/node_modules/loud-rejection/index.js:23:24)
    at EventEmitter.emit (events.js:182:13)
    at EventEmitter.emit (domain.js:442:20)
    at emit (/Users/sdr/myproj/node_modules/signal-exit/index.js:77:11)
    at processEmit [as emit] (/Users/sdr/myproj/node_modules/signal-exit/index.js:150:5)
    at process.exit (internal/process/per_thread.js:168:15)
    at Raven.onFatalError.defaultOnFatalError (/Users/sdr/myproj/node_modules/raven/lib/client.js:101:22)
    at /Users/sdr/myproj/node_modules/raven/lib/client.js:180:18
    at ClientRequest.<anonymous> (/Users/sdr/myproj/node_modules/raven/lib/transports.js:53:13)
    at Object.onceWrapper (events.js:273:13)
    at ClientRequest.emit (events.js:187:15)
    at ClientRequest.EventEmitter.emit (domain.js:442:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:555:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
    at TLSSocket.socketOnData (_http_client.js:441:20)
    at TLSSocket.emit (events.js:182:13)
    at TLSSocket.EventEmitter.emit (domain.js:442:20)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at TLSSocket.Readable.push (_stream_readable.js:219:10)
    at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
error Command failed with exit code 1.
ThomasKientz

ThomasKientz posted a new question

sentry-module • a month ago

created hook: "TypeError: Cannot read property 'captureException' of undefined"

Hi,

I got the following error :

created hook: "TypeError: Cannot read property 'captureException' of undefined"

I am simply calling this.$raven inside a created() hook :

created() {
    this.$raven.captureException(this.error);
  },

Otherwise I am receiving issues so its looks well configured.

Am I missing something ?

crutch12

crutch12 posted a new question

sentry-module • 2 months ago

Can't use $raven anywhere except front vue components

How can I use .$raven in:

  • store methods
  • asyncData/fetch
    ?

I want to user .setUserContext in store, but can, because store and context dont have .$raven prop

Thx

mauxtin

mauxtin posted a new question

sentry-module • 2 months ago

How to use captureException?

Is there any way to do something like that? This is inside a method.
At this point I am getting the error
Uncaught (in promise) TypeError: Cannot read property 'captureException' of undefined

   this.$axios.post('/endpoint', data).then((response) => {
    //
   }).catch((error) => {
       if (error.response.status !== 422) {
         this.$raven.captureException(error)
       }
    })
benoitemile

benoitemile resolved the question #c18

sentry-module • 3 months ago

Sentry module : Splitting client/server errors

you can mark this as resolved

SAGV

SAGV posted a new question

sentry-module • 3 months ago

Using Raven in nuxtServerInit?

Is there any way to use Raven within nuxtServerInit method and inside other store actions?

Unfortunately, $raven is not passed as a part of context.app like context.app.$axios, for example.

DiederikvandenB

DiederikvandenB posted a new question

sentry-module • 3 months ago

Help wanted: tests

To everyone using this package:

If anyone could help out to write a few basic tests that would be great. I'd be willing to maintain the package although I do not use Vue/Nuxt myself anymore, and having tests would make this much easier. I unfortunately do not have enough spare time available to write the tests myself.

Cheers!

benoitemile

benoitemile posted a new question

sentry-module • 4 months ago

Sentry module : Splitting client/server errors

Hello there,

Do you think it is possible to separate nuxt server and nuxt client in 2 different sentry projects ?

Thank you

PhouvanhKCSV

PhouvanhKCSV posted a new question

sentry-module • 4 months ago

How to set Private Key

Hi,

in my nuxt.config.js i have

...
sentry: {
    public_dsn: 'xxx',
    project_id: 'xxx',
  }
...

but when i run build, i got the message "nuxt:sentry disabled because no (private) key was found

Where can i get the private key? (and public key). i have read their docs only see document about "dsn"

Thanks

iNerV

iNerV posted a new question

sentry-module • 5 months ago

How integrate with SessionStack

Hello! I tried integrate our Sentry with SessionStack but I get an error:

ReferenceError
Raven is not defined

Can you help me?

acidjazz

acidjazz posted a new question

sentry-module • 6 months ago

Ability to disable for specific environments?

I'd like to not load this for my local env, is there any way i can dynamically load the module and/or specify a config option that disables it and then decide based on an ENV variable?

pSchaub

pSchaub posted a new question

sentry-module • 7 months ago

Is this project prepared for nuxt 2?
warning " > @nuxtjs/[email protected]" has unmet peer dependency "[email protected]<1.0.0 || >1.2.1".

I have seen this warning with yarn while using nuxt-edge.
So my question is: Is this project prepared for nuxt 2 or are there some changes needed for a full support of nuxt 2?

Atinux

Atinux fixed the bug report #c9 in v1.0.1

sentry-module • 7 months ago

bug NuxtJS 1.0.0 errorMiddleware undefined
pauldariye

pauldariye posted a new question

sentry-module • 7 months ago

I get undefined on my server log when accessing $raven from app context

screen shot 2018-03-22 at 02 38 54

boltonomous

boltonomous posted a new question

sentry-module • 7 months ago

must have a SENTRY_PRIVATE_KEY env, even though SENTRY_DSN exists

This module works well, but one issue I ran into is that I had to have SENTRYPRIVATEKEY defined for this to work… even though SENTRY_DSN was defined.

It looks like the culprit is here:
https://github.com/nuxt-community/sentry-module/blob/master/lib/sentry.js#L22

I'm happy to fix, just wanted to make sure there wasn't more to this before doing so. Thanks!

dorianamouroux

dorianamouroux posted a new question

sentry-module • 7 months ago

Inject keys on runtime

I'm using this package https://github.com/samtgarson/nuxt-env to inject my environment variable on runtime; and avoid having keys on the buildtime. Would sentry-module play nicely with it; to avoid the issues mentioned in the README of nuxt-env ?

damienbeaufils

damienbeaufils posted a new question

sentry-module • 7 months ago

Sentry key is null in raven-js when passing SENTRY_DSN only to start process

Hello,

I have a Nuxt v1.4.0 application which I build once with npm run build, to be able to ship it in a Docker container. In the container, the application is started using npm start.
The container is deployed in multiple environments (development, staging, production…) and we use environment variables to have distinct configurations between environments. So I have a distinct SENTRY_DSN environment variable between staging and production.

When I start the application with the environment variable, Sentry configuration is OK for node (raven) but not for client (raven-js). It seems that the raven-js client configuration is only filled during build phase, from the nuxt-config variables.

Would it be possible to build without that information but to start the application with it?
For example: npm run build && SENTRY_DSN=xyz npm start
In other words, would it be possible for the generated code be updated with the environment variable during application start?

If not, I can't build once and run everywhere the application, because I have SENTRY_DSN values depending on the environment on which the application is started.

Thanks!

tolgap

tolgap posted a new question

sentry-module • 7 months ago

Do not initialize this module if no Sentry information is passed (like in a local environment)

If you leave any Sentry information out of your .env file, this module still tries to send a HTTP request to sentry.io but (of course) with a wrong URL: POST https://sentry.io/api//store/?sentry_version=7&sentry_client=raven-js%2F3.23.1&sentry_key=null 400 (BAD REQUEST).

It would be nice if this module would check if all required Sentry info was empty, the plugin simply does not initialize. Otherwise I have to resort to polluting my nuxt.config.js with a bunch of process.env checks 😄 .

pSchaub

pSchaub posted a new question

sentry-module • 8 months ago

Support "false" string in process.env.SENTRY_DISABLE_CLIENT_SIDE

If you do this in the env file …

SENTRY_DISABLE_CLIENT_SIDE=false

… the script will still think that the sentry client should be disabled. The reason is that "false" is a string and not a boolean.

So please add a check if the string "false" or "0" is set to support the above environment variable as a normal user would expect it.