Issue with SDK in Lightning Web Components - Salesforce
Is there an existing issue for this?
- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [x] I have reviewed the documentation https://docs.sentry.io/
- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
9.15.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://codefile.io/f/84xs7nA3Np
Steps to Reproduce
I created this lightning web component https://codefile.io/f/84xs7nA3Np Issue is.
- When i use https://js.sentry-cdn.com/xxxxx.min.js - sdk loads fine but captureException just doesn't work, i dont see any event captured on sentry dashboard.
- I tried using https://browser.sentry-cdn.com/7.60.1/bundle.tracing.replay.debug.min.js/projectid - but getting failure while loading sdk
- also tried using https://browser.sentry-cdn.com/9.15.0/bundle.replay.min.js and https://browser.sentry-cdn.com/9.15.0/bundle.min.js and sdk doesn't load.
LWC is a salesforce fronted so importing external libraries works differently https://developer.salesforce.com/docs/platform/lwc/guide/js-third-party-library.html.
Expected Result
Event should be captured on sentry.io
Actual Result
No event captured when using https://js.sentry-cdn.com/xxxxx.min.js and getting exception while loading sdk if using https://browser.sentry-cdn.com/9.15.0/bundle.replay.min.js and https://browser.sentry-cdn.com/9.15.0/bundle.min.js
Hey @pankajkabra thanks for reaching out. Could you try the first bundle again and set debug: true in your init call – and then check if you get any insights from your logs?
@chargome tried debug:true but no additional logging appears. essentially issue i am seeing is POST request is not getting triggered when captureException method is being called.
So if you don't see any Sentry logs you're most likely not initializing Sentry at all. Where do you call the SentryHandler from your snippet?
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 🥀