strophejs
strophejs copied to clipboard
TypeError: Cannot read properties of null (reading 'send')
So I have successfully implemented strophejs on my website - it connects to my openfire server, and chatting works fine. I am also using the ping plugin to ping the server every 45 seconds because my openfire is behind NGINX and NGINX drops connections after 60 seconds (even websocket ones). This all works fine now, however, when I leave the website for some time and eventually I get this error:
Cannot read properties of null (reading 'send')
TypeError: Cannot read properties of null (reading 'send')
at Websocket._onIdle (http://localhost:3000/static/js/bundle.js:173882:25)
at Connection._onIdle (http://localhost:3000/static/js/bundle.js:171869:19)
at Connection.flush (http://localhost:3000/static/js/bundle.js:170742:12)
at Websocket._send (http://localhost:3000/static/js/bundle.js:173984:18)
at Connection.send (http://localhost:3000/static/js/bundle.js:170727:19)
at Connection.sendIQ (http://localhost:3000/static/js/bundle.js:170864:12)
at F.ping (http://localhost:3000/static/js/bundle.js:174218:15)
at http://localhost:3000/static/js/bundle.js:10906:33