This morning I've fired the WA in my phone (with Miranda closed) and it asked to register my phone, which it did successfully.
Then I had to wait a couple of hours and register back the WA in Miranda.
The result is still the same: it connects fine at startup but disconnects randomnly and then is unable to connect again until I restart Miranda.
Log for the startup connection:
[16:06:23 1AC8] [WhatsApp_1] ===== Beginning SetStatus process
[16:06:24 38B8] [WhatsApp_1] Connecting...
[16:06:24 38B8] [WhatsApp_1] Connection request to c.whatsapp.net:443 (Flags 4)....
[16:06:24 38B8] [WhatsApp_1] (0641F068) Connecting to server c.whatsapp.net:443....
[16:06:24 38B8] [WhatsApp_1] (0641F068) Connecting to ip 173.192.222.169:443 ....
[16:06:24 38B8] [WhatsApp_1] (972) Connected to c.whatsapp.net:443
[16:06:24 38B8] [WhatsApp_1] >> sent stream start
[16:06:24 38B8] [WhatsApp_1] >> sent features
[16:06:24 38B8] [WhatsApp_1] >> send auth, auth blob size 0
[16:06:24 38B8] [WhatsApp_1] >> read stream start
[16:06:24 38B8] [WhatsApp_1] >> <stream:features>
[16:06:24 38B8] [WhatsApp_1] >>
[16:06:24 38B8] [WhatsApp_1] >> Send response
[16:06:24 38B8] [WhatsApp_1] >> Read success
[16:06:24 38B8] [WhatsApp_1] XML written:
[16:06:24 38B8] [WhatsApp_1] Set status to online
Log for the failed connection:
[15:57:44 029C] [WhatsApp_1] ===== Beginning SetStatus process
[15:57:44 2A10] [WhatsApp_1] Connecting...
[15:57:44 2A10] [WhatsApp_1] Connection request to c.whatsapp.net:443 (Flags 4)....
[15:57:44 2A10] [WhatsApp_1] (08331090) Connecting to server c.whatsapp.net:443....
[15:57:44 2A10] [WhatsApp_1] (08331090) Connecting to ip 173.192.222.170:443 ....
[15:57:44 2A10] [WhatsApp_1] (704) Connected to c.whatsapp.net:443
[15:57:44 2A10] [WhatsApp_1] >> sent stream start
[15:57:44 2A10] [WhatsApp_1] >> sent features
[15:57:44 2A10] [WhatsApp_1] >> send auth, auth blob size 20
[15:57:44 2A10] [WhatsApp_1] >> read stream start
[15:57:44 2A10] [WhatsApp_1] >> <stream:features>
</stream:features>
[15:57:44 2A10] [WhatsApp_1] >> <challenge>
Mβ^$nχ―+ξ?gΝFRdβ</challenge>
[15:57:44 2A10] [WhatsApp_1] >> Send response
[15:57:44 2A10] [WhatsApp_1] Exception: Login failure
[15:57:44 2A10] [WhatsApp_1] (08331090:704) Connection closed internal
[15:57:44 2A10] [WhatsApp_1] (08331090:4294967295) Connection closed
[15:57:44 2A10] [WhatsApp_1] Set status to offline
[15:57:44 2A10] [WhatsApp_1] Break out from loop
There is a "challenge" entry in the failed connection. According to Google, this seems to be a part of the standard authentication procedure, but WA server doesn't seem to like the response from my client. Is that the problem?