-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use Raven-js coupled to sentry in phoneGap app #29
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
In the sentry server you currently cant configure global origins per-project, but if you run the server you can configure the global value. I believe the setting is::
|
Okey, i'm gonna try tomorrow. thank's |
Feel free to reopen this if there are any problems related to this. (We could probably update the documentation to be more clear) |
I just tried doing the same thing with the current raven version (1.1) but had no luck. I then modified my version of raven.js and added this line after 1495: After retrying with this in place it worked successfully. I would be glad to implement whatever solution you deem fit. Just say what would be best, and I would fork and make a pull-request. |
@Shyru Does PhoneGap not sending a Referer or Origin header when making a request? At the moment, that's used for validation instead of the secret key. |
@mattrobenolt No, phonegap does not send a referer. I checked this with safari's webinspector. I think it is the normal browser behavior to not send referrers when files are loaded from the filesystem with file://-urls. After all, which referer should they send? |
I have the same issue, we want to use it with cordova but due to fact cordova use file:// url it's not allowed |
Same problem here, although, oddly, IOS Cordova works, but Android does not. |
same here ... why isn't this resolved? Its actually pretty trivial to fix on the client by enabling optionally pass the host instead of going over location.href ... |
hmm wrong, its using origin from headers sent by the browser .... |
anyways this should be resolved somehow. |
huh it seems like * works already on sentry server, sorry for bugging you. |
I have the same issue and SENTRY_ALLOW_ORIGIN = '*' is not working for me. |
I asssume you do in in the wrong place You need to go to the ui, project settings and put * into client security textarea |
this is server side configuration. |
@kof thanks! that resolved my issue. |
What version of Sentry are you running? |
Sentry 6.4.4 |
@Madumo I'm going to look into this on the Sentry side. I think the code path is rejecting if there isn't a |
@mattrobenolt Hi, I would just like to know if you have any update on that bug. Did you find something? Was it what you thought? |
Sorry, I haven't had a chance to look into it yet. 😦 |
I too have the same issue when using phonegap. Adding API key to application is detected and prevented in the raven library - so far I see no easy workaround. |
Is this resolved? |
Bumping this up as this came up today. I think to support this we have to accept input from raven.js that uses a secret key. |
Actually I could be wrong. I need to confirm that '*' in the origins field doesn't allow this to work. Either way, keeping this ticket open at the very least to document how to do it. |
Is this fixed with XHR+CORS in 2.0? It seems like it would be, but we don't test explicitly against PhoneGap, so I'm not 100% sure. Please reopen if this is still an issue and we can try to address. |
Tested it in Cordova/Phonegap: Works. |
expose original uncaughtException to patchGlobal callback, ref #28
Hi,
I'm trying to use sentry with raven-js on a phoneGap project.
I've a little problem...it's about URL security.
In sentry for raven-js i need to define some URL to protect my server.
But, in phoneGap i've no URL on my app. So, sentry doesn't listen to my app.
How can i solve it?
Any modification is possible to allow all URL for a define project?
Thank's!
The text was updated successfully, but these errors were encountered: