matrix-org / matrix-org/matrix-bifrost

XMPP: Start issue "Unexpected server repsonse"

Open
#357 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
187
Forks
38
PR merge metrics
No merged PRs in 30d

Description

When I start the Bifrost with my configuration to the XMPP server, it fails to connect to the XMPP server with the Error "Unexpected server response".
On the XMPP Server Side I see the following flow:

Received from Bifrost:
` `

XMPP Responding:
`one of the two namespaces must be present: jabber:client or jabber:server`

Received from Bifrost:
`5436b3c30ec9db5dc2b2a0e0d7393032f4a77853`

XMPP Responding:
`

could not process incoming stanza
5436b3c30ec9db5dc2b2a0e0d7393032f4a77853
`

---

The Bifrost start.sh output is this:
`> matrix-bifrost@1.0.2 build`
`> tsc`

`ERROR: ld.so: object './node_modules/node-purple/deps/libpurple/libpurple.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.`
`ERROR: ld.so: object './node_modules/node-purple/deps/libpurple/libpurple.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.`

`> matrix-bifrost@1.0.2 start`
`> node --enable-source-maps lib/Program.js -c config.yaml --port 3642`

`ERROR: ld.so: object './node_modules/node-purple/deps/libpurple/libpurple.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.`
`ERROR: ld.so: object './node_modules/node-purple/deps/libpurple/libpurple.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.`
`DEBUG 07:34:52:779 [LogWrapper] Reconfigured logging`
`INFO 07:34:52:783 [cli] Loading config file /etc/matrix-bifrost/config.yaml`
`WARN 07:34:52:973 [NeDBStore] Starting integrity check`
`WARN 07:34:52:974 [NeDBStore] Check WILL modify database`
`INFO 07:34:52:976 [NeDBStore] Found 1 room entries, 0 of which are invalid`
`INFO 07:34:52:981 [NeDBStore] Found 0 user entries, 0 of which have no type`
`INFO 07:34:52:985 [NeDBStore] Also found 0 invalid ghosts`
`INFO 07:34:52:985 [Program] Selecting xmpp-js as a backend`
`INFO 07:34:52:988 [RoomAliasSet] Loaded 1 regexes`
`INFO 07:34:53:000 [Program] Enabling metrics`
`INFO 07:34:53:006 [Program] Checking if homeserver is up`
`INFO 07:34:53:079 [Program] Started appservice listener on port 9555`
`INFO 07:34:53:263 [Program] Successfully pinged the bridge. Round trip took 173ms`
`INFO 07:34:53:267 [Program] Ensuring bot is registered`
`INFO 07:34:53:293 [Program] Bridge has started.`
`INFO 07:34:53:298 [XmppJsInstance] Starting new XMPP component instance to xmpp://[xmpp-server]:5222 using domain [xmpp-domain]`
`INFO 07:34:53:303 [XMPP-conn] status: connecting`
`INFO 07:34:53:307 [XMPP-conn] status: connect`
`INFO 07:34:53:308 [XMPP-conn] status: opening`
`INFO 07:34:53:441 [XMPP-conn] status: open`
`ERROR 07:34:53:448 [XMPP-conn] Error: Unexpected server response`
` at Component.authenticate (/etc/matrix-bifrost/node_modules/@xmpp/component-core/lib/Component.js:38:13)`
` at process.processTicksAndRejections (node:internal/process/task_queues:95:5)`
` at Component. (/etc/matrix-bifrost/src/xmppjs/XJSConnection.ts:21:17)`
`ERROR 07:34:53:451 [Program] Encountered an error starting the backend: Error: Unexpected server response`
` at Component.authenticate (/etc/matrix-bifrost/node_modules/@xmpp/component-core/lib/Component.js:38:13)`
` at process.processTicksAndRejections (node:internal/process/task_queues:95:5)`
` at Component. (/etc/matrix-bifrost/src/xmppjs/XJSConnection.ts:21:17)`

What's wrong here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/xmppjs/XJSConnection.ts and the @xmpp/component-core stack location shown in the report. Reproduce the connection using the provided XMPP flow and configuration, then trace the stream and authentication exchange to determine why the server rejects it. Done means the component starts successfully against the reported server without the unexpected-response error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.