thoughtworks / build-your-own-radar

A library that generates an interactive radar, inspired by https://thoughtworks.com/radar/.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker container execution results in Access to XMLHttpRequest has been blocked by CORS policy: No 'Access-Control-Allow-Origin'

marcopersi opened this issue · comments

commented
  1. downloaded docker container

  2. run it on localhost:9000, used the client id from google oauth.

  3. google OAuth being configured according to proposals

Bildschirmfoto 2022-10-12 um 21 28 59

  1. referencing a google sheet that properly works with the version hosted by thoughtworks itself, but it does not with the one I'm running locally in docker

Access to XMLHttpRequest at 'https://docs.google.com/spreadsheets/d/1l58pkwxOjLOxGUa85D3jmuQdwhC_1RYPWwGxxbVlfec' from origin 'http://localhost:9000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
5. hard reload of cash (Chrome) done several times, did not help anything
Bildschirmfoto 2022-10-12 um 21 33 19

I have no further idea what to try, why is the docker container not working as the hosted instance is?

Hi @marcopersi , you mentioned you are hosting the app on port 9000, but in the OAuth config your entry is for port 9090. Can you pls update either of them to match the ports and check ?

If that does not help, can you try to have only the localhost+port (eg: http://localhost:9000) entry in the OAuth config, and remove the http://localhost one ?

Thanks!

commented

Dear @devansh-sharma-tw

thank you for coming back. You were right. But unfortunately it didn't change anything:

Bildschirmfoto 2022-10-18 um 21 30 48

Bildschirmfoto 2022-10-18 um 21 30 19

I'm kind of surprised. Guess that it actually just should open the google verification popup/window , that's it.
But it does not, while it did from the hosted version.

Have you had the local docker version successfully running ?

Hi marco,

Yes, the client ID is responsible for triggering the Google auth. I just tried on my local docker as well, with the latest master branch code. It's working fine.

From your last screenshot, I see a new error (the one that says "You have created a new client application....") in the Chrome console. Can you try expanding it and sharing a screenshot of what that says ? Seems to be related to the Google client ID itself.

Thanks!

commented
commented
commented

Hi @marcopersi ,

Thanks for further checking on this.
We have also come to the conclusion on doing the auth library migration and are in the middle of the implementation right now.

Till the migration is done, newly created Client IDs would not work for Google Sheets URLs in local setups, as you have also observed. But JSON and CSV files will continue to work fine as they do not depend on Google Auth. We've further explained what is affected by this deprecation in the README here.

Thanks!