Skip to content

[User Feedback] Feedback button is not attached to DOM, when it is initialized while DOCUMENT is still loading #12970

Closed
@jaspreet57

Description

@jaspreet57

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

8.18.0

Framework Version

2.6.12

Link to Sentry event

No response

SDK Setup/Reproduction Example

import Vue from 'vue'
import * as Sentry from '@sentry/vue'

Sentry.init({
  Vue,
  dsn: ...,
  release: ...,

  replaysSessionSampleRate: 0.01,
  replaysOnErrorSampleRate: 1.0,
  integrations: [
    Sentry.replayIntegration({
      maskAllText: false,
      blockAllMedia: false,
      mask: ['.sentry-mask, [data-sentry-mask]']
    }),
    Sentry.feedbackIntegration({
      // Additional SDK configuration goes in here, for example:
      colorScheme: 'system',
    })
  ]
})

It is a basic setup. Only difference here is that I am using Nuxt, in which when Sentry.init is called, during that time
DOCUMENT.readyState is still equal to 'loading'.

And I have already found that there is a Bug in packages/feedback/src/core/integration.ts. And bug is that appendToDom method is not called.

Fix will be : (I tested it already and it is working)
Screenshot 2024-07-18 at 12 24 57 PM

Steps to Reproduce

  1. Add @sentry/vue in nuxt (vue) app.
  2. Use it as a plugin in Nuxt.
  3. Start the app

Expected Result

User Feedback button should be visible in the application regardless of when it is initialized.

Actual Result

User Feedback button is not visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: vueIssues related to the Sentry Vue SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions