Closed ValeSauer closed 2 years ago
Check your browsers console to see if there are any errors reported.
The most likely thing is that you are using a adblocker which might be blocking the calls.
@stayallive My browser console shows
=> Sending a test message to Sentry...
tools.php?page=wp-sentry:415 !> Failed to sent a test message to Sentry
(anonymous) @ tools.php?page=wp-sentry:415
There is no adblocker, tried it even with different machines and with different networks. It does not even start an XHR call.
At least in the global scope Sentry is undefined.
Hmm, that is not saying much 😅 I'm a bit at a loss here since you seem to do all the things correct.
You can try and run Sentry.SDK_VERSION
in your console window. It should look something like this:
If it doesn't then the Sentry JavaScript bundle might not have been loaded at all.
@stayallive Unfortunately Sentry is undefined.
@ValeSauer okay so that is the issue, the JavaScript SDK is not loading for you.
Do you have minification plugins installed, hosted on a server using Ligthspeed or behind Cloudflare (or a combination of those things)?
The page is https://take-a-garden.com Neither frontend nor backend does load any js-file that looks wp-sentry-related. There is no minification plugin, however we use WP Super Cache (but without CDN activated). Enabling and disabling the plugin does not have any effect. I have uninstalled and reinstalled wp sentry: No effect.
Really weird... :-(
Hi, I had the same problem, please make sure you have defined variables before wp-settings.php inclusion:
wp-config.php:
define( 'WP_SENTRY_BROWSER_DSN', ...
require_once ABSPATH . 'wp-settings.php';
@yashumitsu Thanks! That actually solved it! I'll propose a change to the documentation.
There is no need to propose any changes, you missed this line in your wp-config.php
:
/* That's all, stop editing! Happy publishing. */
You should never do anything below that line as it suggests.
(you can see this in the wp-config.php template file)
Oh right! Make certainly sense.
JS test returns
DSNs are set correctly, even the legacy way:
Are there any known interferrences with other plugins or any approaches on debugging this?