getsentry / sentry-javascript

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

Sentry pushing salesforce chatbot component inside shadow dom #9129

Open Skgtouch opened 1 year ago

Skgtouch commented 1 year ago

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/react

SDK Version

7.72.0

Framework Version

React 16.8.6

Link to Sentry event

No response

SDK Setup

 let config = {
      dsn: dsnKey,
      integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
      // Performance Monitoring
      tracesSampleRate: 0.1, // Capture 100% of the transactions, reduce in production!
      // Session Replay
      replaysSessionSampleRate: 0.1, // You may want to change it to 100% while in development and then sample at a lower rate in production.
      replaysOnErrorSampleRate: 1.0,
    };
    if (environment) config.environment = environment;
    Sentry.init(config);

Steps to Reproduce

  1. Without sentry or with sentry older version salesforce(SF)chat bot is rendering properly and after doing inspect element we can see the SF Chat components are rendering normally.
  2. But after adding latest sentry SF chat is breaking because sentry is forcing the SF chat components inside shadow dom, which why css is not applying and style is breaking
Screenshot 2023-09-27 at 7 04 14 PM

Expected Result

Sentry should not force SF components to render inside shadow dom

Actual Result

Sentry forcing SF component inside shadow dom

AbhiPrasad commented 1 year ago

Hey @Skgtouch, thanks for writing in! If you remove Session replay by removing new Sentry.Replay() from the integrations array, does this problem still happen?

Skgtouch commented 1 year ago

Hey @Skgtouch, thanks for writing in! If you remove Session replay by removing new Sentry.Replay() from the integrations array, does this problem still happen?

@AbhiPrasad After removing new Sentry.Replay(), its working properly. But how can we do with replay functionality ?

billyvg commented 1 year ago

@Skgtouch can you try installing version 7.70.0-beta.1 and see if that fixes the issue?

Skgtouch commented 1 year ago

@Skgtouch can you try installing version 7.70.0-beta.1 and see if that fixes the issue?

Thanks @billyvg using this version 7.70.0-beta.1 works, can we add the working changes in stable version ?

billyvg commented 1 year ago

Great to hear, it'll these changes will be in our next release

Skgtouch commented 1 year ago

@billyvg @AbhiPrasad - This works with first session of sf chatbot, after closing chat window (ending the conversation ) and re-initiating the new session creating same problem again

billyvg commented 1 year ago

@Skgtouch I'm assuming this is happening on the beta version? Just to confirm this is that SF chat bot you're using? https://www.salesforce.com/products/customer-service-chatbot/

Skgtouch commented 1 year ago

@Skgtouch I'm assuming this is happening on the beta version? Just to confirm this is that SF chat bot you're using? https://www.salesforce.com/products/customer-service-chatbot/

Yes @billyvg, It's happening with beta version, and yes using the same SF chat bot

billyvg commented 1 year ago

@Skgtouch we'll investigate this further, in the mean-time you should be able to add the component to the sdk block list

Skgtouch commented 1 year ago

@billyvg Thanks for the suggestion, but putting class="sentry-block" on parent div of chat window does not solves the issue.

Skgtouch commented 1 year ago

@billyvg For now I have disabled the replay functionality to fix the issue, plesae update us once you found any solution. Thanks!

billyvg commented 1 year ago

@Skgtouch When you have a chance, can you test if 7.74.0 fixes the issue?

bruno-garcia commented 11 months ago

@Skgtouch We're eager to know if this addressed your issue, as we believed we have gotten a fix out on 7.74.0 If somehow you have issues, feel free to reopen

Skgtouch commented 10 months ago

@bruno-garcia I tried upgrading to version 7.74.0, but still getting same issue.

bruno-garcia commented 10 months ago

Not sure what it could be to be honest. Not sure if others in the thread have more ideas

heidi-tom commented 2 weeks ago

Hi, We see this issue with latest version of Sentry 8.32. Can you please let us know if there is a fix for this other than disabling the sentry replays

billyvg commented 2 weeks ago

If someone could provide us with a sandbox with the salesforce chatbot enabled, then we can take a look at it. Otherwise it's a bit difficult for us to reproduce.