Activities

jpbamberg1993

jpbamberg1993 posted a new question

sentry-module •

What type of Sentry project should I use?

When I'm creating this project in sentry should I select Vue.js, Node or JavaScript for project type? Nuxt is not an option.

vasisouv

vasisouv posted a new question

sentry-module •

this.$sentry undefined when no dsn is provided?

Github readme indicates that "If no dsn is provided, Sentry will be initialised, but errors will not be logged. See #47 for more information about this." I initialized my config like:

sentry: {
config: {}
},

and got the 'ℹ Errors will not be logged because no DSN has been provided' message.

However this.$sentry is undefined in the mounted() function of the page, Is that intended?

I use this type of config on local development to avoid error loggin, but my components break since I use some try{}catch(e){ this.$sentry.captureException(e)} or try{}catch(e){ this.$sentry.captureException(e) }

eyalhakim

eyalhakim posted a new feature request

sentry-module •

idea Update Sentry SDK

What problem does this feature solve?

Screen Shot 2019-07-07 at 9.50.53 PM.png

eyalhakim

eyalhakim posted a new question

sentry-module •

Update sentry SDK

Screen Shot 2019-07-07 at 9 50 53 PM

huashiyiqike

huashiyiqike posted a new question

sentry-module •

ctx.$sentry is undefined, process.sentry is ok

server side sentry cannot get $sentry variable from ctx, is this the right way to use process.sentry? i am using "@nuxtjs/sentry": "^3.0.0" "nuxt": "^2.4.0", client side is fine

dhritzkiv

dhritzkiv posted a new question

sentry-module •

How to access $sentry instance from plugin

With code like this:

// plugins/foo.ts
export default (context: Context) => {
   // all of these are undefined:
   console.log(process.sentry)
   console.log(context.$sentry)
   console.log(context.sentry)
}

Even though from a middleware, I'm able to access it like so:

export default (context: Context) => {
   // this is defined:
   console.log(process.sentry)

   // still, these are undefined:
   console.log(context.$sentry)
   console.log(context.sentry)
}

Is this supported in v3 of this module?

ababbdev

ababbdev posted a new question

sentry-module •

Sentry is altering the user-agent in requests

We upgraded to the 3.0.0 version of the plugin to enable sentry in ssr which seems to work.
However it now is altering the user-agent in our xhr requests to

sentry/10.0.0.dev0 (https://sentry.io)

Is there a way to disable this?

bswank

bswank posted a new question

sentry-module •

Sentry & Heroku Dyno Metadata

Please help! Heroku is nicely exposing some release data to me – specifically, my Git SHA. Sentry is tracking my releases from GitHub. I need to be able to send the release info along with my Sentry error, but since I initiate Sentry in my nuxt.config.js file, the env var is set to the previous release since the Dyno's Metadata hasn't been updated yet.

Can anyone suggest a solution to ensure I'm correctly passing the release info on to Sentry that I'm getting from a dynamically-created env var in Heroku?

For more context, I've tried so many things. If there was a way I could set the Sentry release in the mounted () hook on my layout, I could do something like that, but I cannot figure out how to edit the Sentry release after init.

Jolg42

Jolg42 posted a new bug report

sentry-module •

bug FATAL Could not compile template - sentry.client.js: Unexpected token if

Version

master

Reproduction link

https://cmty.app/SorryIDontHaveOne

Steps to reproduce

Node.js 10.7.0
"nuxt": "2.6.3"
"@nuxtjs/sentry": "git://github.com/nuxt-community/sentry-module.git"

Deploying on Zeit Now v1 produce an error see "What is actually happening?"

What is expected ?

A successful build

What is actually happening?

> npm run build
> nuxt:sentry 13:58:09Started logging errors to Sentry
> 13:58:10Production build
> 13:58:10  FATAL  Could not compile template /home/nowuser/src/node_modules/@nuxtjs/sentry/lib/sentry.client.js: Unexpected token if
>   at Promise.all.templateFiles.map (node_modules/@nuxt/builder/dist/builder.js:5959:17)
>    ╰──────────────────────────────────────────��─────────────────────────────────────────╯

Additional comments?

It could be related to merging https://github.com/nuxt-community/sentry-module/pull/75

mauxtin

mauxtin posted a new feature request

sentry-module •

idea Ability to delete sourcemaps after uploading to sentry

What problem does this feature solve?

It would be useful to have an option to automatically delete the sourcemaps after they have been uploaded to sentry.

felixdenoix

felixdenoix posted a new bug report

sentry-module •

bug Sentry undefined in nuxtServerInit

Version

2.3.2

Reproduction link

https://codesandbox.io/s/zwnoxjj21p?fontsize=14

Steps to reproduce

Install module
Setup module
Access sentry in the nuxtServerInit function from the store returns undefined.

  nuxtServerInit({ commit }, ctx) {
    console.log("HI SENTRY", ctx.$sentry); // here $sentry is undefined
  }

What is expected ?

Being able to access the $sentry object in the nuxtServerinit method from the store.

What is actually happening?

object does not exist in context

Additional comments?

I had a look to the different issues ( #19, #33 ), and releases ( #72 ) but I still cannot access the sentry methods (also sorry in advance if I'm using the module the wrong way).
Thanks for this module it really made my day on multiple occasions !

BenJChen

BenJChen posted a new question

sentry-module •

sentry-module:Error while mounting app

Error while mounting app

when use sentry-module,it has a error,

app.js:519 Error: [nuxt] Error while mounting app: TypeError: _sentry_browser__WEBPACK_IMPORTED_MODULE_5__.Integrations.Dedupe is not a constructor

nuxt.config.js

modules:[
        '@nuxtjs/axios',
        '@nuxtjs/sentry',
        'cookie-universal-nuxt'
    ],
    axios: {
        proxy: true
    },
    sentry: {
        dsn: 'https://[email protected]/2', // Enter your project's DSN here
        config: {}, // Additional config
    },
loomchild

loomchild posted a new feature request

sentry-module •

idea Allow specifying the release when publishing sources

What problem does this feature solve?

Currently release config option is only used when reporting errors, but is ignored when publishRelease is active. The specified release should be taken into account when uploading sources instead of always relying on commit hash.

pi0

pi0 posted a new question

sentry-module •

[RFC] v3 checklist
  • Server side plugin support
  • Drop support for Nuxt 1.x
  • Improve default webpack config
  • Upgrade to [email protected]
pi0

pi0 posted a new feature request

sentry-module •

idea Support sever side integration

What problem does this feature solve?

Node integration and allow using $sentry in server side code

Related issues: #19, #33
Related PRs: #61

simllll

simllll posted a new feature request

sentry-module •

idea add typescript defintions for $sentry

What problem does this feature solve?

right now $sentry is not available in the context or in a component. therefore no typescript definition is associated when using this.$sentry or in any other context.

What does the proposed changes look like?

To solve this a proper typescript defintion is needed, right now to workaround this issue you simple can do:
1.) create a new "index.d.ts" file
2.) paste:

declare module 'vue/types/vue' {
interface Vue {
$sentry: any;
}
}
see also // https://vuejs.org/v2/guide/typescript.html#Augmenting-Types-for-Use-with-Plugins

but the correct solution would be not using "any", but the correct type. I tried it with:
import { NodeClient } from '@sentry/node';

but this collides with some other things, and actually it would be wrong on the client side too.

Could be the right way to provide a "unified" interface for both client&server and wrap the actual sentry calls behind it?

GexxOn

GexxOn posted a new question

sentry-module •

add typescript defintions for $sentry

right now $sentry is not available in the context or in a component. To solve this a proper typescript defintion is needed, right now to workaround this issue you simple can do:
1.) create a new "index.d.ts" file
2.) paste:

declare module 'vue/types/vue' {
    interface Vue {
        $sentry: any;
}
}

see also // https://vuejs.org/v2/guide/typescript.html#Augmenting-Types-for-Use-with-Plugins

but the correct solution would be not using "any", but the correct type. I tried it with:
import { NodeClient } from '@sentry/node';

but this collides with some other things, and actually it would be wrong on the client side too.

Could be the right way to provide a "unified" interface for both client&server and wrap the actual sentry calls behind it?

Regards
Gexxxn 3000

joergac

joergac posted a new bug report

sentry-module •

bug Error when publishRelease is enabled

Version

2.3.1

Reproduction link

https://github.com/nuxt-community/sentry-module/issues/31

Steps to reproduce

Add publishRelease like so

sentry: {
    dsn: 'https://[email protected]/xxxxxxx',
    publishRelease: true,
    options: {
      environment: env.SENTRY_ENV
    }
  },

What is expected ?

Publish a release on push

What is actually happening?

 [1m [31mERROR in Sentry CLI Plugin: Command failed: /home/forge/xxxxxx/node_modules/@sentry/cli/sentry-cli releases new xxxxxxd55334f3f4xxxxxxxxxxxxx
error: An organization slug is required (provide with --org)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
 [39m [22m

10:01:22  FATAL  Nuxt Build Error

  at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5262:15)
  at process._tickCallback (internal/process/next_tick.js:68:7)
shlima

shlima posted a new question

sentry-module •

Cannot read property 'config' of undefined

I'm trying to run @nuxt/sentry with nuxt v.2 but got the following error:

 FATAL  Cannot read property 'config' of undefined

  at ModuleContainer.sentry (node_modules/@nuxtjs/sentry/lib/sentry.js:28:75)
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:177:34)
  at promise.then (node_modules/@nuxt/utils/dist/utils.js:1664:43)
  at processTicksAndRejections (internal/process/next_tick.js:81:5)
  at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:51:3)
  at Function.Module.runMain (internal/modules/cjs/loader.js:865:11)
  at internal/main/run_main_module.js:21:11

Script fails at the following line https://github.com/nuxt-community/sentry-module/blob/master/lib/sentry.js#L51

It seems to be that config variable not defined

sh-misaki

sh-misaki posted a new question

sentry-module •

How to register the Nuxt instance in Sentry/Node?

When we build the Nuxt instance, we want to include node/sentry to it.

https://github.com/nuxt-community/sentry-module/blob/master/lib/sentry.js#L64

But, on this line, ssr: false is the fixed setting, so we can not get the errors on the ssr.

How should we do this?