TypeError: Cannot read property 'id' of null from FreePBX XMPP module

I have enabled XMPP module in my FreePBX Distro fresh installation. I have created two extensions 1001 and 1002 respectively and enabled UCP login and chat enabled features. Now I logged in two XMPP account from different browsers. And I tried to send messages. But the messages are not delivered to other end. There is the presence state error as well. Sometimes user 1001 can that 1002 is online and sometimes not. Though 1002 user is always online. Same case for 1002 user as well.

Here is the error messages at /var/log/asterisk/xmpp_err.log
2020-10-01 04:43 +00:00: (node:13489) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or $
2020-10-01 04:43 +00:00: (node:13489) DeprecationWarning: Mongoose: mpromise (mongoose’s default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs$
2020-10-01 04:44 +00:00: TypeError: Cannot read property ‘id’ of null
at /var/www/html/admin/modules/xmpp/node/node_modules/lets-chat/app/controllers/usermessages.js:30:23
at arrayEach (/var/www/html/admin/modules/xmpp/node/node_modules/lodash/lodash.js:516:11)
at Function.forEach (/var/www/html/admin/modules/xmpp/node/node_modules/lodash/lodash.js:9368:14)
at Core. (/var/www/html/admin/modules/xmpp/node/node_modules/lets-chat/app/controllers/usermessages.js:24:11)
at emitMany (events.js:152:20)
at Core.emit (events.js:224:7)
at UserMessageManager. (/var/www/html/admin/modules/xmpp/node/node_modules/lets-chat/app/core/usermessages.js:25:19)
at model.Query. (/var/www/html/admin/modules/xmpp/node/node_modules/mongoose/lib/model.js:4093:16)
at /var/www/html/admin/modules/xmpp/node/node_modules/kareem/index.js:273:21
at /var/www/html/admin/modules/xmpp/node/node_modules/kareem/index.js:131:16
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Here is the output of /var/log/asterisk/xmpp_out.log
2020-10-01 04:44 +00:00: User: 1002Authenticated against freepbx!
2020-10-01 04:44 +00:00: User: 1001Authenticated against freepbx!
2020-10-01 04:44 +00:00:


2020-10-01 04:44 +00:00:

UC Chat$

<presence type="unavailable" xmlns:stream="http://etherx.jabber.org/streams" from="[email protected]/76ce367e915e1d6bb7b376ed81f0e794"><priority>1</priority></presence>
2020-10-01 04:44 +00:00:
<iq from="[email protected]/506076f23211eae1a9ff940691512a37" type="get" id="roster" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="jabber:iq:roster"/></iq>
<iq id="roster" to="[email protected]/506076f23211eae1a9ff940691512a37" type="result"><query xmlns="jabber:iq:roster"><item jid="[email protected]" name="1002" subscription="both"><group>UC Chat$

<presence type="unavailable" xmlns:stream="http://etherx.jabber.org/streams" from="[email protected]/506076f23211eae1a9ff940691512a37"><priority>1</priority></presence>
2020-10-01 04:44 +00:00: <presence from="[email protected]"><x xmlns="vcard-temp:x:update"> 
<presence from="[email protected]"><x xmlns="vcard-temp:x:update"> 


Please help. I want to use XMPP chats for our FreePBX extensions.

The server is fully updated.

I am experiencing a similar issue with XMPP/LetChat.

The symptom is that the users can log into a XMPP client without issue. They see other online users, etc But when they try to send any message, their session immediately crashes and the error is recorded.

I have tried uninstalling the XMPP app, reinstalling, and restarting the server. I used the Freepbx GUI to perform this. The problem persists.

I SUSPECT a connection problem to mongodb.

Any thoughts?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.