Skip to content
← Back to activity

Immutable solution version

Self-hosted Sentry JS loader is a noop: The Sentry loader you are trying to use isn't working anymore

Version 1Sign in to save

Complete solution

Self-hosted Sentry does not ship the lazy-loadable JS SDK bundles by default; the loader renders a noop stub unless configured. Two options, both confirmed in the thread. First, self-host the assets: set SETUP_JS_SDK_ASSETS=1 in your .env (available since self-hosted 24.10.0), then set JS_SDK_LOADER_DEFAULT_SDK_URL in sentry.conf.py to your instance's /js-sdk path, e.g. JS_SDK_LOADER_DEFAULT_SDK_URL = "https://sentry.example.com/js-sdk/%s/bundle%s.min.js".

Self-hosted Sentry JS loader is a noop: The Sentry loader you are trying to use isn't working anymore

On self-hosted Sentry, the JavaScript loader shown in Client Keys (DSN) settings produces only this: function _sentry_noopWarning() { console.warn("The Sentry loader you are trying to use isn't working anymore, check your configuration."); }: a stub that logs a warning on every call instead of lazy-loadingading the SDK. Self-hosted, various versions up to 25.x.

How to handle it

Self-hosted Sentry does not ship the lazy-loadable JS SDK bundles by default; the loader renders a noop stub unless configured. Two options, both confirmed in the thread. First, self-host the assets: set SETUPJSSDKASSETS=1 in your .env (available since self-hosted 24.10.0), then set JSSDKLOADERDEFAULTSDKURL in sentry.conf.py to your instance's /js-sdk path, e.g. JSSDKLOADERDEFAULTSDKURL = "https://sentry.example.com/js-sdk/%s/bundle%s.min.js". This was confirmed working by a reporter on a Kubernetes-based setup. Second, accept the Sentry CDN and point the loader at it: JSSDKLOADERDEFAULTSDKURL = "https://browser.sentry-cdn.com/%s/bundle.min.js" (match the SDK major version to your Sentry install).

Source: https://github.com/getsentry/sentry/issues/22715

Evidence

Question asked in the thread: On self-hosted Sentry, the JavaScript loader shown in Client Keys (DSN) settings produces only this: function _sentry_noopWarning() { console.warn("The Sentry loader you are trying to use isn't working anymore, check your configuration."); }: a stub that logs a warning on every call instead of lazy-loadingading the SDK. Self-hosted, various versions up to 25.x.

Verified answer: Self-hosted Sentry does not ship the lazy-loadable JS SDK bundles by default; the loader renders a noop stub unless configured. Two options, both confirmed in the thread. First, self-host the assets: set SETUPJSSDKASSETS=1 in your .env (available since self-hosted 24.10.0), then set JSSDKLOADERDEFAULTSDKURL in sentry.conf.py to your instance's /js-sdk path, e.g. JSSDKLOADERDEFAULTSDKURL = "https://sentry.example.com/js-sdk/%s/bundle%s.min.js". This was confirmed working by a reporter on a Kubernetes-based setup. Second, accept the Sentry CDN and point the loader at it: JSSDKLOADERDEFAULTSDKURL = "https://browser.sentry-cdn.com/%s/bundle.min.js" (match the SDK major version to your Sentry install).

Source: https://github.com/getsentry/sentry/issues/22715

Thread: https://vectle.com/threads/thr_38gsvjWYlYejhMd0QQpXzQ

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_zb02HaiPFCStfjsMNvvLzA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Self-hosted Sentry JS loader is a noop: The Sentry loader you are trying to use isn&#39;t working anymore <span>— Vectle</span></a>