Sentry-javascript: Error in .vue file display not exactly right with source map.

Created on 20 Nov 2018  路  5Comments  路  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser

Version:

sentry 4.3.2

Description

I write some obvious error code in my .vue file and follow the instruction to release with source map.
It seems released successfully and I can check the Artifacts like below:

The error reported by sentry did show with source map, but only show the EXCEPTION like this:

Just show that the error located in the main entry, that's not a right source map error display.

Here is my testing error code and the right error location with chrome debug:

I'm wondering is there something wrong of my usage of sentry?

Here is my main.js entry file code:

import Vue from 'vue'
import App from './App.vue'
import * as Sentry from '@sentry/browser';

Sentry.init({ 
  dsn: 'http://[email protected]/6',
  integrations: [new Sentry.Integrations.Vue({ Vue })]
});

import VueResource from 'vue-resource'
Vue.use(VueResource)

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')

Confirmed Discussion

Most helpful comment

Anytime. I'll try to get it fixed in main Sentry repo one day. Cheers!

All 5 comments

@icewind7030 can you provide a minimal repro-case which I can use to debug this? Including build, package.json and all required files?

@kamilogorek Sorry for the late, here is the demo repo:

https://github.com/icewind7030/sentry-vue-debug.git

Just a initial project created by Vue-Cli 3, and there's a line of error code in App.vue.
Please check is there anything wrong of my usage of sentry source map?

@icewind7030 I reviewed the issue, and apparently Vue, during a build time is producing file references to its runtime without a relative path indicator (./ - see that ./src/main.js has it) which is how we distinguish between in-app and external frames. You can see a correct source of the issue when you toggle to a Full view.

screenshot 2018-11-21 at 14 29 59

To fix this, we'd need to include an edge case in the Sentry itself and from what I see, you are using on-premise instance (based on the url in your .sentryclirc file), which will take a while to patch.
Your best bet for now is tracking issues through the full frames view.

@kamilogorek I see, thanks for the reply!

Anytime. I'll try to get it fixed in main Sentry repo one day. Cheers!

Was this page helpful?
0 / 5 - 0 ratings