-
Notifications
You must be signed in to change notification settings - Fork 414
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
Webviz on remote bag #247
Comments
Hi! I don't know much about MARV. Is it able to provide URLs that link to bags, e.g. like https://open-source-webviz-ui.s3.amazonaws.com/demo.bag? If so, then it might just be a matter of configuring their webserver to support CORS and HTTP Range Requests. I'm trying their demo now, but can't seem to download bag files. E.g. if I click on the bag file link in https://ternaris.com/marv-robotics/demo/#/detail/sdcokcphyel4i52ggeemts33ly then Chrome shows me an "ERR_INVALID_RESPONSE" error. Any idea what might be going on? It would be cool to perhaps make a contribution to MARV to add an "open in Webviz" link. |
Oh I forgot to answer this question. The browser does not have direct access to the file system (for security reasons), so we can't access arbitrary files through a URL. They have to be explicitly selected by the user, either by drag and drop or through a file selection dialog (which is very similar to drag and drop so we didn't bother implement that). |
you could try to put https://min.io/ in front of your NAS as it acts as a S3 compatible storage layer. |
Thank for your answers! @stefan-enway: Thanks, i'll look into it if I struggle too much setting up the webserver :) |
I managed to use flask_cors as MARV is implemented in python. I think I got the correct configuration, here is the response header using Postman : But I still have this error on my console : I also tried putting http://webviz.io as the origin or localhost:8080 as the origin(and building and running locally) but I'm getting the same result :( Maybe I am missing something? |
Looks like CORS headers are not set properly for OPTIONS requests (CORS preflight), try seeing what you get in postman if you make an OPTIONS request. |
@NicolasBernard456 |
@janpaul123 |
@stefan-enway Got this error when using min.io |
please run |
and get an nginx somewhere and look at https://enable-cors.org/server_nginx.html. beware that * is a wildcard for everywhere, but if you use it on a local VM/network you should be fine. |
Right so if in that case |
Thanks for your help, I added those headers and it's working now! |
@NicolasBernard456 any chance you could share your final solution? Would be cool to contribute this back to MARV, too! 😄 |
oh yeah. in nginx config please ;) |
@NicolasBernard456 Someone is asking about something similar in #410; do you happen to have a config file that you could share with us here? |
Hello, |
No worries, and great, thanks for sharing! Btw, I'm trying to get to know our users better, so if you'd be interested in a quick call some time soon feel free to shoot me an email at jp.posma@getcruise.com :) |
I am using nodejs ( express) for this issue and this file is running `var express = require('express') crossOption = { //Using direct file URL It's working. |
I also want to use marv as data managament platfrom for bag files and visulaize with webviz via remote url. But i'm new with web server and don't know how to create URLs that link to bag, and config CORS with latest marv which has switched to use synchronous HTTP client/server framework aiohttp. Could you share your marv code to me that I can try and study? Many thanks. |
leave a comment for people who is working on django: I'm trying to use django and django-cors-headers to setup a file-hosting server for the remote bag accessing. The setup looks good and tested by curl request. However, in the developer console of browser, header After some searching, this answer mentions that
so it means we cannot set up the And at last I setup a apache server instead, with these settings in
|
Hi, |
…s to CORS-safelisted headers Similar to this (stale) PR: http-party#546 Resolves http-party#545 Usable for cruise-automation/webviz#247
I ran into this (self-hosting bags and having CORS issues) today and wanted a 1-line solution. In case anyone else is in the same boat, here's my approach for serving the bag files: npx 'https://github.com/ben-z/http-server#8aa6a8f' --cors='ETag,Content-Type,Accept-Ranges,Content-Length' Had to patch the http-server package to add support for the |
We've also written up some documentation on setting up CORS correctly: https://foxglove.dev/docs/studio/connection/setting-up-cors |
Hello,
Thanks for your amazing work!
I was wondering if i could get some more infos on how to use webviz on remote bags? I saw that it was possible to do it with a cloud provider like S3 or GCS https://github.com/cruise-automation/webviz/blob/master/packages/webviz-core/src/dataProviders/BrowserHttpReader.js
I have a custom NAS where my bags are stored and I am using Marv as a bag management platform. I wanted to generate link like this to have a complete view of the bags. Can you give me some advices on how to proceed?
If this appears to be too harsh to setup, is there a way to generate an url to have a view of one local bag instead of drag/dropping it?
Best regards,
Nicolas
The text was updated successfully, but these errors were encountered: