go-whatsapp: could not decode binary: invalid string with tag 174

Hello, I got this error

error caught in handler: error processing data: error decoding binary: could not decode binary: invalid string with tag 174

Directly after scanning the QR

Here is some information

Mobile OS: Android 6.0
Whatsapp Version: 2.19.190
go-whatsapp Version: latest, the master branch at 4c0e263c801b8b5bd7fad1577786ab6c32c2c042

A small note here for the owner, i’m also working on another project uses the same implementation as this project, but written in rust, and of course since most of my code is ported from this project i’m now facing the same problem.

Here is a debug log from my implementation that maybe help

OPEN THE LOG

[2019-07-08T02:46:39Z DEBUG wapi::client] Received message Text("s1,[\"Conn\",{\"ref\":\" MASKEDI\",\"wid\":\"MASKED@c.us\",\"connected\":true,\"isResponse\":\"false\",\"serverToken\":\"MASKED",\"browserToken\":\"  MQWKED",\"clientToken\":\"MASKED",\"lc\":\"US\",\"lg\":\"en\",\"locales\":\"en-US\",\"secret\":\"MASKED",\"protoVersion\":[0,17],\"binVersion\":11,\"battery\":48,\"plugged\":false,\"platform\":\"android\",\"features\":{\"URL\":true,\"FLAGS\":\"EAEYASgBOAFAAUgBWAFgAWgBmAEBoAEBsAECyAEB2AEC6AEC\"},\"phone\":{\"wa_version\":\"2.19.190\",\"mcc\":\"602\",\"mnc\":\"002\",\"os_version\":\"6.0\",\"device_manufacturer\":\"LENOVO\",\"device_model\":\"A7000plus\",\"os_build_number\":\"A7000-a_PLUS_S308_160618_ROW\"},\"pushname\":\"Shady Khalifa\",\"tos\":0}]")
[2019-07-08T02:46:39Z INFO  echo] new state: Connected
[2019-07-08T02:46:39Z DEBUG echo] PersistentSession { client_token: "MASKED", server_token: "MASKED", client_id:[...], mac: [...] }
[2019-07-08T02:46:39Z INFO  echo] user data changed: UserJid(Jid { id: "MASKED", is_group: false, is_broadcast: false, is_remote: false })
[2019-07-08T02:46:39Z DEBUG wapi::client] Received message Text("s2,[\"Blocklist\",{\"id\":1,\"blocklist\":[\"201145915654@c.us\",\"201098459714@c.us\"]}]")
[2019-07-08T02:46:39Z DEBUG wapi::client] received json: Array([Short("Blocklist"), Object(Object { store: [("id", Number(Number { category: 1, exponent: 0, mantissa: 1 }), 0, 1), ("blocklist", Array([Short("201145915654@c.us"), Short("201098459714@c.us")]), 0, 0)] })])
[2019-07-08T02:46:39Z DEBUG wapi::client] Received message Binary([52, 55, 97, 102, 55, 54, 97, 51, 54, 99, 101, 102, 55, 51, 100, 97, 46, 45, 45, 51, 55, 44, 143, 101, 218, 52, 137, 207, 52, 177, 250, 42, 128, 60, 171, 213, 126, 119, 224, 168, 116, 2, 152, 239, 223, 149, 241, 245, 59, 2, 99, 220, 68, 91, 10, 201, 229, 160, 28, 210, 240, 238, 154, 30, 168, 29, 1, 7, 195, 210, 241, 179, 242, 237, 49, 101, 16, 36, 117, 126, 29, 110, 166, 125, 136, 149, 73, 4, 218, 75, 16, 151, 219, 229, 251, 80, 128, 130, 43, 68, 199, 1, 146, 9, 77, 41, 80, 171, 118, 172, 201, 64, 84, 118, 50, 97, 120, 233, 76, 147, 221, 137, 217, 250, 168, 163, 204, 197, 196, 112, 183, 253, 52, 144, 235, 28, 245, 55, 47, 15, 150, 123, 218, 200, 5, 56, 191, 208, 124, 214, 6, 28, 13, 74, 96, 114, 107, 111, 130, 22, 159, 181, 146, 222, 20, 164, 4, 4, 149, 81, 218, 174, 11, 196, 139, 14, 225, 129, 23, 136, 234, 165, 245, 155, 191, 250, 39, 68, 2, 230, 51, 90, 175, 190, 157, 211, 70, 32, 236, 95, 146, 113, 98, 183, 187, 132, 176, 170, 180, 239, 251, 165, 153, 124, 78, 150, 214, 142, 24, 89, 145, 167, 96, 253, 66, 155, 206, 160, 15, 129, 201, 58, 45, 132, 91, 160, 107, 187, 135, 96, 43, 183, 147, 182, 102, 175, 96, 212, 193, 38, 13, 87, 60, 19, 245, 217, 42, 181, 165, 8, 102, 141])
[2019-07-08T02:46:39Z TRACE wapi::protocol] Found the sep at: 21, and the tag is: [52, 55, 97, 102, 55, 54, 97, 51, 54, 99, 101, 102, 55, 51, 100, 97, 46, 45, 45, 51, 55]
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 9
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 248
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 23
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 91
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 139
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 248
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 52
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 52
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 52
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 52
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 40
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 40
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 40
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 80
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 40
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 45
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 250
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 255
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 35
[2019-07-08T02:46:39Z DEBUG wapi::node] trying to find the tag: 174
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Unknown("Invalid Tag, tag 174")'

i’m open to provide more information as needed to reproduce this issue

Thanks 😃

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 31 (7 by maintainers)

Most upvoted comments

I agree to ignore this error on your application, but we cannot ignore this error as a library

@Lantizia understood

But this commit did not fix the problem only mask the error, right?

Actually, we need to know what tag it is, since definitely WhatsApp will update to this version soon, so we would face that issue.

I managed to solve this by returning an empty Node when getting a 174 tag. And my implementation is seems to work fine in beta version. I can login send/recv messages, but this sounds like a hack/workaround this issue, we need to investigate more to know actually what that tag is, or even is this actually a new tag or a bug in our decoder reading a wrong bits results a wrong tag ?!

Lo folks, sorry but I I think this issue hasn’t really gone away.

When enabling the account it’s icon just stays greyed out as though it isn’t connecting… image

This is obviously after enabling it at least once the first time, scanning the QR successfully and then restarting Pidgin.

Only some of the time does the below appear after enabling it, sometimes it doesn’t… but in all cases the account stays greyed out for me… image

I’m using the latest nightly on Ubuntu 18.04 amd64, the way I personally install it is below (which includes a handy and legal way of obtaining the WhatsApp icon!)…

sudo wget -P /usr/lib/purple-2 https://buildbot.hehoe.de/purple-gowhatsapp/builds/libgowhatsapp_0.0.3~git9da9b8e+gowhatsapp~git5c79b2c_amd64_ubuntu18.04.so
for s in 16 22 48; do curl -sL web.archive.org/web/0im_/media.whatsapp.com/directory/logos/Bitmap/logo-color-symbol.png|sudo convert -background none -trim -resize $sx$s - /usr/share/pixmaps/pidgin/protocols/$s/whatsapp.png; done