-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Raven doesn't work in Chrome App #157
Comments
Awesome. So step one, I'm going to add support for adding chrome-extension:// as an acceptable url in Sentry. Then I'm going to look into the issues here. Do you have an example app that I can check out that fails? |
When publishing your chrome app, do you know the app id? Like, could you use: |
@mattrobenolt Of source I can know the app id, and it would not change. ^^ Thank you. |
If Sentry validates the origin header correctly for the |
Nope. It's still an issue. Chrome's CSP doesn't allow to write something like this:
|
Interesting. I’ll loop in some others that understand CSP far more than I do and see what they have to say. Matt Robenolt On Tuesday, November 12, 2013 at 8:49 AM, Zeray Rice wrote:
|
I wrote an example here |
Oh, nice! Thank you! I can’t guarantee when this will be resolved, but it’s definitely on our mind with a bunch of things around extensions as well. So this will be good information to use to solve it all at once. :) Matt Robenolt On Tuesday, November 12, 2013 at 8:55 AM, Zeray Rice wrote:
|
I'm having a very similar problem as well. I'm trying to get Raven (running on the hosted version of Sentry) working in an application running Chromium Embedded Framework where apps are run as The image approach won't work because Chromium won't set I tried to patch I think an option to disable validation for posting log entries in the backend on a per project basis would be the way to go. While it would be possible to patch I'll be happy to give any assistance I can to get this working, because me and my team would really like to use Sentry for error reporting. |
The first thing I'll address is auth: at that point, if you're going to be POSTing data and the file is packaged in an extension, you might as well just use the private key. I'd argue that it's less of a hack than allowing an option to disable authentication on the server since ultimately the key can be revoked if there was abuse. Our secret/private key isn't really that private. The only thing that can be done with it is report new errors. It's not an API key or anything to retrieve any other data from Sentry. Now to address the transport issue: I'm thinking it may make sense to make the transports pluggable. So we can have one for browsers that does the GET method or a separate one for POST that supports CORS. The reason why I don't support a POST right now is because of cross browser capabilities. It's a real pain to make it work correctly everywhere, and GET works the best. So if we were to provide a transport that only supported, say, V8. This could cover the cases of Chrome apps, etc. This would work in a similar fashion to the way transports work in the python client, if you're familiar with that. We would encode the transport into the DSN likely and you can register which transport you want to use. For example: Raven.registerTransport('https+post', function(data) { /* Send the data with POST */ });
Raven.config('https+post://....').install() Does that make sense? |
Oh, I should have read the docs better. I just assumed full API access as soon as a public and private key are being used. Then I don't see any problems with distributing the private key in the bundle. :) I'm unfamiliar with the python library but I think it sounds like a good idea being able to plugging in new transports and choosing via the DSN. If you want to, I can see if I can find some time to have a go at implementing a plugin API for transport tomorrow? I don't think it should be too difficult to get going. If we use today's method (let's call it |
Ok @mattrobenolt, I've added a pull-request introducing Some changes were needed in addition to your suggestion: Transports are split up into I'm not too happy about passing in I'd love your thoughts on this! |
Sentry make a change and it's work for us with cordova: |
Whoa, you caught that quick. :) I'm glad this solves the problem. I was actually trying to figure out what other problems this would solve. |
Great! I need that sentry fix getsentry/sentry@9e5ecfe for node-webkit which like cordova doesn't send any referer. @mattrobenolt do you know when this will be part of an official sentry release? |
I too would love to get this working for node-webkit |
@nrako The commit you referenced is being used on app.getsentry.com. We haven't cut an "official" release in a while. We'd just recommend running Sentry from HEAD, which is what we do most of the time. Also, fwiw, I plan on looking at this closer this week, along with #183 which should solve the rest of the issues. |
Thanks for the infos @mattrobenolt. We end up patching the latest release with what we needed. I don't feel very confident with using HEAD, but since there CI tests we might, we'll see. But hopefully the release will be back? I guess for a v7? |
We're definitely holding out for a v7, but we literally run HEAD ourselves for the hosted service. So if you have problems with that, we're definitely more on top of it and more receptive. If you have an issue with the latest tag, we'll likely tell you to run HEAD. :) |
That should surely increase our confidence to run HEAD thanks :) |
Hi everyone, I can't quite follow what is expected/not expected to currently work, but I just wanted to report my findings from including
So, from my perspective it looks like the the only bug is that we can't restrict the origin URLs (#2 above). Any chance you could help with that @mattrobenolt? :) |
I believe this should all be good now with Sentry 8.0 paired with raven-js 2.0.0, but we don't explicitly test against this, so not 100% sure. Please reopen if there is more we need to do here. |
Chrome blocked the image requesting in Chrome App for improving security. So the function
makeRequest
doesn't work in Chrome App.I patched
raven-js
for using it in Chrome App hereBut there are two problems with my patch:
HTTP GET
requesting doesn't have anOrigin
or aReferer
header. So I have to use client secret here to pass the authorization check.Allowed domain
into Chrome App URL likechrome-extension://*/
. So I have to use a single wildcard here.Any better solutions? Thanks!
The text was updated successfully, but these errors were encountered: