getsentry / sentry-javascript

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

Loader script (v7) for CaptureConsole is not adding the integration #13042

Closed masinette closed 2 months ago

masinette commented 2 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

x

Framework Version

No response

Link to Sentry event

No response

SDK Setup/Reproduction Example

No response

Steps to Reproduce

  1. Install Sentry using Loader (v7) script in the docs: https://docs.sentry.io/platforms/javascript/configuration/integrations/captureconsole/
  2. Check console.

Expected Result

CaptureConsole integration is installed

Actual Result

There is an error: "TypeError: e.setupOnce is not a function", and CaptureConsole is not listed as installed.

Image

s1gr1d commented 2 months ago

Sadly, the snippet in the docs is wrong as it shows v8. Does it work if you add this script?

<script
  src="https://browser.sentry-cdn.com/7.118.0/captureconsole.min.js"
  crossorigin="anonymous"
></script>

I excluded the checksum, as this only works with v8.