getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.94k stars 1.56k forks source link

Add Screenshot button is not shown #12418

Closed alamenai closed 3 months ago

alamenai commented 4 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.8.0

Framework Version

18.2.0

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Integrate User Feedback based on the documentation.

Code


import * as Sentry from "@sentry/nextjs"

const feedbackIntegration = Sentry.feedbackIntegration({
  // Additional SDK configuration goes in here, for example:
  colorScheme: "light",
  isNameRequired: true,
  isEmailRequired: true,
  nameLabel: "Ihr Name",
  emailPlaceholder: "Geben Sie Ihre E-Mail-Adresse ein",
  isRequiredLabel: "(erforderlich)",
  namePlaceholder: "Gib deinen Namen ein",
  showBranding: false,
  formTitle: "Ein Problem melden",
  messageLabel: "Beschreibung",
  messagePlaceholder: "Was ist das Problem? Was haben Sie erwartet?",
  submitButtonLabel: "Problembericht senden",
  cancelButtonLabel: "Stornieren",
  buttonLabel: "Melde Probleme",
  successMessageText: "Vielen Dank für deinen Bericht!",
})

async function initSentry() {
  const res = await fetch("/api/env")

  const dsn = await res.json()

  Sentry.init({
    dsn,

    // Adjust this value in production, or use tracesSampler for greater control
    tracesSampleRate: 1,

    // Setting this option to true will print useful information to the console while you're setting up Sentry.
    debug: false,

    replaysOnErrorSampleRate: 1.0,

    // This sets the sample rate to be 10%. You may want this to be 100% while
    // In development and sample at a lower rate in production
    replaysSessionSampleRate: 0.1,

    // You can remove this option if you're not planning to use the Sentry Session Replay feature:
    integrations: [
      new Sentry.Replay({
        // Additional Replay configuration goes in here, for example:
        maskAllText: true,
        blockAllMedia: true,
      }),
      feedbackIntegration,
    ],
  })
}

initSentry()

Expected Result

The Add Screenshot button should be existed:

image

Actual Result

de8c63ee-dc24-4fd4-a949-1c799a1c35eb

s1gr1d commented 4 months ago

Hello, this feature requires a minimum version of v8. Looks like you are on an old version of v7.

alamenai commented 3 months ago

HI @s1gr1d ,

Yes, you are right.

Thank you.