mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.28k stars 173 forks source link

Did whatsapp upgrade their stuff? #242

Closed IngwiePhoenix closed 3 years ago

IngwiePhoenix commented 3 years ago

Suddenly, my Whatsapp bridge stopped working as intended, so I rebuilt my installation (git pull && go build) and restarted my systemd unit.

After deleting and re-instating my login, I saw this:

Dec 12 09:23:35 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:23:35] [User/@ingwiephoenix:ingwie.io/WARN] Error while reconnecting: restore session connection timed out
Dec 12 09:24:19 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:19] [User/@ingwiephoenix:ingwie.io/INFO] Stream event: {Type:update IsOutdated:true Version:2.2049.8 Extra:[]}
Dec 12 09:24:19 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:19] [User/@ingwiephoenix:ingwie.io/INFO] Syncing puppet info from contacts
Dec 12 09:24:19 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:19] [User/@ingwiephoenix:ingwie.io/INFO] Chat list received
Dec 12 09:24:19 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:19] [User/@ingwiephoenix:ingwie.io/INFO] Reading chat list
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [User/@ingwiephoenix:ingwie.io/INFO] Read chat list, updating user-portal mapping
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [User/@ingwiephoenix:ingwie.io/INFO] Syncing portals
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [Portal/4917696603102@s.whatsapp.net-4917623219765@s.whatsapp.net/INFO] Syncing portal for @ingwiephoenix:ingwie.io
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [User/@ingwiephoenix:ingwie.io/WARN] Server responded with error creating personal filtering community: failed to POST /_matrix/client/
r0/create_group: M_UNKNOWN (HTTP 403): Only a server admin can create groups on this server
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [Portal/4917682165171@s.whatsapp.net-4917623219765@s.whatsapp.net/INFO] Syncing portal for @ingwiephoenix:ingwie.io
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [Portal/4915174201114@s.whatsapp.net-4917623219765@s.whatsapp.net/INFO] Syncing portal for @ingwiephoenix:ingwie.io
Dec 12 09:24:20 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:20] [User/@ingwiephoenix:ingwie.io/INFO] Finished syncing portals
Dec 12 09:24:38 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:38] [User/@ingwiephoenix:ingwie.io/INFO] Finished syncing puppet info from contacts
Dec 12 09:24:40 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:24:40] [User/@ingwiephoenix:ingwie.io/ERROR] Post-connection ping failed: connection timed out. Disconnecting and then reconnecting after a se
cond
Dec 12 09:25:01 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:01] [User/@ingwiephoenix:ingwie.io/ERROR] Error while trying to reconnect after disconnection: restore session connection timed out
Dec 12 09:25:05 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:05] [User/@ingwiephoenix:ingwie.io/INFO] Got init 400 error when trying to reconnect, resetting connection...
Dec 12 09:25:05 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:05] [User/@ingwiephoenix:ingwie.io/ERROR] Error while trying to reconnect after disconnection: init responded with 400
Dec 12 09:25:31 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:31] [User/@ingwiephoenix:ingwie.io/ERROR] Error while trying to reconnect after disconnection: restore session connection timed out
Dec 12 09:25:42 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:42] [User/@ingwiephoenix:ingwie.io/INFO] Got init 400 error when trying to reconnect, resetting connection...
Dec 12 09:25:42 ingwie-io mautrix-whatsapp[1620]: [Dec 12, 2020 09:25:42] [User/@ingwiephoenix:ingwie.io/ERROR] Error while trying to reconnect after disconnection: init responded with 400

My systemd unit:

[Unit]
Description=matrix-whatsapp
After=network.target matrix-synapse
Wants=network-online.target matrix-synapse

[Service]
Type=simple
ExecStart=/srv/matrix/whatsapp/mautrix-whatsapp
WorkingDirectory=/srv/matrix/whatsapp
User=root
Group=root
Environment='LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib'

[Install]
WantedBy=multi-user.target

The LD_LIBRARY_PATH is for libolm to load properly.

Got an idea what this could be?

IngwiePhoenix commented 3 years ago

I just noticed that I, unintentionally, posted my phone number. Oops? Could we have a logging feature to hide this? Would be helpful... ^^"

Nothing4You commented 3 years ago

it's mentioned on https://github.com/tulir/mautrix-whatsapp/wiki#discussion to strip phone numbers from log excerpts, but it would probably make sense to add that to a github issue template

tulir commented 3 years ago

Connection management has been improved so this probably doesn't apply directly anymore, although "connection timed out" means that the phone isn't reachable.