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

CORS issue #113

Closed
denyncrawford opened this issue Jun 14, 2017 · 6 comments
Closed

CORS issue #113

denyncrawford opened this issue Jun 14, 2017 · 6 comments

Comments

@denyncrawford
Copy link
Contributor

I have a new issue. the console log prints this message and I really don't know what it means.
Has this been solved before?
I´m runnig a Xampp apache server to work with this.

XMLHttpRequest cannot load https://script.google.com/macros/s/AKfycbyhl9S5fO406P61lezf_mmSh5Oq5s_SeZw1a6tMnHIlP3xkgw0/exec. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 401.

image

@nelsonic
Copy link
Member

@denyncrawford are you using any PHP code? (wondering why using XAMPP as server...)
if you have node.js on your computer try: npm install && npm start which will open "Live Server" so you can test if it's XAMPP that is causing the issue...
Google expects you to submit the form from a different Origin.

@denyncrawford
Copy link
Contributor Author

denyncrawford commented Jun 14, 2017

@nelsonic No, I do not have node.js but I will try anyway, however I ran my web without the server and the problem persists. I use apache because some js-plugins need this.

@mckennapsean
Copy link
Collaborator

OK, so I believe this issue is related to a server config. We've seen a number of these issues, but I haven't reproduced them. May depend on browser, web settings, server settings, etc. See https://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource

@mckennapsean mckennapsean changed the title I can´t solve it CORS issue Jun 14, 2017
@denyncrawford
Copy link
Contributor Author

Well, I found the solution on my own, it was not a server problem or something, it was my fault. In the version of the app I did not change the "Who has access to the app" option. So the application blocked other users access (JavaScript). To fix it, I just made another version of my app and changed the option to "Everyone, even anonymous". And eureka!

I opened a question on stackoverflow and I answered it myself, for those who are interested, if they have the same problem.

If you know Spanish, you can see the whole thing here

Maybe you should open a translation in the documentation so that more public can understand it without any problems. Thank you for your answers.

@iteles
Copy link
Member

iteles commented Jun 15, 2017

Linked to #78.

Thanks for posting your solution @denyncrawford, I think you're right, we need to make this bit clearer in the readme!

If you'd like to translate the tutorial we'd certainly welcome a PR! 😊

Let us know if you're happy to close this issue now that it's been resolved.

@denyncrawford
Copy link
Contributor Author

Thanks! yes, I would like to translate the tutorial, and I am happy with this, I will close it. Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants