matrix-org / matrix-appservice-slack

A Matrix <--> Slack bridge
Apache License 2.0
276 stars 72 forks source link

Error when using Pantalaimon for encryption #716

Open Yureien opened 1 year ago

Yureien commented 1 year ago

Getting the following error when Pantalaimon is enabled:

koss-slack-matrix-bridge | [winston] Attempt to write logs with no transports, which can increase memory usage: {"module":"MatrixHttpClient","data":["(REQ-5) PUT http://pantalaimon:8008/_matrix/client/v3/rooms/REDACTED/org/send/org.matrix.bridge.ping/1667923138989__inc1"],"level":"debug"}
koss-slack-matrix-bridge | [winston] Attempt to write logs with no transports, which can increase memory usage: {"module":"MatrixHttpClient","data":["(REQ-5) {\n  errcode: 'M_UNKNOWN',\n  error: 'The pantalaimon client did not manage to sync with the server'\n}"],"level":"error"

Pantalaimon logs:

[2022-11-08 15:58:58.990500] ERROR: pantalaimon: The internal Pantalaimon client did not manage to sync with the server.

Since I need to add a pantalaimon client first, I set up a password (abcd) and then used the following to authenticate via Pantalaimon:

curl -XPOST -d '{"type":"m.login.password", "user":"slack", "password":"abcd"}' "http://localhost:8008/_matrix/client/r0/login"

If I don't do the above curl step, I get another error:

[2022-11-08 17:04:39.460911] WARNING: pantalaimon: User @slack:home.server doesn't have a matching pan client.

It works without using encryption, but I can't send any messages since my messages are unencrypted.

jaller94 commented 1 year ago

I don't think you can simply put a pantalaimon between an AppService and a Matrix server.

As a bridge, the Slack bridge uses the AppService API which does not create devices and does not call /sync. Instead it chooses which account to use and receives events through a webhook.

Yureien commented 1 year ago

Hm, then how is Pantalaimon supposed to be used according to the documentation? @jaller94

Half-Shot commented 1 year ago

Sorry, I think we gave incorrect information: Pan can be used with the Slack bridge and we do have official support for it (albeit, it's a bit experimental).

The internal Pantalaimon client did not manage to sync with the server.

Seems like the pertinent error, do you get any more information from increasing logging on pan?