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

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

Open
marcopersi opened this issue Oct 12, 2022 · 7 comments

Comments

@marcopersi
Copy link

  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?

@devansh-sharma-tw
Copy link
Contributor

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!

@marcopersi
Copy link
Author

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 ?

@devansh-sharma-tw
Copy link
Contributor

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!

@marcopersi
Copy link
Author

marcopersi commented Oct 20, 2022 via email

@marcopersi
Copy link
Author

marcopersi commented Oct 20, 2022 via email

@marcopersi
Copy link
Author

marcopersi commented Oct 20, 2022 via email

@devansh-sharma-tw
Copy link
Contributor

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!

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

2 participants