question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Converse.js SASL Authentication - Unexpected Exeption (Cannot log in with OpenFire 4.1.1)

See original GitHub issue

Hey there everyone,

at the moment, i can’t connect my Converse.js client to my Openfire 4.1.1 server anymore. Everytime i try to login, Converse tries to connect to my server but disconnects after a few seconds. Here are the error logs from my Openfire server and the Debug logs from my web browser:

Error Log on Openfire:

2017.01.06 21:58:38 org.jivesoftware.openfire.net.SASLAuthentication - An unexpected exception occurred during SASL negotiation. Affected session: org.jivesoftware.openfire.http.HttpSession@48266f42 status: 1 address: agoshan.com/q0jo19cdn id: q0jo19cdn presence:
<presence type="unavailable"/>
java.lang.NullPointerException
at org.jivesoftware.openfire.sasl.ExternalClientSaslServer.evaluateResponse(ExternalClientSaslServer.java:60)
at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java:324)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:64)
at org.jivesoftware.openfire.http.HttpSession.sendPendingPackets(HttpSession.java:639)
at org.jivesoftware.openfire.http.HttpSession$HttpPacketSender.run(HttpSession.java:1271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) 

Debug Log on Browser Console:

Warning: The "initialized" event has been deprecated and will be removed, please use "connected". converse.nojquery.min.js:217:8116

Could not restore session. Error message: _restore: no restoreable session.  converse.nojquery.min.js:217:8116

Status changed to: CONNECTING  converse.nojquery.min.js:217:8116
_throttledRequestHandler called with 1 requests  converse.nojquery.min.js:217:8116

request id 1.0 posting  converse.nojquery.min.js:217:8116

request id 1.0 state changed to 1  converse.nojquery.min.js:217:8116

<body rid="899624935" to="agoshan.com" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.nojquery.min.js:217:8116

request id 1.1 state changed to 2  converse.nojquery.min.js:217:8116

request id 1.1 state changed to 3  converse.nojquery.min.js:217:8116

request id 1.1 state changed to 4  converse.nojquery.min.js:217:8116

removing request  converse.nojquery.min.js:217:8116

_throttledRequestHandler called with 0 requests  converse.nojquery.min.js:217:8116

request id 1 should now be removed  converse.nojquery.min.js:217:8116

request id 1.1 got 200  converse.nojquery.min.js:217:8116

_connect_cb was called  converse.nojquery.min.js:217:8116

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="agoshan.com" authid="q0jo19cdn" sid="q0jo19cdn" secure="true" requests="2" inactivity="30" polling="5" wait="60" hold="1" ack="899624935" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>EXTERNAL</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.nojquery.min.js:217:8116

_throttledRequestHandler called with 0 requests  converse.nojquery.min.js:217:8116

_throttledRequestHandler called with 1 requests  converse.nojquery.min.js:217:8116

request id 2.0 posting  converse.nojquery.min.js:217:8116

request id 2.0 state changed to 1  converse.nojquery.min.js:217:8116

<body rid="899624936" sid="q0jo19cdn"><auth mechanism="EXTERNAL">YXNldGgxODEwMTJAYWdvc2hhbi5jb20=</auth></body>  converse.nojquery.min.js:217:8116

request id 2.1 state changed to 2  converse.nojquery.min.js:217:8116

request id 2.1 state changed to 3  converse.nojquery.min.js:217:8116

request id 2.1 state changed to 4  converse.nojquery.min.js:217:8116

removing request  converse.nojquery.min.js:217:8116
_throttledRequestHandler called with 0 requests  converse.nojquery.min.js:217:8116

request id 2 should now be removed  converse.nojquery.min.js:217:8116

request id 2.1 got 200  converse.nojquery.min.js:217:8116

_dataRecv called  converse.nojquery.min.js:217:8116

<body xmlns="http://jabber.org/protocol/httpbind" ack="899624936"><failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure></body>  converse.nojquery.min.js:217:8116

Status changed to: AUTHFAIL  converse.nojquery.min.js:217:8116

Status changed to: DISCONNECTING  converse.nojquery.min.js:217:8116

Disconnect was called because: Authentication Failed  converse.nojquery.min.js:217:8116

_sendTerminate was called  converse.nojquery.min.js:217:8116

_throttledRequestHandler called with 1 requests  converse.nojquery.min.js:217:8116

request id 3.0 posting  converse.nojquery.min.js:217:8116

request id 3.0 state changed to 1  converse.nojquery.min.js:217:8116

<body rid="899624937" sid="q0jo19cdn" type="terminate"/>  converse.nojquery.min.js:217:8116

request id 3.1 state changed to 2  converse.nojquery.min.js:217:8116

request id 3.1 state changed to 3  converse.nojquery.min.js:217:8116

request id 3.1 state changed to 4  converse.nojquery.min.js:217:8116

removing request  converse.nojquery.min.js:217:8116

_throttledRequestHandler called with 0 requests  converse.nojquery.min.js:217:8116

request id 3 should now be removed  converse.nojquery.min.js:217:8116

request id 3.1 got 200  converse.nojquery.min.js:217:8116

_dataRecv called  converse.nojquery.min.js:217:8116

<body xmlns="http://jabber.org/protocol/httpbind" type="terminate" ack="899624937"/>  converse.nojquery.min.js:217:8116

_doDisconnect was called  converse.nojquery.min.js:217:8116

Status changed to: DISCONNECTED  converse.nojquery.min.js:217:8116

DISCONNECTED  converse.nojquery.min.js:217:8116

I’m quite sure that i’ve entered my credentials correctly. This problem occurs since i’ve upgraded my Openfire server from 4.0.4 to 4.1.1.

Could someone check this out ASAP?

Thanks,

Lucas

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jcbrandcommented, Jan 13, 2017

Thanks for sharing @proton5000

0reactions
proton5000commented, Jan 13, 2017

guys I have earned I did the following: in the admin panel openfire

  1. screen_1
  2. screen_2
  3. screen_3
  4. screen_4

and in converse

converse.initialize({
            bosh_service_url: 'https://ec2-54-213-237-72.us-west-2.compute.amazonaws.com:7443/http-bind/',
            debug: true,
            keepalive: true,
            message_carbons: true,
            play_sounds: true,
            roster_groups: true,
            show_controlbox_by_default: true,
            connection_options: {
                'mechanisms': [
                    converse.env.Strophe.SASLMD5,
                    converse.env.Strophe.SASLPlain
                ]
            },
        });
    });

it helped me, and I hope this will help you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Openfire 4.1.1 + converse.js 2.0.4 not work - General Discussion
Perhaps: When attempting anonymous login with Openfire, SASL EXTERNAL is used instead of SASL ANONYMOUS · Issue #743 · jcbrand/co…
Read more >
Openfire Changelog - Ignite Realtime Downloads
With this release, the Openfire property xmpp.pubsub.create.anyone was updated to properly reflect its name. Setting it to true now means that anyone can ......
Read more >
Openfire Changelog - Ignite Realtime Downloads
getSharedGroups returning old values; [OF-1435] - UserManager::isRegisteredUser(JID) can block for a minute; [OF-1453] - An unexpected exception occurred ...
Read more >
SASL Authentication Problem S2S - Openfire
Hi, I am trying to implement an openfire on 2 distant server in order to use S2S connection. I am using 4.6.7 on...
Read more >
Unable to connect converse.js to openfire 4.4.0 with http-bind
getting javascript error while trying to connect with openfire with converse.js. ... my converse.initialize method is below. ... allow_logout: false ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found