jxmorris12 / PokemonGo-Finder

Live visualization of all the pokemon in your area... and more!
GNU General Public License v3.0
171 stars 43 forks source link

Login failing on second run #44

Open Kazpers opened 7 years ago

Kazpers commented 7 years ago

Expected Behavior

When the program is run first time it logs in and scans for Pokemon as expected. It would be expected to continue doing so subsequently.

Current Behavior

However it resets login_session after each step of the search (found by printing debug info), meaning that it has to re-login before the second run. This re-login always fails with "Wrong username/password" causing the script to grind to a halt.

Possible Solution

I've implemented a workaround by not resetting login_session when the try block fails, but I assume this might cause unanticipated issues down the road.

Steps to Reproduce (for bugs)

  1. Create a PTC account
  2. Set up program
  3. Run for at least two iterations
  4. Failure

    Your Environment

Python 2.7 on Debian (Jessie). I have a hunch this might be due to the use of PTC accounts rather than google accounts, but I have no spare google accounts to test with. Behaviour has been observed using both an existing and a newly created PTC account.

JaredBanyard commented 7 years ago

+1 to this. Same thing on Ubuntu

StraightCircle commented 7 years ago

Same issue. I have it running for now by creating a loop within main so it doesnt log in every time.

however I would like to re-login every 20 min because after a while no pokis are returned. I can't figure out how to re-login without running into this issue.

adubcrdl commented 7 years ago

+1 please provide a fix

JaredBanyard commented 7 years ago

It does work with google auth but only works once with PTC.

danimorelo commented 7 years ago

same issue here running on Raspberry Pi 1

Boneless117 commented 7 years ago

+1 on this. PTC fails on second run while a google account works fine.

StraightCircle commented 7 years ago

im not sure how correct of a fix this is.... but i have it working by creating a loop in main around the steps loop instead of using threading.

BarkerCreations commented 7 years ago

As @StraightCircle did, I just wrapped the contents of main in a while True: after the login method is called and commented out the register_background_thread()

This isn't a true fix as it will eventually and silently time out and you'll loop but never find any pokemon.

bonswouar commented 7 years ago

+1 Had also this issue few times recently, but I also got this (pretty close) one : #51

gudmundur303 commented 7 years ago

Same here , could a possible solution be to alternate between two PTC accounts every 3 or 4 cicles ?