Closed fellnerse closed 1 year ago
Can you try the latest version of the module?
I suppose you have tried latest version already...
In that case i would probably need a project that reproduces since the error doesn't have any useful information.
But if it fails due to either node version or Nuxt version being too old then I would not consider it a module bug. So you might want to verify if it works with latest Nuxt 2 and node 16.
Between those two versions it has been changed how module is built but it shouldn't have caused any observable changes to module users, in theory.
ok will update nuxt and sentry to latest; im using node 16 already
So this seems to work and I can build the project; everything seems to be fine. But now I have the issue that the beforeSend
function in the sentry config in the nuxt config somehow has an issue with the showReportDialog
:
beforeSend(event) {
console.log("before send", event, event.exception);
console.log("why are we not sending", showReportDialog);
if (event.exception) {
console.log("why are we not sending", showReportDialog);
showReportDialog({ eventId: event.event_id });
}
return event;
},
I get the first log, but the second one is swallowed. The function itself is defined, i print it during building and I get output.
I import it like this:
import { showReportDialog } from '@sentry/vue'
Where is that code located? It wouldn't work from nuxt.config.js
.
yes its in the nuxt.config.js with the old versions this seems to work. what are you suggesting how i should do it instead?
I don't know why would it work in old version. It shouldn't since the beforeSend
function is serialized and triggered from the webpack context so it wouldn't see your showReportDialog
import there.
The way to do that would be through an external client config file: https://sentry.nuxtjs.org/sentry/options#clientconfig
Aaah ok thanks for the explanation, probably because of the dev build it works;
one thing that would make sense in my opinion is to update the minimum nuxt version requirement here: https://sentry.nuxtjs.org/guide/setup/
Not sure what is the minimum version. I could try to test and check but it could be that it's the sub-dependencies versions that are relevant here in which case the issue wouldn't even be directly related to Nuxt version.
Version
@nuxtjs/sentry: 7.1.5 nuxt: 2.14.12
Sentry configuration
empty
Steps to reproduce
I wanted to update sentry from version 5 to the latest but got segmentation faults when building:
What is Expected?
Should not throw this error
What is actually happening?
I could pinpoint it down to the 7.1.5 version, with 7.1.4 I do not jet have the problem.