Skip to content
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

Live demo of datasette-vega seems to have problems with cors #48

Open
dannyob opened this issue Jul 16, 2022 · 0 comments
Open

Live demo of datasette-vega seems to have problems with cors #48

dannyob opened this issue Jul 16, 2022 · 0 comments

Comments

@dannyob
Copy link

dannyob commented Jul 16, 2022

When I got to https://datasette-vega-latest.datasette.io/ and click on the button with the pre-set URL in the text entry form, the show charting button that appears doesn't do anything (apart from disappear) when you click on it.

Checking the javascript console log shows me this:

Access to fetch at 'https://fivethirtyeight.datasettes.com/fivethirtyeight-45d758d/nba-elo%2Fnbaallelo.json?_shape=array&_shape=array' from origin 'https://datasette-vega-latest.datasette.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
DatasetteVega.js:76          GET https://fivethirtyeight.datasettes.com/fivethirtyeight-45d758d/nba-elo%2Fnbaallelo.json?_shape=array&_shape=array net::ERR_FAILED 302
value @ DatasetteVega.js:76
dr @ react-dom.production.min.js:219
fr @ react-dom.production.min.js:212
cr @ react-dom.production.min.js:211
ur @ react-dom.production.min.js:211
ir @ react-dom.production.min.js:209
Zn @ react-dom.production.min.js:207
Or @ react-dom.production.min.js:224
jr @ react-dom.production.min.js:225
Tr.render @ react-dom.production.min.js:232
(anonymous) @ react-dom.production.min.js:236
mr @ react-dom.production.min.js:222
Ar @ react-dom.production.min.js:236
render @ react-dom.production.min.js:238
(anonymous) @ index.js:58
DatasetteVega.js:76                  Uncaught (in promise) TypeError: Failed to fetch
    at t.value (DatasetteVega.js:76:5)
    at dr (react-dom.production.min.js:219:329)
    at fr (react-dom.production.min.js:212:214)
    at cr (react-dom.production.min.js:211:277)
    at ur (react-dom.production.min.js:211:113)
    at ir (react-dom.production.min.js:209:244)
    at Zn (react-dom.production.min.js:207:316)
    at Or (react-dom.production.min.js:224:426)
    at jr (react-dom.production.min.js:225:215)
    at Tr.render (react-dom.production.min.js:232:351)
value @ DatasetteVega.js:76
dr @ react-dom.production.min.js:219
fr @ react-dom.production.min.js:212
cr @ react-dom.production.min.js:211
ur @ react-dom.production.min.js:211
ir @ react-dom.production.min.js:209
Zn @ react-dom.production.min.js:207
Or @ react-dom.production.min.js:224
jr @ react-dom.production.min.js:225
Tr.render @ react-dom.production.min.js:232
(anonymous) @ react-dom.production.min.js:236
mr @ react-dom.production.min.js:222
Ar @ react-dom.production.min.js:236
render @ react-dom.production.min.js:238
(anonymous) @ index.js:58
Promise.then (async)
value @ DatasetteVega.js:76
dr @ react-dom.production.min.js:219
fr @ react-dom.production.min.js:212
cr @ react-dom.production.min.js:211
ur @ react-dom.production.min.js:211
ir @ react-dom.production.min.js:209
Zn @ react-dom.production.min.js:207
Or @ react-dom.production.min.js:224
jr @ react-dom.production.min.js:225
Tr.render @ react-dom.production.min.js:232
(anonymous) @ react-dom.production.min.js:236
mr @ react-dom.production.min.js:222
Ar @ react-dom.production.min.js:236
render @ react-dom.production.min.js:238
(anonymous) @ index.js:58
recording.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant