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

Vue 3 with Webpack - trackComponents option causes sentry to fail with 'set' on proxy: trap returned falsish for property '$_sentrySpans' #8143

Closed
3 tasks done
jeremiahvpratt opened this issue May 16, 2023 · 10 comments
Assignees
Labels
Package: vue Issues related to the Sentry Vue SDK Stale Type: Bug

Comments

@jeremiahvpratt
Copy link

jeremiahvpratt commented May 16, 2023

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.52.1

Framework Version

7.52.1

Link to Sentry event

https://hirefly.sentry.io/issues/4188182414/?project=4504328532066304&query=is%3Aunresolved&referrer=issue-stream&stream_index=0

SDK Setup

Sentry.init({
  app,
  dsn: 'https://bab8a45ce18b4f5e909e71968afe4335@o4504328532066304.ingest.sentry.io/4504328532066304',
  integrations: [
    new Sentry.BrowserTracing({
      routingInstrumentation: Sentry.vueRouterInstrumentation(router),
      tracePropagationTargets: ['hirefly.com', /^\//],
    }),
  ],
  // Set tracesSampleRate to 1.0 to capture 10%
  // of transactions for performance monitoring.
  // Adjust as necessary to stay below quota.
  tracesSampleRate: 0.1,

  environment: process.env.NODE_ENV,

  // Enable performance profiling of all components,
  // instead of just App.vue.
  trackComponents: true,
});

Steps to Reproduce

  1. Set up a Vue 3 app that uses Webpack, Sentry, Vuetify, Vue Router 4, and @sentry/webpack-plugin
  2. Initialize sentry using the above options
  3. Use webpack to bundle the app, using @sentry/webpack-plugin
  4. Try to render a Vuetify component, such as v-navigation-drawer
  5. Observe the error

Removing the trackComponents eliminates the error

Expected Result

TrackComponents works with Sentry, Vue 3, and Webpack

Actual Result

Many errors with sentry like TypeError 'set' on proxy: trap returned falsish for property '$_sentrySpans'

See this closed bug where this happened in nuxt:

@Lms24
Copy link
Member

Lms24 commented May 17, 2023

Hi @jeremiahvpratt thanks for reporting! Hmm yes, this looks oddly similar to #7909. To debug this, we need to find out what the minimal reproduction is here. Seems like we know at least that it's not a Nuxt-only issue (assuming the same bug causes these two issues).

Would you be able to provide a minimal reproduction repo so that we can look into this?

@Lms24 Lms24 added Status: Needs Reproduction Package: vue Issues related to the Sentry Vue SDK and removed Status: Untriaged labels May 17, 2023
@Lms24
Copy link
Member

Lms24 commented May 17, 2023

fwiw, I quickly tried reproducing this with Vite and a Vue starter app (link to my repro) but couldn't reproduce.

Makes me wonder if this is indeed related to webpack 🤔 Then again, for the other issue, Nuxt uses Vite by default 😅

Anyway, I think we need a reproduction here, preferrably with your webpack config @jeremiahvpratt since I don't know how webpack and Vue 3 work together and there are probably a bunch of possibilities to configure webpack.

@Lms24
Copy link
Member

Lms24 commented May 17, 2023

Maybe we also need to check if Vuetify does some proxy magic (never used it).

@jeremiahvpratt
Copy link
Author

jeremiahvpratt commented May 17, 2023

EDIT: Updated, security-conscious repo here

Hey @Lms24 I spent a few hours this morning trying to create a minimum reproduction, but sadly I have failed so far. A basic combination of webpack, Vue 3, vue router, and vuetify doesn't seem to trigger this issue.

Thinks that I would try next, given the time, would be adding some reactive changes to the vuetify component, maybe in an async function, putting the vuetify component in a KeepAlive container, nesting vuetify components.

Other things that I did try that had no effect: intentionally triggering errors on vuetify components, using different types of vuetify components that I've observed the error on

@jeremiahvpratt
Copy link
Author

jeremiahvpratt commented May 17, 2023

Note that in this attempted minimum reproduction, the webpack config nearly exactly mirrors the config we use in our app - the same goes for the sentry, vue-router, and vuetify configs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@Lms24
Copy link
Member

Lms24 commented Aug 3, 2023

Hi @jeremiahvpratt , apologies, this slipped through the cracks.

EDIT: Updated, security-conscious repo here

Hey @Lms24 I spent a few hours this morning trying to create a minimum reproduction, but sadly I have failed so far

Does the repo you posted now contain a reproducible example or is it still not reproducible?

@jeremiahvpratt
Copy link
Author

jeremiahvpratt commented Aug 3, 2023 via email

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 Aug 3, 2023
@getsantry getsantry bot removed the status in GitHub Issues with 👀 Aug 3, 2023
@Lms24
Copy link
Member

Lms24 commented Aug 3, 2023

No worries. Sorry that I don't have a better answer but we need to know what's causing this error before we can properly fix it. I've backlogged this issue for the moment but if you or anyone else reading this issue have more context or figure out what combination of tools/libraries/conditions causes the error we're happy to take a look at it.

@getsantry
Copy link

getsantry bot commented May 16, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: vue Issues related to the Sentry Vue SDK Stale Type: Bug
Projects
Archived in project
Archived in project
Development

No branches or pull requests

5 participants