tomer8007 / kik-bot-api-unofficial

Python API for writing unoffical Kik bots that act like humans
MIT License
127 stars 77 forks source link

get_jid TimeoutError now frequent #209

Open StethoSaysHello opened 2 years ago

StethoSaysHello commented 2 years ago

I didn't have any issues with using get_jid in the past, but all of a sudden it times out almost every time. This is an issue for me because it's effecting send_chat_message when it's given a username, considering its dependent on get_jid. I investigated this by increasing the TimeoutError time threshold to 10 and then even 100 seconds on line 678 of client.py and this has had no effect, it's simply not retrieving anything. Also experimented with putting it in a while loop to see how many 10-second tries it would take, it took over 30 minutes to get a single JID, so at least I know the success rate isn't 0%, lol. I sent the same code to a friend to try and they had the same issue, so I can rule out it being a local issue, maybe its a temporary issue with Kik? It was working great before, I'm really not sure what changed. Does anyone know why this is?

Sitiaro commented 2 years ago

I tried it multiple times but I had no issue with it. I was able to it without any of the above mentioned errors, but I was facing a similar problem a couple weeks ago. Changing the kik version to the latest one in device_configuration.py fixed it for me. I'm still not sure as to why that happened, and I can't guarantee whether or not it'll work, but give it a go? It could be a temp issue with kik as you mentioned.

StethoSaysHello commented 2 years ago

That's a great idea, went ahead and updated that and gave it another shot, unfortunately it's still stuck in a loop trying to get the JID. I appreciate the input though!! I'd say it must be a server issue, but yours seems to be working okay in the same timeframe? I tried other devices, different networks, different accounts, swapped around device info in client_legacy.py... No luck. Everything else works fine, I know SafteyNet isn't what's interfering either because group joining is functional, and get_jid succeeds sometimes, it just has an extremely low success rate. I also tried another fork with only the version change to make sure it didn't have anything to do with my fork's settings, still no luck. It retrieves kik_node on its own just fine, so... Maybe it's server side but exclusive to certain accounts? Like how on a normal client some accounts can join groups and others can't, despite the number of days on Kik or device used. But then it wouldn't work 100% of the time, right? It does work sometimes. I honestly have no idea what's up.

Sitiaro commented 2 years ago

I tried it with multiple accounts and most of them are ip banned (can't join groups and all), and it worked fine with all of them, so I don't think SafetyNet's the problem here. It grabbed the jids in the 1st attempt itself without any problem so I'm not sure as to what's causing this? You should maybe try different accounts and see whether or not it works? If it's the account that's being a problem them you shouldn't have it with any of the other accounts.

StethoSaysHello commented 2 years ago

Well, the account "Stetho" can join groups both as a bot and on a normal client, but get_jid still doesn't work with it. Just to be sure I tested with 10 more accounts, each with different creation dates, nothing. One did work ("StethoSaysHello13") after 4 attempts, but when testing with the same account again it didn't work after a full 50+ attempts. It seems pretty random.

Sitiaro commented 2 years ago

I think it's something with kik then (the usual)

StethoSaysHello commented 2 years ago

Probably! I'll leave this open in case anyone stumbles on more info. Thanks for the input, @Sitiaro

BaconPeeks commented 2 years ago

Kik has been making many server-side changes. Patching, Tweaking, etc. It most likely is just Kik being Kik. All you can do is wait it out and see if it fixes itself xd

StethoSaysHello commented 2 years ago

Yeah, figured such. I've been experimenting with it, and made a few discoveries. There are some days that it has an almost 100% success rate, but when it doesn't: When using a VPN and running locally, if I set it to the USA (California), it doesn't seem to work. But when I set it to literally any other country, it always seems to have 50% or higher success rate. Maybe this is just a coincidence, but probably not! At least I've ruled out the issue being related to safetynet or account-bound.

BaconPeeks commented 2 years ago

Kik just doesn't like vpns flat out period, People have had issues using vpns with kik. I don't what the correlation is; But, It exists.

StethoSaysHello commented 2 years ago

Well, it doesn't work consistently (for me anyway) without a VPN either, which is why I mention this, because the VPN seems to be improving it with a more managable success rate.

BaconPeeks commented 2 years ago

Well then that raises the obvious yet important question: Are you shadowbanned? Because kik has been randomly shadow banning people for no reason.

So that could be another reason as to why such is happening. Obviously use a fresh device id and android id plus try unplugging your router for 5 minutes to change the IP! if that doesn't work just use a VPN or call your provider and tell them you're being booted offline.

StethoSaysHello commented 2 years ago

No, refer to my above conversation with Sitiaro, the accounts aren't shadow banned, and I already experimented with changing IDs. I tested this both with the unofficial client (they can all join groups with the API), and the official client (they can all use the "meet new people" feature in the original app.), shadow banned accounts can't do either of those things. In addition, the success rate isn't 0% like it would be if it had to do with a ban or safetynet, it's just low more often than usual.

Changing my own IP without VPN has no effect either, for the record. Btw, you can just do that via an admin page when you put your modem's GUI address or your own IPv4 in a browsers URL bar from any device connected to the network, you don't have to call your provider or unplug as you mentioned.

BaconPeeks commented 2 years ago

No, refer to my above conversation with Sitiaro, the accounts aren't shadow banned, and I already experimented with changing IDs. I tested this both with the unofficial client (they can all join groups with the API), and the official client (they can all use the "meet new people" feature in the original app.), shadow banned accounts can't do either of those things. In addition, the success rate isn't 0% like it would be if it had to do with a ban or safetynet, it's just low more often than usual.

Changing my own IP without VPN has no effect either, for the record. Btw, you can just do that via an admin page when you put your modem's GUI address or your own IPv4 in a browsers URL bar from any device connected to the network, you don't have to call your provider or unplug as you mentioned.

Depending upon your router, You can via admin panel. Its very use case, So calling your provider is just easier

bluemods commented 2 years ago

Is this still happening?

StethoSaysHello commented 2 years ago

@bluemods not as frequently, but yes. It went from being a daily issue to only being an issue once or twice a week.