xmpp.js: Cannot connect to Openfire (TLS 1.3)

Describe the bug Same issue as #592 when using starttls

Client Code

        this._client = client({
            service: 'xmpp://example.com:5222',
            resource: "some-resource",
            username: 'ANONYMOUS',
        });

Logs

status connecting xmpp://example.com:5222
status connect 
status opening 
status open <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="example.com" id="1khlg8il52" xml:lang="en" version="1.0"/>
IN
<stream:features xmlns="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><ver xmlns="urn:xmpp:features:rosterver"/><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://www.igniterealtime.org/projects/openfire/" ver="JiSz8RBGEqqFfx+GUdpJNXragQo="/></stream:features>
OUT
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
IN
<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
status opening 

TimeoutError
    at Timeout.<anonymous> (/node_modules/@xmpp/events/lib/promise.js:33:16)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
TimeoutError
    at Timeout.<anonymous> (/node_modules/@xmpp/events/lib/promise.js:33:16)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
(node:85777) UnhandledPromiseRejectionWarning: TimeoutError
    at Timeout.<anonymous> (/node_modules/@xmpp/events/lib/promise.js:33:16)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

Environment node v12.18.3 @xmpp/client v0.12.0 Server: Openfire 4.6.2, build b61bce3, configured with a valid TLS certificate for the domain I’m using. OS: macOS Catalina 10.15.7

As an additional note: when I connect Adium to that Openfire server, it also takes quite some time (~ 10-30sec) to establish the connection. I suppose this has to do with TLS checking / negotiation / whatever. Maybe the expected timeout just has to be raised?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 17 (17 by maintainers)

Most upvoted comments