Skip to content
New issue

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

In NUXT v3 Vue 3 tracing mixing or trackComponents: true produces 'set' on proxy: trap returned falsish for property '$_sentrySpans' #7909

Closed
3 tasks done
IngusSkaistkalns opened this issue Apr 19, 2023 · 4 comments

Comments

@IngusSkaistkalns
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/vue

SDK Version

7.48.0

Framework Version

[email protected], [email protected]

Link to Sentry event

https://mitigate-dev.sentry.io/share/issue/30144f4899d645b98e788aa458e87e36/

SDK Setup

export default defineNuxtPlugin((nuxtApp) => {
  const { vueApp } = nuxtApp
  Sentry.init({
    app: vueApp,
    dsn: ".......",
    enabled: true,
    environment: 'production',
    trackComponents: true, // <----- This one manifests the errors
    sampleRate: 1.0,
    tracesSampleRate: 0,
  })

  return {}
})

Steps to Reproduce

  1. Create Nuxt 3 app.
  2. Create Nuxt plugin
  3. Pass vue app instance from nuxtApp.vueApp
  4. Enable trackComponents
  5. Load the app

Expected Result

Expected not to have JS errors.

Actual Result

Plenty JS errors like so:

[Vue warn]: Error in beforeUpdate hook: "TypeError: 'set' on proxy: trap returned falsish for property '$_sentrySpans'"

found in

---> <VTextField>
       <SearchBar> at /Users/......../code/...../frontend/components/SearchBar.vue... (8 recursive calls)
         <Root>
@IngusSkaistkalns
Copy link
Author

Also I am not 100% sure that nuxtApp.vueApp === vue's createApp(App)

@Lms24
Copy link
Member

Lms24 commented Apr 19, 2023

Hi @IngusSkaistkalns thanks for writing in!

We currently don't support Nuxt officially. To triage this issue further, I'm wondering if this is reproducible without Nuxt (i.e. just with a Vue SPA) or if there is some problem with Nuxt interfering here. Are you using this community maintained Nuxt plugin or just our official Vue SDK?

@IngusSkaistkalns
Copy link
Author

IngusSkaistkalns commented Apr 20, 2023

@Lms24 hi, thanks for fast response!

  1. Seems there is a plan at the moment to support nuxt v3 with community module. Plan for Nuxt 3 version nuxt-community/sentry-module#530.

Tested it - does not work at the moment, but thats unrelated to @sentry/vue.

  1. I am not able to reproduce same error with plain vue spa app that was created using npm create vue@3,

  2. We are using nuxt together with vuetify, so I tested integration on fresh vuetify project - no issues there also.

It looks thats directly related with Nuxt and we can close this issue.

@IngusSkaistkalns IngusSkaistkalns changed the title Vue 3 tracing mixing or trackComponents: true produces 'set' on proxy: trap returned falsish for property '$_sentrySpans' In NUXT v3 Vue 3 tracing mixing or trackComponents: true produces 'set' on proxy: trap returned falsish for property '$_sentrySpans' Apr 20, 2023
@Lms24
Copy link
Member

Lms24 commented Apr 25, 2023

I'm going to close this issue for now as we discussed internally that we'd revisit it whenever we look at supporting Nuxt.
In the meantime, it should be possible to use our Vue SDK with trackComponents: false.

Thanks for raising this! It's always good to know about potential challenges for future SDKs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants