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 error when authenticating with wrong credentials (only on WebGL), behaves properly otherwise #88

Open
ghost opened this issue Apr 3, 2020 · 7 comments

Comments

@ghost
Copy link

ghost commented Apr 3, 2020

CORS blocks XMLHttpRequest and throws No 'Access-Control-Allow-Origin' header is present on the requested resource..

Happens only on WebGL and when trying to authenticate with invalid credentials (e.g what should throw invalid e-mail format, incorrect password or other useful logs, instead throws a CORS error and no information about what actually failed).

Non-WebGL platforms throw proper ApiResponseException. PS: I assume this is not server-related as I use the same server for a Godot project. FWIW the WebGL version is hosted at: https://kag-rewritten.github.io/ (and code at respective repo) if you feel the description is not enough.

@novabyte
Copy link
Member

novabyte commented Apr 3, 2020

Thanks for the report @andreyrk. I'll see what we can do to make sure the OPTIONS request succeeds even if the underlying HTTP request returns a non-200 status code.

@DreadKnight
Copy link

DreadKnight commented Nov 29, 2021

And now all of a sudden I have issues with this CORS stuff as well; stuff been working fine for months now without changes sigh
Screenshot_20211129_083932

Trying to log in or make new account but nothing works properly. Not sure how to handle this so far...

Edit: Seems my issue was with DigitalOcean as it stopped my droplet since it didn't took money from PayPal automatically.
Also, Google started showing the CORS stuff in the console rather recently, confusing me even more; it can be disabled heh.

@mofirouz
Copy link
Member

Yep @DreadKnight your specific post is not related to this issue.

@novabyte
Copy link
Member

@DreadKnight Based on your post it appears your project was working fine but now does not connect due to CORS. Is this correct? If so, what have you changed that could have caused the connectivity differences?

@DreadKnight
Copy link

@novabyte I edited post before with answer/solution in my case. Basically CORS wasn't an issue, just adding to the confusion. DigitalOcean disabled my droplet cause it can't get money from PayPal by itself, game was saying that login is not valid, not that it couldn't connect to server... at least I didn't wasted days on this like in other lamer scenarios. Tech, 1000 things that can go wrong.

@ghost
Copy link
Author

ghost commented Oct 4, 2022

I'm don't think this should be closed because the dude above mistook his issue for the same as this.

@lugehorsam
Copy link
Contributor

@andreyrk understood -- didn't realize it wasn't the original author. Reopening.

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

5 participants