yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

Message sending dead?

Open DevinAo0812 opened this issue 2 years ago • 40 comments

layers.axolotl.axolotl.AxolotlSendLayer.on_get_keys_process_errors(AxolotlSendLayer.java:286): Failed to create prekeybundle for [email protected], user had missing parameters: layers.axolotl.protocolentities.MissingParametersException, is that a valid user?

DevinAo0812 avatar Dec 06 '22 01:12 DevinAo0812

Failed to create prekeybundle for?? I don't know why I refused

DevinAo0812 avatar Dec 06 '22 01:12 DevinAo0812

duplicate: issues #3178 Now whatsapp servers not receive keys from our API (error 406 or 503), then cant encode messages for sending. But in original apk - whatsapp servers receive keys. Node not changed. Maybe, server somehow sees a non-original client

ORMiK0 avatar Dec 06 '22 08:12 ORMiK0

is there any workaround for that?

DevinAo0812 avatar Dec 06 '22 08:12 DevinAo0812

Now for sending messages we need to send node after connection: <ib><cat>token</ib> Then messages can be sent. To receive this token we need to send node: <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='0'><pn>'some bytes"</pn></iq> I can't reverse the function which one received this "some bytes".

ORMiK0 avatar Dec 08 '22 20:12 ORMiK0

Now for sending messages we need to send node after connection: <ib><cat>token</ib> Then messages can be sent. To receive this token we need to send node: <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='0'><pn>'some bytes"</pn></iq> I can't reverse the function which one received this "some bytes".

After my analysis, sending this node is not necessary, some bytes may come from firebase push server.

kaisar945 avatar Dec 09 '22 09:12 kaisar945

sending this node is not necessary

No. If we send the correct "some bytes" then we will receive the correct request from whatsapp with "cat". Correct request: tx <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='07'><pn>some bytes</pn></iq> rx <iq from='s.whatsapp.net' type='result' id='07'><cat>"token"</cat></iq>

not correct "some bytes" tx <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='07'><pn>some bytes</pn></iq> rx <iq from='s.whatsapp.net' type='result' id='07'>

This "token" after receive can find in file com.whatsapp_preferences_light.xml - string pref_client_auth_token. If I use this pref_client_auth_token in my code after connecting, then I can send messages and upload axolotl keys. If I disable this pref_client_auth_token - I cant send messages and upload axolotl keys (error 503).

ORMiK0 avatar Dec 09 '22 13:12 ORMiK0

sending this node is not necessary

No. If we send the correct "some bytes" then we will receive the correct request from whatsapp with "cat". Correct request: tx <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='07'><pn>some bytes</pn></iq> rx <iq from='s.whatsapp.net' type='result' id='07'><cat>"token"</cat></iq>

not correct "some bytes" tx <iq xmlns='urn:xmpp:whatsapp:push' to='s.whatsapp.net' type='get' id='07'><pn>some bytes</pn></iq> rx <iq from='s.whatsapp.net' type='result' id='07'>

This "token" after receive can find in file com.whatsapp_preferences_light.xml - string pref_client_auth_token. If I use this pref_client_auth_token in my code after connecting, then I can send messages and upload axolotl keys. If I disable this pref_client_auth_token - I cant send messages and upload axolotl keys (error 503).

I tested 5 accounts, 4 accounts did not find the behavior of sending some bytes and did not find pref_client_auth_token in com.whatsapp_preferences_light.xml they can send messages correctly, but 1 account sent some bytes and there is pref_client_auth_token I try to delete pref_client_auth_token to make It sends some bytes again for analysis but with no luck it doesn't send anymore and this account can still send messages correctly.

BTW, the version I'm using is 2.22.23.85

kaisar945 avatar Dec 09 '22 17:12 kaisar945

Totally agree with you. It seems that WhatsApp is rolling out this update gradually in different countries.

account can still send messages correctly.

Try to send a message on a new number. Because it does not work sending the type "pkmsg" - used for sending a message on a new number. "msg" - work correct

ORMiK0 avatar Dec 09 '22 18:12 ORMiK0

you need update data! telegram:@tgforme2

reversePublic avatar Dec 22 '22 07:12 reversePublic

firebase push server firebase push server After the simulation is successful, the pn can be received correctly, but after the pn is sent by thenode, it cannot receive the normal reply. Have you solved this problem

yyjc2021 avatar Jan 20 '23 05:01 yyjc2021

more details

ORMiK0 avatar Jan 21 '23 15:01 ORMiK0

Yes, a pn must be sent to the server before the key can be successfully uploaded. solution

huoxing007 avatar Jun 17 '23 14:06 huoxing007

Yes, a pn must be sent to the server before the key can be successfully uploaded. solution

Yes. It works! Can You send me the source code for create GCM on my website? Or publish on github.com?

ORMiK0 avatar Jun 18 '23 12:06 ORMiK0

Yes, a pn must be sent to the server before the key can be successfully uploaded. solution

Yes. It works! Can You send me the source code for create GCM on my website? Or publish on github.com?

Have you tested that it works? Can you tell me how it works? I am facing this problem now.

huoxing007 avatar Jun 19 '23 06:06 huoxing007

  1. Use https://github.com/SwitchBugs/WhatsappGCM to connect and receive config id. Example: eUFDecdjKnQ:APA91bF7z80d2EcSwTiOMLh1bKc5RIZSPxv5Zzvv-4oVx8ARO9SyKRmcGhZjw5s0LkZeg7c1vRBw6ZnBaqi0GPmsobb_J6eOOZ6P_F92svnWmwUto-mVzbad5MCa5TDhme_OzzM2n9WU
  2. Login whatsapp channel and send request: <iq id='1' xmlns='urn:xmpp:whatsapp:push' type='set' to='s.whatsapp.net'> <config id="eUFDecdjKnQ:APA91bF7z80d2EcSwTiOMLh1bKc5RIZSPxv5Zzvv-4oVx8ARO9SyKRmcGhZjw5s0LkZeg7c1vRBw6ZnBaqi0GPmsobb_J6eOOZ6P_F92svnWmwUto-mVzbad5MCa5TDhme_OzzM2n9WU" platform="gcm" /> </iq>
  3. Then wait "pn" on: https://github.com/SwitchBugs/WhatsappGCM
  4. Send "pn" in whatsapp: <iq id='1' xmlns='urn:xmpp:whatsapp:push' type='get' to='s.whatsapp.net'> <pn/>xxxxxxxx</pn> </iq>
  5. If "pn" is correct then we receive "cat". Need save "cat" and send every time at login in whatsapp. tx <ib> <cat>2F6D77310001D33670D3F99DA8F36FF6E5A............................</cat> </ib>

See my answers above

ORMiK0 avatar Jun 19 '23 10:06 ORMiK0

registration success but after login disconnected

D 2023-06-21 16:08:03,490 yowsup.layers.network.dispatcher.dispatcher_asyncore - handle_close D 2023-06-21 16:08:03,490 yowsup.layers.network.layer - Disconnected D 2023-06-21 16:08:03,491 yowsup.layers.axolotl.layer_control - Disconnected, reboot_connect? = False D 2023-06-21 16:08:03,492 yowsup.layers.protocol_iq.layer - stopping ping thread D 2023-06-21 16:08:03,953 yowsup.layers.protocol_iq.layer - YowPingThread-2 - ping thread stopped

any suggest ?

mrjoebudi avatar Jun 21 '23 09:06 mrjoebudi

yowsup has expired, many functions are not available, if you pay I can tell you some solutions.

huoxing007 avatar Jun 22 '23 05:06 huoxing007

what's your tg? or another ways i can contact you. @huoxing007

andreensteven avatar Jun 22 '23 06:06 andreensteven

I tried the last version and tweaked the source code by reading the comments on the issue Yowsup that I installed works normally, i use dexHEX to read the latest APK version and i write it on ENV file Registration = work Login = work Receive Messages = work Sending messages = working Changing Profile = worked

Constraint: After 60 minutes of observation, and when the internet connection was lost, I changed IP, my whatsapp number account was banned,

has anyone experienced this?

mrjoebudi avatar Jun 22 '23 16:06 mrjoebudi

Yesterday i'm about to patch yowsup to automate get cat and send cat token when login . But today it seems i cannot connect to WhatsappGCM again today. What should i do? @ORMiK0 @huoxing007

  1. Btw, i always , extract config.json and axolotl.db from Whatsapp on rooted phone or memu.
  2. @ORMiK0 , I didn't find yet, string pref_client_auth_token on com.whatsapp_preferences_light.xml. How to trigger it?

bahtiarp avatar Jul 18 '23 04:07 bahtiarp

it is ok now. @bahtiarp

huoxing007 avatar Jul 18 '23 06:07 huoxing007

it is ok now. @bahtiarp 🙏🙏🙏

bahtiarp avatar Jul 18 '23 14:07 bahtiarp

@bahtiarp have you already implemented the changes for yowsup and can you share them with us please?

glitchhunt3r avatar Jul 31 '23 13:07 glitchhunt3r

@bahtiarp have you already implemented the changes for yowsup and can you share them with us please?

I have already implemented, but unfortunately it seems that https://github.com/SwitchBugs/WhatsappGCM not working anymore. @huoxing007 If the GCM on again, i will show the patched.

bahtiarp avatar Aug 18 '23 02:08 bahtiarp

Can you please share what you have implemented and we can work on a solution together? 

glitchhunt3r avatar Aug 18 '23 05:08 glitchhunt3r

  1. Use https://github.com/SwitchBugs/WhatsappGCM to connect and receive config id. Example: eUFDecdjKnQ:APA91bF7z80d2EcSwTiOMLh1bKc5RIZSPxv5Zzvv-4oVx8ARO9SyKRmcGhZjw5s0LkZeg7c1vRBw6ZnBaqi0GPmsobb_J6eOOZ6P_F92svnWmwUto-mVzbad5MCa5TDhme_OzzM2n9WU
  2. Login whatsapp channel and send request: <iq id='1' xmlns='urn:xmpp:whatsapp:push' type='set' to='s.whatsapp.net'> <config id="eUFDecdjKnQ:APA91bF7z80d2EcSwTiOMLh1bKc5RIZSPxv5Zzvv-4oVx8ARO9SyKRmcGhZjw5s0LkZeg7c1vRBw6ZnBaqi0GPmsobb_J6eOOZ6P_F92svnWmwUto-mVzbad5MCa5TDhme_OzzM2n9WU" platform="gcm" /> </iq>
  3. Then wait "pn" on: https://github.com/SwitchBugs/WhatsappGCM
  4. Send "pn" in whatsapp: <iq id='1' xmlns='urn:xmpp:whatsapp:push' type='get' to='s.whatsapp.net'> <pn/>xxxxxxxx</pn> </iq>
  5. If "pn" is correct then we receive "cat". Need save "cat" and send every time at login in whatsapp. tx <ib> <cat>2F6D77310001D33670D3F99DA8F36FF6E5A............................</cat> </ib>

See my answers above

@glitchhunter-0x41 , actually i did the same as @ORMiK0 did. But i put the cat token on config.json, so every connect to whatsapp, i sent the ib for that cat. Do you need to know how to do that in yowsup? Will be better if somebody tell us how to do the GCM things directly to firebase server.

bahtiarp avatar Aug 18 '23 08:08 bahtiarp

I do not get the "pn" after sending the config request. The problem I am seeing is the following: I think we need to unregister the original device somehow from the Firebase server and register the yowsup device. Right now everytime I am sending the cat token that I retrieved from the real physical device with yowsup, and followed by sending a regular text message or so, I can see a Firebase Push Notification being send to the physical device instead of my CLI client. I think the reason for that is that I have not received a new "cat" and also no "pn" after I obtained a config_id and that stuff. I think we must somehow obtain such a config_id, set / register our CLI client with that, wait for "pn", send it back, and then receive "cat", right? 

glitchhunt3r avatar Aug 18 '23 12:08 glitchhunt3r

I don't know why, but after a few days some of the CAT token becomes stale (Cannot send messages) , and CAT needs to be regenerated (As steps mention by @ORMiK0 ) After regenrated , message can be sent again.

@glitchhunter-0x41 , do you know how to generate config token? and get PN from websocket (firebase?)

bahtiarp avatar Aug 18 '23 12:08 bahtiarp

No I did not get this working, can you please share that with me?

glitchhunt3r avatar Aug 18 '23 17:08 glitchhunt3r

That's the problem, it done with GCM (proxy) thing by @huoxing007 .

bahtiarp avatar Aug 19 '23 00:08 bahtiarp