PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

0.67.2 #6075

Closed camnomis closed 7 years ago

camnomis commented 7 years ago

I know bossland/PokeFarmer has had all sorts of problems with capacity/authentication etc so haven't been focusing on the new API, I read a comment saying that even through the API has progressed form 0.67.1 the old endpoint can still be used, does anyone know if this is correct?

No longer use the bot for catching, just sorting/mass evolving and wanted to know how "safe" it is

ghost commented 7 years ago

Hi, it will for sure work, but it is not safe. Since the app was forced to Update niantic could see, that everybody who is still playing on 0.67.1 is not using the app.

You might propably get flagged!

davidakachaos commented 7 years ago

Afaik the pgoapi got bumped to 0.67.2 (not everything in the API yet) so I think if you use that latest version (setup.sh -u) the bot will identify itself as using the 0.67.2 API. The hashing service (bossland) still identifies as 0.67.1 but the hashing hasn't changed between 0.67.1 and 0.67.2 (again, as far as I know) That beinmg said, botting is never totally safe, Niantic could detect invalid calls from any app that is not the offical app. Always you at your own risk! For what its worth, I'm currently running 2 accounts without problems.

goedzo commented 7 years ago

Afaik the pgoapi got bumped to 0.67.2 (not everything in the API yet) so I think if you use that latest version (setup.sh -u)

Thanks for the info. I run the container version of Pika, so how can I update this command in my container? I now have build the new dev branche using >docker build --build-arg BUILD_BRANCH=dev -t pokemongo-bot .

But running this new branche gives me:

[2017-07-10 18:01:06] [PokemonGoBot] [INFO] Niantic Official API Version: 0.67.2 [2017-07-10 18:01:06] [PokemonGoBot] [INFO] Latest Bossland Hashing API Version: 0.67.1

davidakachaos commented 7 years ago

Yes, the Bossland Hashing API is still 0.67.1, but as far as I can see it works fine with 0.67.2 You can get the bot to work (don't do this with a main account, I do not assume risk for your account(s)) by setting in config.json

"check_niantic_api": false

So the bot will run.

davidakachaos commented 7 years ago

Also see #6070

MerlionRock commented 7 years ago

Dear All,

Pogo API now has a method that return latest hashing or API they are using now. So we no longer need to compare to Bossland's end point to know what API we are on.

Currently Pogo API is 0.67.2

I'll update this ASAP.

MerlionRock commented 7 years ago

Updated. See #6077

goedzo commented 7 years ago

Hi MerlionRock,

I've updated my container to the latest version, but now the application crashes with the following error:

AttributeError: class PGoApi has no attribute 'get_api_version'

It seems that the build command to get the dev branch, does not give the updated PGoApi. Do you know how to proceed?

MerlionRock commented 7 years ago

Anyone faces this issue with Dev branch? He is using docker and I am not familiar with Docker

lepeli commented 7 years ago

For updating a container with Docker , you need to delete your container's image.

And then rebuild your image

goedzo commented 7 years ago

Hi Lepeli,

Thanks for the suggestion, but that does not work. Here is my build output: G:\Setups\Pokemon Go\Bot\Pikabot\PokemonGo-Bot-dev>docker build --build-arg BUILD_BRANCH=dev -t pokemongo-bot . Sending build context to Docker daemon 5.528 MB Step 1/13 : FROM alpine ---> 7328f6f8b418 Step 2/13 : ARG BUILD_REPO=PokemonGoF/PokemonGo-Bot ---> Using cache ---> b6be2e03d36c Step 3/13 : ARG BUILD_BRANCH=master ---> Using cache ---> de2533eedf0e Step 4/13 : LABEL build_repo $BUILD_REPO build_branch $BUILD_BRANCH ---> Using cache ---> 346330320cf2 Step 5/13 : WORKDIR /usr/src/app ---> Using cache ---> 752170cf6877 Step 6/13 : VOLUME /usr/src/app/configs /usr/src/app/web ---> Using cache ---> 636438f6c0f0 Step 7/13 : RUN apk -U --no-cache add python py-pip tzdata && rm -rf /var/cache/apk/* && find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f ---> Using cache ---> 261ca3166004 Step 8/13 : ADD http://pgoapi.com/pgoencrypt.tar.gz /tmp/pgoencrypt.tar.gz Downloading 243.6 kB/243.6 kB ---> Using cache ---> d15b8a73cca5 Step 9/13 : ADD https://raw.githubusercontent.com/$BUILD_REPO/$BUILD_BRANCH/requirements.txt . Downloading 633 B ---> Using cache ---> b449231be7c6 Step 10/13 : RUN apk -U --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git && tar zxf /tmp/pgoencrypt.tar.gz -C /tmp && make -C /tmp/pgoencrypt/src && cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so && ln -s locale.h /usr/include/xlocale.h && pip install --no-cache-dir -r requirements.txt && apk del .build-dependencies && rm -rf /var/cache/apk/* /tmp/pgoencrypt* /usr/include/xlocale.h && find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f ---> Using cache ---> 7096d895d261 Step 11/13 : ADD https://api.github.com/repos/$BUILD_REPO/commits/$BUILD_BRANCH /tmp/pgobot-version Downloading 7.471 kB ---> 83fdc6b4e1ec Removing intermediate container 4c9a797a2653 Step 12/13 : RUN apk -U --no-cache add --virtual .pgobot-dependencies wget ca-certificates tar jq && wget -q -O- https://github.com/$BUILD_REPO/archive/$BUILD_BRANCH.tar.gz | tar zxf - --strip-components=1 -C /usr/src/app && jq -r .sha /tmp/pgobot-version > /usr/src/app/version && apk del .pgobot-dependencies && rm -rf /var/cache/apk/* /tmp/pgobot-version ---> Running in 6167fe5e2302 fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz (1/6) Installing wget (1.19.1-r2) (2/6) Installing ca-certificates (20161130-r2) (3/6) Installing tar (1.29-r1) (4/6) Installing oniguruma (6.2.0-r0) (5/6) Installing jq (1.5-r3) (6/6) Installing .pgobot-dependencies (0) Executing busybox-1.26.2-r5.trigger Executing ca-certificates-20161130-r2.trigger OK: 67 MiB in 30 packages (1/6) Purging .pgobot-dependencies (0) (2/6) Purging wget (1.19.1-r2) (3/6) Purging ca-certificates (20161130-r2) Executing ca-certificates-20161130-r2.post-deinstall (4/6) Purging tar (1.29-r1) (5/6) Purging jq (1.5-r3) (6/6) Purging oniguruma (6.2.0-r0) Executing busybox-1.26.2-r5.trigger OK: 64 MiB in 24 packages ---> b3bafe4860a5 Removing intermediate container 6167fe5e2302 Step 13/13 : CMD python pokecli.py ---> Running in 240d4b80180d ---> 5a757b9149df Removing intermediate container 240d4b80180d Successfully built 5a757b9149df SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

So it rebuilds a lot, but it does not get an updated pogo api. Do you know how to fix this?

goedzo commented 7 years ago

Edit: It seems that a lot of extra containers are also build in the process, so with above input I was able to find that

docker images -q

Gives all the containers. So I removed them all with the

docker rmi [image_id]

After this it seems to rebuild everything, including the pgo api.

Within the build process this seems to me the relevant line:

Collecting pgoapi from git+https://github.com/pogodevorg/pgoapi.git@develop#egg=pgoapi (from -r requirements.txt (line 4)) Cloning https://github.com/pogodevorg/pgoapi.git (to develop) to /tmp/pip-build-Rwwo7j/pgoapi

And now it seems to work correctly! So thank you for the help. I think the documentation on how to properly rebuild the container, should be added :)

MerlionRock commented 7 years ago

@goedzo Thanks for the suggestion. @lepeli Do you want to under take the task of creating a documentation on re-building Docker?

goedzo commented 7 years ago

Adding some more details on this because it seems that pgoapi will not implement all protos, while the protos are apdated. So i suggest to switch to a fork that does use all protos messages: it is just straight forward to recompiling protos. It is just a matter of updating the requirements.txt file to use the fork for pogoapi as being done here: https://github.com/davidakachaos/PokemonGo-Bot/blob/changes/requirements.txt

MerlionRock commented 7 years ago

Straight forward, huge implication. Proper discussion before we move on. This bot has resisted call for gym features for so long, are we ready to give in?

Those who contributed way before us, do they want to see us doing this?

ghost commented 7 years ago

Do I understand correctly that the bot did not do gym things before to not influence normal players negatively?

MerlionRock commented 7 years ago

@thelemonenergy I am not the original team that started this project. Most people who started this project are also normal active players, just like those guys in the python API's team. Many of us contributed to this project just for fun / interest and have no wish to see the bot having negative impact on normal active players. While @goedzo argument for gym feature is valid, especially since gym in game is no longer the same as before, having it in bot can still affect active players. We need to seriously think through before approving it. Yes, it is true that other bots have it, then why not just go ahead and se those bots? And they have nice UI too~ Bots with gym features are causing a havoc out there, do we need to contribute more to it?

I will agree to move on with a different API provider if they continue to strip their API further down to further limit what a bot can do and only provide what mappers need. But no, they are not doing it.

ghost commented 7 years ago

@MerlionRock I personally would not place pokemons in gyms because as a real player i know the struggle of full gyms of the own team. But I dont live in the City so i also know the struggle of fighting raids alone.

I think a Raid fighting feature would be a good thing and even helps other players.

goedzo commented 7 years ago

To add some extra pointers to this about the arguments that it should be fair for real players. Think about the sniping we had, which was something that only real players could do if they spoofed. Now with sniping, you got mons that were 100% iv or huge cp without issues. These powerhouse pokemon influences the game for real players because you see them everywhere. Ofcourse this is not only caused by bots, so don't get me wrong. My argument is that there are much more features that influence players anyway. Not only gym features.

Then going back to the discussion, i think we should at least include a complete api that gives us the option to implement things we like to play with. The underlying protos project already has it. Then the api decides now not to "compile" all protos because of the word gym, but they did this in the past. As a result the api is forked huge amounts of times for all the other bots, because it is just that easy to support the full protocols.

So for now let's first decide: a- if we want to include the full protos. Theb b-do we want to implement gym features in the bot?

goedzo commented 7 years ago

@thelemonenergy we can implement a friendly version of mon placing, like only place a mon if there are at least 3 free spots. And only place 5 mons max. The idea is gathering coins in the bot, not holding gyms.

MerlionRock commented 7 years ago

@goedzo true to a certain extend, but over time, eventually, active real players caught what they want too. Maybe not 100% IV, but still good enough to complete in Gyms. Not counting spoofers, can we not conclude that up to a certain %, a player still put in effort in gyms if fighting in gym features are not found in bots?

The real problem arises when players use botted account and spoof all over the world.... collecting pokemons, even 100% IV, by itself, is harmless if those pokemons are not use in gyms....

Now for your choices: Q: Do we want full protos? Ans: Yes, but fully maintained and up to date. Can you assure that?

Q: Do we want to implement gym features in the bot? Haiz.... I leave it to the other devs to decide. If none oppose, I respect majority votes. I'm very democratic....

goedzo commented 7 years ago

Q: Do we want full protos? Ans: Yes, but fully maintained and up to date. Can you assure that?

Yes if protos keeps updating their .proto files, i can. That's why i have created the fork of pgoapi.

MerlionRock commented 7 years ago

@goedzo To add on, I want gym feature disabled (if end of the end we have it) if routing is enabled. I don't want players abuse the system by keep going back to same gyms round and round and keep re-slotting

davidakachaos commented 7 years ago

Okay, let me explain why I added the feature in the first place. I want the bot to act like a human when playing the game. If you play the game as a regular player, you want to place a Pokemon in a gym if there is an open spot. You walk past a gym, see there is a spot and drop a Pokemon in the gym and move on. It's what a normal player would do. I'm fully against adding any kind of fighting in the bot. No attacking gyms, no PvP, no raids, nothing like that. These functions I consider game breaking as you (as a human) can fight as effectively as a bot. Not that the fighting in Pokemon Go is difficult or complicated. But the raids and fighting the gyms I consider the social aspect of the game. I personally get out there and fight the gyms and do the raids. Especially the raids are fun to do in a group. And being in those groups, I know the reactions we get about spoofers (all negative, unless we're low on players). So I would vote against fighting by the bot.

That being said; the act of dropping a Pokemon in a gym if there is room (limits can be added for that of course, so we don't drop a Pokemon when there are only X spots left) makes the bot act more like a regular player.

goedzo commented 7 years ago

@davidakachaos I fully agree with you about gym fighting and taking over gyms. That is game breaking so we can agree on not implementing that. There is a debate about raids, because i play it the same a you. However i do also play with group from another city that sometimes ask for my help in defeating the raid boss. The only way to get there is to "fly". Also they ask me to kick them out of gyms so that they can receive coins. I also "fly" there. So in my case the normal players are actually happy with spoofers and use them in their advantage. So we can also think about fighting a gym when a player is there longer then 1 day, because it will give them their coins. As a normal player this is also my behavior.

ghost commented 7 years ago

I play on a daily basis and in my village is 1 gym with a raid everyday. I play with my legit account. I am level 32 and i can do pink egg raids on my own. I never had another player help with a raid so far in this village.

Can we add a "Raid Assistement" Featute that only fights a raid when there is at least one other player in the group and not more than 3 others? That would be awesome and i consider it fair

goedzo commented 7 years ago

@All, i like all the gym discussions here, but before we get carried away on possible gym features let's first cover our bases by deciding to include the complete 0.67.2 protos in the bot. Only after that we can even think about implementing gym features.

MerlionRock commented 7 years ago

You see... When. We start talking about gyms... Boom.... All get excited....

This is what I fear.

Let settle the API first.

MerlionRock commented 7 years ago

Also, right before 22nd, I am very sure there will be a big update coming to break all bots and map so that Niantic can have their nice event without the maps and bots.... Why not we wait till the next update?

goedzo commented 7 years ago

@merlionrock not in favor on waiting because we can never debug / try / play with the changes to find out how they work. The longer we wait with the new api, the more the bot gets behind and actually have the risk of getting banned because of using an old and deprecated api.

lepeli commented 7 years ago

Will make a documatation for docker rebuild.

Jcolomar commented 7 years ago

Closed #6091