-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Error parsing DSN (+ can't get error message without debugging) #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hoooo no it's my fault! I used to put the DSN string into a Play Framework template and it requires to escape the @ so I put a double @@ into the DSN string. However, it seems to me there is a problem when you throw a RavenConfigError as it requires me to debug to get the reason |
Do you have a sample page? I just tried browserify-ing the following code: Raven.config('http://foo@@example.com/1').install(); And, using the same Raven script (1.1.15), I get the following:
|
Hi @benvinegar . My DSN string is not as simple as yours
I replaced some DSN parts but this is what I had when the error occured. |
Yeah, I don't think the format of the DSN matters (although I did try a real one w/ the same errant Really feels like an environment thing. |
Yeah, I'm not entirely sure how you'd get that error. If you can provide a failing test case or something, I'd happily take a look. What you pointed to is wrapped in a try/catch as @benvinegar said: https://github.com/getsentry/raven-js/blob/master/src/raven.js#L406-L410 So you should be able to put in complete garbage for a DSN and still get a Until this can be reproduced with something in jsfiddle or a test case, I'm closing this as invalid. |
oooh yeah @matthewwithanm @benvinegar actually I remember! But when rethrowing, I just got:
It is like there was a problem during the rethrow, a bit like if the code was: try {
while (i--) dsn[dsnKeys[i]] = m[i] || '';
} catch(e) {
throw new Error();
} I don't know so much Javascript, just thought it may be related to this line: During my tests I used an up-to-date chrome version on Ubuntu, and my app use Browserify |
Hi,
I'm using Browserify and trying to bundle Raven into my appLibs.js bundle.
The browserify part seems to work fine (#197)
But I have a problem with errors being thrown during DSN parsing. I'm using exactly the same DSN that I used previously with non-browserify version. (using
//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js
)So maybe it's a regression?
Notice that I have an error message with no msg at all:
When opening the debugger I can see the source of the error being thrown is
RavenConfigError.prototype = new Error();
By hacking the debugger I was able to finally get the error source during the parsing of the DSN:
Cannot read property '6' of null
The text was updated successfully, but these errors were encountered: