emeth- / pokelocater

Display pokemon nearby to your location on a map.
130 stars 97 forks source link

Pokemon no longer showing up after updating google api #14

Open Turtlicious opened 8 years ago

Turtlicious commented 8 years ago

Ive deployed the latest version to heroku and the chrome console is not showing any requests after the initial one. No pokemon are showing up on the map.

ngunia commented 8 years ago

Did you get your own google maps api key? It's a new config variable that must be set.

houseofcat commented 8 years ago

The new config variable is set for me, but I had to manually change it in Index.html... it's not getting set on startup.

Furthermore, it's not properly caching credentials, login succeeds, it reports it is cached, then proceeds to relogin every 2 seconds - not using login cache.

emeth- commented 8 years ago

@thyams To confirm, you experienced that after deploying to Heroku with the button? Or is that from setting it up locally?

Turtlicious commented 8 years ago

I'm getting the same issue deploying with the button using my own google maps api

houseofcat commented 8 years ago

@emeth- Heroku button was used, I then forked, manually set the API key removing {{ }} as well, and then it worked. I am still experiencing the repeated logins every 2 seconds in Papertrail.

You are doing great work by the way. Hate being that guy. I was going to offer some code cleanup error handling but you gave us a big bunch of new files... so I held off.

emeth- commented 8 years ago

@Turtlicious @thyams One thing to be wary of is make sure you are going to the root domain, and not to /static/index.html as it was previously. By going to the root domain, it's supposed to render the file as a template and pass in the google maps token, but since I left the file in the static folder it's still possible to get to it and bypass the template loading via /static/index.html

I'll check it out again tomorrow night, running out of steam for tonight and need to hit the sack.

And thanks for the kind words @thyams!

houseofcat commented 8 years ago

@emeth- Totally understand, I have a long dev day tomorrow. Hard part will be not to peek at some more Python code, I have never read any Python before today :dancer: so I am feeling frisky.

OSwoboda commented 8 years ago

Sometimes I get all the Pokémon displayed which are on my radar ingame, but then it refreshes and it seems that all Pokémon in the east aren't displayed. But I love the progress of your work, keep it up!

Edit: Seems like the first two get_poke are working and after that the service is unavailable: Error while attempting to retrieve poke locations (index:223,184,262)

HoDaDor commented 8 years ago

The Heroku deploy works on my machine, it just took about a minute or two for the pokemon to populate.

KevakaBuel commented 8 years ago

Can confirm in the JS console there are a lot of:

Error while attempting to retrieve poke locations

Also when I refresh the page i get two warning:

Google Maps API warning: InvalidKey Google Maps API warning: SensorNotRequired

I guess the later one is ignorable but i dont get the the first warning. Why does he warn me for an invalid key when it clearly works getting data with the key? Even if its only every few tries because of the error meantioned above.

emeth- commented 8 years ago

@KevakaBuel Not sure why it would warn you for the invalid key, and then suddenly work. If it works though... then shrugs

@OSwoboda The performance of the cross search was getting a far higher error rate, so I just pushed an update reverting it back to just a search around the user (smaller area). You can still access the cross search in the bigger-scan branch, but my own preference is smaller area around me with less pokemongo api errors.

@thyams As noted above, I swapped back to the simpler scan instead of the cross search. So many api calls was wrecking havoc and causing a much higher number of errors, this may resolve your issue.

OSwoboda commented 8 years ago

@emeth- No errors anymore, but I'm a bit confused about the outcomes: map

Is this really a small radius? Seems odd that there is no Pokémon to the west or south.

ngunia commented 8 years ago

@emeth- I spent a couple of hours last night trying to improve the scan. I gave up after I saw you push the cross scan, but I'll give it another go since you reverted it. I was able to use s2sphere to make a grid in the immediate area and get the cells and send that to the api server. The api server responded with nothing, but I talked to someone who gave me a few more suggestions to try. I'll see if I can get it working tonight and pull request.

houseofcat commented 8 years ago

@ngunia Thanks, I would ideally like to just increase the radius size a small degree and have noticed it's not omni-directional. Something that might help, I have noticed that all users who only get north/west/east, they are always in the corner or the edge of the grid not centered. Might help :D

Also guys, don't forget if there is any fractional rounding, comparing to value ie 1e-4 occurs in this code for Directional detection, that could be few hundred meters off base for example. Just food for thought.

ngunia commented 8 years ago

@thyams @emeth- Check out my PR #18. I've got it working in a grid that runs about 3 city blocks in each direction from your current location.