PokemonGoF / PokemonGo-Bot-Desktop

The Desktop version of Pokemon Go Bot script
MIT License
410 stars 115 forks source link

pokemongo-bot desktop crash after login #71

Closed rlllam closed 8 years ago

rlllam commented 8 years ago

$ npm start

PokemonGoBot@0.0.1-alpha start C:\Users\0\downloads\PokemonGo-Bot-Desktop electron main.js

Starting Python process... Bot path: C:\Users\0\Downloads\PokemonGo-Bot-Desktop\gofbot python ./pokecli.py Python: Traceback (most recent call last): File "./pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions

Any help is appreciated Thank you :)

sniok commented 8 years ago

You are missing pgoapi module. Run npm install to install it.

rlllam commented 8 years ago

I did that and now when I try to run it it gives me this:

$ npm run Lifecycle scripts included in PokemonGoBot: postinstall cd ./gofbot/ && pip install -r requirements.txt start electron main.js

NinjaStew commented 8 years ago

I'm getting the exact same error after entering that into the console. As far as I can tell, nothing was skipped and no errors were returned after updating either.

sniok commented 8 years ago

@rlllam Start app using npm start not npm run

sniok commented 8 years ago

Fixed one error, did clean install and everything works fine. Please carefully read reamde

NinjaStew commented 8 years ago

Where would the module be located once installed? No matter how many times I delete everything and do a clean install, I cannot get any other message in the end, so I'm going to try a manual install going off of the updated API. The application is no longer stuck in the loading screen for me, however.

sniok commented 8 years ago

@NinjaStew try going to gofbot folder and running pip install -r requirements.txt

NinjaStew commented 8 years ago

Unfortunately that didn't produce any results either. Upon googling my issues I also found out that others were having a similar problem with the updated API. The only solution anyone has found was a specific person that ran install.sh again to solve the issue.

Edit: Never mind that last question. I'm a bit slow.

sniok commented 8 years ago

What do you mean any results? Please provide output of sudo pip install -r requirements.txt command.

NinjaStew commented 8 years ago

The directory '/Users/Destre/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Destre/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied (use --upgrade to upgrade): numpy==1.11.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): networkx==1.11 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 2)) Obtaining pgoapi from git+https://github.com/keyphact/pgoapi.git@249d3be7fbbdabc7f9adea17cbc899d6549e47a2#egg=pgoapi (from -r requirements.txt (line 3)) Skipping because already up-to-date. Requirement already satisfied (use --upgrade to upgrade): geopy==1.11.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): protobuf==3.0.0b4 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): requests==2.10.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): s2sphere==0.2.4 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): gpsoauth==0.3.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): protobuf-to-dict==0.1.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 9)) Requirement already satisfied (use --upgrade to upgrade): googlemaps==2.4.4 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 10)) Requirement already satisfied (use --upgrade to upgrade): colorama==0.3.7 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 11)) Requirement already satisfied (use --upgrade to upgrade): enum34==1.1.6 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 12)) Requirement already satisfied (use --upgrade to upgrade): pyyaml==3.11 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 13)) Requirement already satisfied (use --upgrade to upgrade): haversine==0.4.5 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 14)) Requirement already satisfied (use --upgrade to upgrade): polyline==1.3.1 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): python-socketio==1.4.2 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 16)) Requirement already satisfied (use --upgrade to upgrade): flask==0.11.1 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): socketIO_client==0.7.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 18)) Requirement already satisfied (use --upgrade to upgrade): eventlet==0.19.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 19)) Requirement already satisfied (use --upgrade to upgrade): gpxpy==1.1.1 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): mock==2.0.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 21)) Requirement already satisfied (use --upgrade to upgrade): timeout-decorator==0.3.2 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 22)) Requirement already satisfied (use --upgrade to upgrade): raven==5.23.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from -r requirements.txt (line 23)) Requirement already satisfied (use --upgrade to upgrade): decorator>=3.4.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from networkx==1.11->-r requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): six in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pgoapi->-r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): xxhash in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pgoapi->-r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from protobuf==3.0.0b4->-r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): future in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from s2sphere==0.2.4->-r requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): pycryptodomex>=3.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from gpsoauth==0.3.0->-r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): python-engineio>=0.8.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from python-socketio==1.4.2->-r requirements.txt (line 16)) Requirement already satisfied (use --upgrade to upgrade): click>=2.0 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from flask==0.11.1->-r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from flask==0.11.1->-r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from flask==0.11.1->-r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from flask==0.11.1->-r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): websocket-client in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from socketIO_client==0.7.0->-r requirements.txt (line 18)) Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.3 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from eventlet==0.19.0->-r requirements.txt (line 19)) Requirement already satisfied (use --upgrade to upgrade): pbr>=0.11 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from mock==2.0.0->-r requirements.txt (line 21)) Requirement already satisfied (use --upgrade to upgrade): contextlib2 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from raven==5.23.0->-r requirements.txt (line 23)) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from Jinja2>=2.4->flask==0.11.1->-r requirements.txt (line 17)) Installing collected packages: pgoapi Running setup.py develop for pgoapi Successfully installed pgoapi-1.1.6

sniok commented 8 years ago

@NinjaStew Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Yeah, you should so sudo -H pip install -r requirements.txt

NinjaStew commented 8 years ago

It returned everything exactly the same minus asking for further permissions with the sudo command. After running install.sh, pokecli.py, and run.sh I'm still not getting the module. I'm going to see if I can download the module from somewhere and manually install somehow.

NinjaStew commented 8 years ago

Finally some progress. After I completely uninstalled pgoapi and reinstalled it using that last command you suggested to me, I got the bot to post a different log. I believe it's still an error because it's suggesting I exit the application and the interface is static, but it did retrieve and display all of my account information. The log is quite long, so I uploaded it to pastebin. http://pastebin.com/4YwFV8Ki

sniok commented 8 years ago

@NinjaStew You are missing decrypt.so. Installation instructions for decrypt.so are in readme

NinjaStew commented 8 years ago

Is this still looking like the same error? http://pastebin.com/Epy9juD7

sniok commented 8 years ago

OSError: dlopen(encrypt.so, 6): image not found' yep

Bilters commented 8 years ago

Looks like I get another error;

Python: OSError: dlopen(encrypt.so, 6): image not found

Python: 2016-08-07 14:16:19,930 [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/usr/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain

Python:  result = func(*args)
  File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 895, in _send_output
    msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)

Python: 2016-08-07 14:16:19,968 [sentry.errors.uncaught] [ERROR] [u'OSError: dlopen(encrypt.so, 6): image not found', u'  File "pokecli.py", line 493, in <module>', u'  File "pokecli.py", line 127, in main', u'  File "pokecli.py", line 136, in report_summary', u'  File "pokemongo_bot/metrics.py", line 76, in capture_stats', u'  File "pokemongo_bot/api_wrapper.py", line 106, in call', u'  File "pokemongo_bot/api_wrapper.py", line 63, in _call', u'  File "pgoapi/pgoapi.py", line 210, in call', u'  File "pgoapi/rpc_api.py", line 85, in activate_signature', u'  File "ctypes/__init__.py", line 440, in LoadLibrary', u'  File "ctypes/__init__.py", line 362, in __init__']
sniok commented 8 years ago

@Bilters Compare your first line with my previous message

Bilters commented 8 years ago

@sniok yeah you typed it as i was typing it i suppose sorry for the duplication didn't see yours popping up, i'm sorry.

NinjaStew commented 8 years ago

After figuring out the encrypt.so part, I've gotten the bot 100% working. I'll be considering making a very simplified video tutorial for this bot for OSX as to save confusion for those in my situation in the future. Thank you so much for your help tonight!

sniok commented 8 years ago

@NinjaStew Video tutorial would be really cool

g2384 commented 8 years ago

For the issue ImportError: No module named pgoapi.exceptions, an easy solution is

in the main.js file around line 222 remove if (os.platform() == 'win32') { pythonCmd = path.join(__dirname, 'pywin', 'python.exe'); }

Provided by @Vardius in https://github.com/PokemonGoF/PokemonGo-Bot-Desktop/issues/51


Alternatively,

I was having this issue and with some of the comments from here I got mine working by.

cd PokemonGo-Bot-Desktop
virtualenv .
git clone https://github.com/tejado/pgoapi.git
cd pgoapi/
python setup.py install
cd ..
npm install
npm start

@guigouma gave this solution in https://github.com/PokemonGoF/PokemonGo-Bot-Desktop/issues/51

I have tested on Windows 10, it works.

starrett67 commented 8 years ago

Hi

I am having an issue after login:

2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] Pokemon Captured: 867 | Pokestops Visited: 726 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] Pokemon Bag: 93/250 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] Items: 388/500 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] Stardust: 78668 | Pokecoins: 1530 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] PokeBalls: 105 | GreatBalls: 32 | UltraBalls: 22 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] RazzBerries: 56 | BlukBerries: 0 | NanabBerries: 0 2016-08-07 12:25:20,460 [PokemonGoBot] [INFO] LuckyEgg: 2 | Incubator: 11 | TroyDisk: 3 2016-08-07 12:25:20,461 [PokemonGoBot] [INFO] Potion: 21 | SuperPotion: 25 | HyperPotion: 40 2016-08-07 12:25:20,461 [PokemonGoBot] [INFO] Incense: 0 | IncenseSpicy: 0 | IncenseCool: 0 2016-08-07 12:25:20,461 [PokemonGoBot] [INFO] Revive: 69 | MaxRevive: 0 2016-08-07 12:25:20,461 [PokemonGoBot] [INFO] 2016-08-07 12:25:20,461 [PokemonGoBot] [INFO]

Python: 2016-08-07 12:25:20,474 [sentry.errors.serializer] [ERROR] maximum recursion depth exceeded while calling a Pyth on object Traceback (most recent call last): File "C:\Python27\lib\site-packages\raven\utils\serializer\manager.py", line 76, in transform return repr(value) File "C:\Python27\lib\ctypesinit.py", line 369, in repr (self._handle & (_sys.maxint*2 + 1)), File "C:\Python27\lib\ctypesinit.py", line 375, in getattr func = self.getitem(name) File "C:\Python27\lib\ctypesinit.py", line 380, in getitem func = self._FuncPtr((name_or_ordinal, self)) File "C:\Python27\lib\ctypesinit.py", line 375, in getattr func = self.getitem(name) File "C:\Python27\lib\ctypesinit.py", line 380, in getitem func = self._FuncPtr((name_or_ordinal, self)) File "C:\Python27\lib\ctypesinit.py", line 375, in getattr func = self.getitem(name) File "C:\Python27\lib\ctypesinit.py", line 380, in getitem func = self._FuncPtr((name_or_ordinal, self)) File "C:\Python27\lib\ctypesinit.py", line 375, in getattr func = self.getitem(name) File "C:\Python27\lib\ctypesinit.py", line 380, in getitem func = self._FuncPtr((name_or_ordinal, self)) File "C:\Python27\lib\ctypesinit.py", line 375, in getattr

Has anyone seeing this issue?

g2384 commented 8 years ago

@starrett67 try the new dev

starrett67 commented 8 years ago

I am on the most recent version of dev branch

starrett67 commented 8 years ago

How do I do the encrypt.so setup on windows 10?

g2384 commented 8 years ago

You need to search that file online (search other github issues). I currently cannot find out which link I used. It is a pastebin link guides you to the mega.nz download link.

sunilsunny565 commented 8 years ago

@starrett67 I am also having the same issue..Did you resolved it ?

tnsbm commented 8 years ago

https://github.com/PokemonGoF/PokemonGo-Bot-Desktop/issues/138 If the error still persists please reopen the issue