getsentry / sentry-javascript

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

User Feedback submission failure is reflected as successful through the UI #12476

Closed suuf closed 1 month ago

suuf commented 1 month 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

8.9.1

Framework Version

Nextjs 14

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Opened Brave
  2. Navigated to website with User Feedback setup for Sentry
  3. Opened Dev Tools to inspect Network Requests
  4. I click the feedback button and complete all information, and click Send Bug Report
  5. The sentry HTTP request doesn't go through (understandable, as this is Brave)
  6. Regardless of the above , the UI thanks me for my feedback without showing any error

Prerequisites:

Expected Result

I would expect an error to show, or at least I would expect a successful message not to show.

Actual Result

Success message on submission failure: Screenshot 2024-06-12 092146

Failed HTTP request: Screenshot 2024-06-12 092227

Lms24 commented 1 month ago

Hi @suuf thanks for writing in! Unfortunately, Brave is know to block Sentry requests by default (see "Dealing with Ad Blockers" on this page). So I assume is that the browser blocks the request, especially given that it works in Chrome.

On first thought, I agree though that ideally, the feedback widget should show transparently that the feedback couldn't be sent. Unfortunately, there isn't really anything users could do in this specific case other than switching browsers.

On an implementation specific note: Our SDKs are generally designed to fail silently so that end users don't even notice a problem with the SDK (+ it shouldn't interrupt the application's behaviour). I think there might be a possibility to listen to failed requests (Client.on('afterSendEvent') but not sure if this is applicable easily.

Since I don't have much context on the feedback widget, I'll ask the feedback team to further look into this.

AbhiPrasad commented 1 month ago

Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.10.0!