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

Fix for no coordinates from Google API in some gamemodes or locations #23

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

keralinnn
Copy link
Contributor

I've also faced that issue, but only when I was playing no move in some locations. I figured out that the problem was about the XMLHttpRequest.prototype.open function, because for some locations it worked properly, and for some locations it wasn't called at all. I went through some problematic locations again but with DevTools Network tab opened, and found that not only GetMetadata Google API's endpoint is used, but sometimes also SingleImageSearch, that provides exact or similar information to GetMetadata. So I added SingleImageSearch endpoint as well, and tested it for a while, and it seems like adding it fixes the issue.

I've also added a check for the method to be a POST, because requests to these endpoints are preceded by OPTIONS requests, that don't contain any useful information for parsing coordinates.

@0x978
Copy link
Owner

0x978 commented Apr 22, 2024

Huh, I wonder if this has always been an issue or is something new they've done?

Either way - I don't have time to test out the changes (got exams rn lol) but they look like they do exactly what you say so I'll merge it :)

Thanks so much for contributing :)

@0x978 0x978 merged commit bf20904 into 0x978:master Apr 22, 2024
@keralinnn keralinnn deleted the fix/no-coords-from-google-api branch April 23, 2024 23:21
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

Successfully merging this pull request may close these issues.

Tool keeps placing me in African water.
2 participants