googlechat icon indicating copy to clipboard operation
googlechat copied to clipboard

google login-cookie does not work anymore after march 2026

Open sep76 opened this issue 8 months ago • 7 comments

I am running dock.mau.dev/mautrix/googlechat:latest i normaly use the chromium plugin for the google chat login-cookie and it have worked flawlessly.

but a few days ago, all google loging failed and trying to login again leads to

Google Chat bridge bot
Those cookies don't seem to be valid

have google changed something in their authentication recently ? is this a common experience ?


Container: container-0
Connected
[2026-03-05 20:46:45,454] [[email protected]] Initializing mautrix-googlechat 0.5.2+dev.a835bccd
[2026-03-05 20:46:45,458] [[email protected]] Initialization complete in 0.26 seconds
[2026-03-05 20:46:45,458] [[email protected]] Running startup actions...
[2026-03-05 20:46:45,459] [[email protected]] Starting database...
[2026-03-05 20:46:45,459] [[email protected]] Connecting to postgres://googlechat:password-redacted@postgresql/googlechat
[2026-03-05 20:46:45,869] [[email protected]] Database at v10, not upgrading
[2026-03-05 20:46:45,876] [[email protected]] Database at v3, not upgrading
[2026-03-05 20:46:45,876] [[email protected]] Starting appservice...
[2026-03-05 20:46:45,876] [[email protected]] Starting appservice web server on :::29320
[2026-03-05 20:46:45,878] [[email protected]] Ensuring connectivity to homeserver
[2026-03-05 20:46:45,879] [[email protected]] req #1: GET https://synapse.dst.fjit.no/_matrix/client/versions?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:46:45,918] [[email protected]] req #1 (/versions) completed in 38.5ms with status 200
[2026-03-05 20:46:45,923] [[email protected]] req #2: GET https://synapse.dst.fjit.no/_matrix/client/v3/account/whoami?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:46:45,933] [[email protected]] req #2 (/v3/account/whoami) completed in 9.3ms with status 200
[2026-03-05 20:46:45,937] [[email protected]] req #3: POST https://synapse.dst.fjit.no/_matrix/client/v1/appservice/googlechat/ping?user_id=@googlechatbot:synapse.dst.fjit.no {"transaction_id": "mautrix-python_1772743605936578494_1"}
[2026-03-05 20:46:45,974] [[email protected]] Request #3 failed with HTTP 502, retrying in 4 seconds
[2026-03-05 20:46:49,979] [[email protected]] req #3: POST https://synapse.dst.fjit.no/_matrix/client/v1/appservice/googlechat/ping?user_id=@googlechatbot:synapse.dst.fjit.no {"transaction_id": "mautrix-python_1772743605936578494_1"}
[2026-03-05 20:46:49,986] [[email protected]] Request #3 failed with HTTP 502, retrying in 8 seconds
[2026-03-05 20:46:57,995] [[email protected]] req #3: POST https://synapse.dst.fjit.no/_matrix/client/v1/appservice/googlechat/ping?user_id=@googlechatbot:synapse.dst.fjit.no {"transaction_id": "mautrix-python_1772743605936578494_1"}
[2026-03-05 20:46:58,002] [[email protected]] Request #3 failed with HTTP 502, retrying in 16 seconds
[2026-03-05 20:47:14,015] [[email protected]] req #3: POST https://synapse.dst.fjit.no/_matrix/client/v1/appservice/googlechat/ping?user_id=@googlechatbot:synapse.dst.fjit.no {"transaction_id": "mautrix-python_1772743605936578494_1"}
[2026-03-05 20:47:14,057] [[email protected]] Received ping from homeserver with transaction ID mautrix-python_1772743605936578494_1
[2026-03-05 20:47:14,060] [[email protected]] fd00:42:0:7::389 [05/Mar/2026:20:47:14 +0000] "POST /_matrix/app/v1/ping HTTP/1.1" 200 161 "-" "Synapse/1.146.0"
[2026-03-05 20:47:14,064] [[email protected]] req #3 (/v1/appservice/googlechat/ping) completed in 44.6ms with status 200
[2026-03-05 20:47:14,064] [[email protected]] Homeserver->bridge connection works, roundtrip time is 8 ms (txn ID: mautrix-python_1772743605936578494_1)
[2026-03-05 20:47:14,065] [[email protected]] req #4: GET https://synapse.dst.fjit.no/_matrix/media/v3/config?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:47:14,070] [[email protected]] req #4 (/_matrix/media/v3/config) completed in 4.9ms with status 200
[2026-03-05 20:47:14,072] [[email protected]] Initializing appservice bot
[2026-03-05 20:47:14,082] [[email protected].@ronny:synapse.dst.fjit.no] req #5: GET https://synapse.dst.fjit.no/_matrix/client/v3/account/whoami None
[2026-03-05 20:47:14,088] [[email protected]] req #6: POST https://synapse.dst.fjit.no/_matrix/client/v3/register?kind=user&user_id=@googlechatbot:synapse.dst.fjit.no {"username": "googlechatbot", "type": "m.login.application_service", "inhibit_login": true}
[2026-03-05 20:47:14,092] [[email protected].@ronny:synapse.dst.fjit.no] req #5 (/v3/account/whoami) completed in 9.5ms with status 200
[2026-03-05 20:47:14,092] [[email protected]] Initialized custom mxid: @ronny:synapse.dst.fjit.no
[2026-03-05 20:47:14,119] [[email protected]] req #6 (/v3/register) completed in 30.8ms with status 400
[2026-03-05 20:47:14,123] [[email protected]] req #7: GET https://synapse.dst.fjit.no/_matrix/client/v3/profile/%40googlechatbot%3Asynapse.dst.fjit.no/displayname?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:47:14,135] [[email protected]] req #7 (/v3/profile/%40googlechatbot%3Asynapse.dst.fjit.no/displayname) completed in 8.4ms with status 200
[2026-03-05 20:47:14,152] [[email protected]] req #8: GET https://synapse.dst.fjit.no/_matrix/client/v3/profile/%40googlechatbot%3Asynapse.dst.fjit.no/avatar_url?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:47:14,165] [[email protected]] req #8 (/v3/profile/%40googlechatbot%3Asynapse.dst.fjit.no/avatar_url) completed in 12.6ms with status 200
[2026-03-05 20:47:14,168] [[email protected]] Startup actions complete in 28.71 seconds, now running forever
[2026-03-05 20:48:56,678] [[email protected]] Handling transaction 143724 with 1 PDUs
[2026-03-05 20:48:56,681] [[email protected]] Finished handling transaction 143724
[2026-03-05 20:48:56,684] [[email protected]] fd00:42:0:7::389 [05/Mar/2026:20:48:56 +0000] "PUT /_matrix/app/v1/transactions/143724 HTTP/1.1" 200 161 "-" "Synapse/1.146.0"
[2026-03-05 20:48:56,686] [[email protected]] Received Matrix event $MrFo0zrUdLiQreLqoMoOM4CqfUqQWVQgvhT5_o8wrlw from @ronny:synapse.dst.fjit.no in !MxPtCHztqhUdGQwOKi:synapse.dst.fjit.no
[2026-03-05 20:48:56,707] [[email protected]] req #15: GET https://synapse.dst.fjit.no/_matrix/client/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/joined_members?user_id=@googlechatbot:synapse.dst.fjit.no None
[2026-03-05 20:48:56,741] [[email protected]] req #15 (/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/joined_members) completed in 31.4ms with status 200
[2026-03-05 20:48:56,781] [[email protected]] req #16: PUT https://synapse.dst.fjit.no/_matrix/client/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/redact/%24MrFo0zrUdLiQreLqoMoOM4CqfUqQWVQgvhT5_o8wrlw/mautrix-python_1772743736781326360_5?user_id=@googlechatbot:synapse.dst.fjit.no {}
[2026-03-05 20:48:57,588] [[email protected]] req #16 (/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/redact/%24MrFo0zrUdLiQreLqoMoOM4CqfUqQWVQgvhT5_o8wrlw/mautrix-python_1772743736781326360_5) completed in 806.0ms with status 200
[2026-03-05 20:48:57,589] [[email protected].@ronny:synapse.dst.fjit.no] Running post-login actions
[2026-03-05 20:48:57,600] [[email protected]] Handling transaction 143725 with 1 PDUs
[2026-03-05 20:48:57,601] [[email protected]] Finished handling transaction 143725
[2026-03-05 20:48:57,603] [[email protected]] fd00:42:0:7::389 [05/Mar/2026:20:48:57 +0000] "PUT /_matrix/app/v1/transactions/143725 HTTP/1.1" 200 161 "-" "Synapse/1.146.0"
[2026-03-05 20:48:58,563] [[email protected]] req #17: PUT https://synapse.dst.fjit.no/_matrix/client/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/send/m.room.message/mautrix-python_1772743738563131739_6?user_id=@googlechatbot:synapse.dst.fjit.no {"msgtype": "m.notice", "body": "Those cookies don't seem to be valid", "format": "org.matrix.custom.html", "formatted_body": "<p>Those cookies don't seem to be valid</p>\n"}
[2026-03-05 20:48:58,616] [[email protected]] req #17 (/v3/rooms/%21MxPtCHztqhUdGQwOKi%3Asynapse.dst.fjit.no/send/m.room.message/mautrix-python_1772743738563131739_6) completed in 52.8ms with status 200
[2026-03-05 20:48:58,625] [[email protected]] Handling transaction 143726 with 1 PDUs
[2026-03-05 20:48:58,626] [[email protected]] Finished handling transaction 143726
[2026-03-05 20:48:58,628] [[email protected]] fd00:42:0:7::389 [05/Mar/2026:20:48:58 +0000] "PUT /_matrix/app/v1/transactions/143726 HTTP/1.1" 200 161 "-" "Synapse/1.146.0"

sep76 avatar Mar 05 '26 20:03 sep76

Now I try logout and log in again and It works normally as always. I use firefox and copy-paste cookie values to text editor with prepared json structure and copy-paste all json to chatbot. Maybe plugin is broken?

hary777 avatar Mar 06 '26 13:03 hary777

@hary777 Thank you! : I did try that, but must have made some cut and paste error. so I gave up. how when i try it with the manual method it does work as expected. but the plugin give the the error i posted. i guess this bug is misplaced. and can be closed.

thank you again!

sep76 avatar Mar 20 '26 18:03 sep76

I am also receiving the issue as indicated at the start of this thread. I have tried many times collecting the cookie data manually, with a self made script of with the plugin and all attempts have been unsuccessful. There does appear to be an authentication issue.

Cerothen avatar Apr 29 '26 10:04 Cerothen

Just adding my experience. I had the same problem, but then taking the advice from @hary777, I logged into a fresh session of Mozilla Firefox, grabbed the cookie values from there, and it worked first time.

The docs aren't 100% clear on a few things, so for reference:

The chat command in your Matrix client is of the format below (white space doesn't matter in the JSON syntax).

login-cookie {
  "compass": "dynamite-ui=...",
  "ssid": "...",
  "sid": "...",
  "osid": "...",
  "hsid": "..."
}

There are duplicates of some cookie names(eg: compass). Use the ones where the path is "/".

After a couple of seconds you will get: "Successfully logged in as Your Name [email protected] (1234564598723978345)" Or "Those cookies don't seem to be valid" if the bridge can't login.

Unfortunately after this success, I still wasn't able to send messages to Google Chat users. Seems like the Google API might have changed.

sjcrookes avatar May 13 '26 20:05 sjcrookes

for what it is worth. my googlechat bot works as expected. only the plugin for the auth login-cookie is failing. doing it manually in a privacy tab, that i instantly close afterwards, works.

ronnyaa avatar May 18 '26 10:05 ronnyaa

@sjcrookes What do you mean send messages? Start new chat to Google chat user? Or sending messages to existing chat?

Start new chat to Google chat user does not work for me too. When I need start chat to new user I write message directly from Google chat. After reply bot create room that work as always.

hary777 avatar May 26 '26 06:05 hary777

@sjcrookes What do you mean send messages? Start new chat to Google chat user? Or sending messages to existing chat?

Start new chat to Google chat user does not work for me too. When I need start chat to new user I write message directly from Google chat. After reply bot create room that work as always.

Hey @hary777, false alarm in the end, it seemed to just be a relatively long delay before messaging worked after the bridge started. It's been working for me for the past couple of weeks. Loving it!

sjcrookes avatar May 26 '26 07:05 sjcrookes