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

[Whatsapp] Login/Restore session broken; solution available #1517

Closed
Vetgans opened this issue Jun 15, 2021 · 8 comments · Fixed by #1518
Closed

[Whatsapp] Login/Restore session broken; solution available #1517

Vetgans opened this issue Jun 15, 2021 · 8 comments · Fixed by #1518
Labels

Comments

@Vetgans
Copy link

Vetgans commented Jun 15, 2021

Describe the bug
Thrown out of the connection to Whatsapp. Impossible to login again or restore old session

Screenshots/debug logs

[0000]  WARN whatsapp:     failed to restore session: error decoding login connResp: json: cannot unmarshal array into Go value of type map[string]interface {}

[0000]  WARN whatsapp:     Failed to log in: error writing login: error writing to websocket: websocket: close sent

[0000] FATAL main:         Starting gateway failed: Bridge whatsapp.mywhatsapp failed to start: error writing login: error writing to websocket: websocket: close sent

See Rhymen/go-whatsapp#571 for further explanation and solution.

@mgechev123
Copy link

@nathanaelhoun Many thanks, my friend!

@Vetgans
Copy link
Author

Vetgans commented Jun 16, 2021

Many thanks for acting so swiftly!
I cannot test it yet because development releases don't provide a linux-armv6 version.

@nathanaelhoun
Copy link
Contributor

nathanaelhoun commented Jun 16, 2021

Hum, after a few hours, the connection seems to be down again.

Version : Built from cd942f7

Logs

At runtime

time="2021-06-16T07:25:51Z" level=info msg=Reconnecting... prefix=whatsapp
time="2021-06-16T07:25:47Z" level=error msg="SendMessage failed: sending message timed out" prefix=gateway
time="2021-06-16T07:25:27Z" level=error msg="SendMessage failed: sending message timed out" prefix=gateway
time="2021-06-16T07:23:11Z" level=info msg="Waiting 5m0s..." prefix=whatsapp
time="2021-06-16T07:23:11Z" level=error msg="Connection failed, underlying error: connection to WhatsApp servers failed: read tcp [REDACTED]:60132->31.13.92.52:443: read: connection reset by peer" prefix=whatsapp

When restarted

time="2021-06-16T07:56:38Z" level=info msg="Starting bridge: whatsapp.relay " prefix=router
time="2021-06-16T07:56:58Z" level=warning msg="failed to restore session: restore session connection timed out" prefix=whatsapp
time="2021-06-16T07:56:58Z" level=warning msg="Failed to log in: error decoding login resp: invalid resp['ref']" prefix=whatsapp
level=fatal msg="Starting gateway failed: Bridge whatsapp.relay failed to start: error decoding login resp: invalid resp['ref']" prefix=main

@zeroone82
Copy link

zeroone82 commented Jun 16, 2021

Hum, after a few hours, the connection seems to be down again.

Version : Built from cd942f7

Logs

I tried a manual build and I get the same errors

EDIT: My bad, I forgot to load the changes to session.go and message.go. It works after changing those files too.

@mgechev123
Copy link

Hum, after a few hours, the connection seems to be down again.

@nathanaelhoun my connection is fine. I'm using your build for like 11 hours straight now and haven't had any issues so far.

@zeroone82
Copy link

@jzvi12 you're probably running oom. What I did was clone the repo, modify the files and then build the container instead of using the hub image.

@ciroiriarte
Copy link

will this hit 42wim/matterbridge:stable docker image?

@nathanaelhoun
Copy link
Contributor

@nathanaelhoun my connection is fine. I'm using your build for like 11 hours straight now and haven't had any issues so far.

@mgechev123 Nice! Mine is also fine after a few days, I think it was another connection problem with my local ISP.

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

Successfully merging a pull request may close this issue.

5 participants