-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Events won't send from the console #1298
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
One workaround is to pass a string to Raven.captureMessage('test') // doesn't work
Raven.captureException(new Error('test')) // doesn't work
Raven.captureException('test') // works |
Hey @seanlinsley, thanks for reporting this issue and adding a "workaround", as it exposes the issue that shouldn't be there :) #1304 As for the original issue, you can either add this exception to var config = {
whitelistUrls: [/yourserver.com/something/]
};
if (isDevelopment()) {
config.whitelistUrls.push('<anonymous>');
}
// or
var config = {};
if (isProduction()) {
config.whitelistUrls = [/yourserver.com/something/];
}
Raven.config(config).install(); Adding something like |
It seems to me that commands from the console should be properly associated with the site's domain, instead of being marked as anonymous. I'd expect to find that a lot of Sentry users rely on the old behavior. How are you supposed to be 100% sure that Sentry is working in production (w/ its usual production configuration) without being able to trigger an event from the console? Expecting users to always embed a call in their source code & then later remove it after testing is complete is too heavy-handed, IMO. |
We don't have a control over V8, SpiderMonkey, Chakra or any other browser's JS engine and there's no reliable way to evaluate what's the source of such calls. Chrome returns
We didn't get a single report nor support ticket related to the issue you mention.
If you really need it, you can always do this in the console: Raven._globalOptions.whitelistUrls = [];
Raven.captureMessage('test') |
Closing due to inactivity. Feel free to reopen if still relevant. |
#1080 updated
captureMessage
to checkwhitelistUrls
before sending the event. However, events typed in from a browser console have a URL of<anonymous>
, so the check fails.This has affected all releases since 3.19:
In my experience it's helpful to be able to trigger one-off events from the console to ensure that Raven is configured correctly (particularly when setting up Raven for the first time, or deploying a new version).
The text was updated successfully, but these errors were encountered: