We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nuxtjs/sentry: 4.5.0 nuxt: 2.14.12
sentry: { dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0', // Enter your project's DSN here config: { beforeSend(event, hint) { const ignoreErrorInBeforeSend = [ { check: (event, hint) => { // Ignore fbevent.js postMessage error in iOS device if (hint?.originalException?.stack) { // eslint-disable-next-line dot-notation const errorStack = JSON.stringify(hint.originalException.stack) return /postMessage/.test(errorStack) } return false }, }, ] const shouldIgnoreError = ignoreErrorInBeforeSend.some((rule) => rule.check(event, hint) ) return shouldIgnoreError ? null : event }, }, // Additional config },
https://github.com/charlie0228/nuxt-sentry-issue
yarn build
.nuxt\sentry.client.js
Correct syntax in .nuxt\sentry.client.js This issue is similar to #226
Incorrect config syntax like below, the const config is all wrong!
const config
import VueLib from 'vue' import * as Sentry from '@sentry/browser' import { Dedupe, ExtraErrorData, ReportingObserver, RewriteFrames, Vue } from '@sentry/integrations' export default function (ctx, inject) { /* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */ const config = {"dsn":"https:\u002F\u002FexamplePublicKey@o0.ingest.sentry.io\u002F0","environment":"production","beforeSend":beforeSend(event, hint) { const ignoreErrorInBeforeSend = [ { check: (event, hint) => { var _a; // Ignore fbevent.js postMessage error in iOS device if ((_a = hint === null || hint === void 0 ? void 0 : hint.originalException) === null || _a === void 0 ? void 0 : _a.stack) { // eslint-disable-next-line dot-notation const errorStack = JSON.stringify(hint.originalException.stack); return /postMessage/.test(errorStack); } return false; }, }, ]; const shouldIgnoreError = ignoreErrorInBeforeSend.some((rule) => rule.check(event, hint)); return shouldIgnoreError ? null : event; }} config.integrations = [ new Dedupe({}), new ExtraErrorData({}), new ReportingObserver({}), new RewriteFrames({}), new Vue({ Vue: VueLib, ...{"attachProps":true,"logErrors":false}}) ] /* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */ Sentry.init(config) inject('sentry', Sentry) ctx.$sentry = Sentry }
The text was updated successfully, but these errors were encountered:
Fix released in https://github.com/nuxt-community/sentry-module/releases/tag/v5.0.1
Some cases will still fail until a Nuxt fix is released.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Version
@nuxtjs/sentry: 4.5.0
nuxt: 2.14.12
Sentry configuration
Reproduction Link
https://github.com/charlie0228/nuxt-sentry-issue
Steps to reproduce
yarn build
.nuxt\sentry.client.js
What is Expected?
Correct syntax in
.nuxt\sentry.client.js
This issue is similar to #226
What is actually happening?
Incorrect config syntax like below, the
const config
is all wrong!.nuxt\sentry.client.js
The text was updated successfully, but these errors were encountered: