Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot unmarshal array into go value of type map[string]interface {} #631

Closed
maeverson opened this issue Nov 3, 2021 · 8 comments
Closed

Comments

@maeverson
Copy link

Hi.
My API works fine until last monday (01 Nov 2021).
Today, I can't generate QRCODE. API return this message:
{"label":"http-access","level":"error","msg":"error decoding login resp: json: cannot unmarshal array into go value of type map[string]interface {}\n","service":"go-whatsapp-rest","time":"2021-11-03T10:00:46.488955064-03:00"}

Someone get this error too? It's the end?

Thanks.

@hagen00
Copy link

hagen00 commented Nov 3, 2021

Yes..me. I tried this:

wac, err := whatsapp.NewConn(3 * time.Minute)
// added this 
wac.SetClientVersion(2, 2123, 7)

but it still doesn't work for me. If you look at the other open issues, this may not be fixable (unless someone can tell me how to fix??)

It does however look like this library is not a long term solution --> #622

@maeverson
Copy link
Author

Changing for SetClientVersion(2, 2142, 12) as last version of WhatsApp Web .. still fails.

@beshoo
Copy link
Collaborator

beshoo commented Nov 3, 2021 via email

@gabstv
Copy link
Contributor

gabstv commented Nov 3, 2021

btw, about the issue:
error decoding login connResp: json: cannot unmarshal array into Go value of type map[string]interface {}\n
it seems that the error is happening with new connections; restoring existing connections is still working

@gabstv
Copy link
Contributor

gabstv commented Nov 3, 2021

try my api https://github.com/beshoo/go-whatsapp-rest-api

@beshoo I updated go-whatsapp to the same version of your project's go.mod (v0.1.2-0.20210615184944-2b8a3e9b8aa2) and the error still happens, so I guess it's also happening in your rest service too.

@gabstv
Copy link
Contributor

gabstv commented Nov 3, 2021

I was able to get the raw message:
["Cmd",{"type":"update"}]
it looks like WhatsApp bumped their min required version again

Edit:
I updated to:
conn.SetClientVersion(2, 3147, 10)
and it worked
I randomly guessed 3147 so I don't know if it is a real version or not

@maeverson
Copy link
Author

I was able to get the raw message: ["Cmd",{"type":"update"}] it looks like WhatsApp bumped their min required version again

Edit: I updated to: conn.SetClientVersion(2, 3147, 10) and it worked I randomly guessed 3147 so I don't know if it is a real version or not

Work's here with another random number.

@hagen00
Copy link

hagen00 commented Nov 3, 2021

Thanks, I can confirm that conn.SetClientVersion(2, 3147, 10) works for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants