SyntaxError: Unexpected end of JSON input

Hello jiti community i am currently running into an issue with a aws hosted jisi server. after some one connects to the server it is only a matter of time before this json parse error show up. it is usually triggered by a person leaving, but not always. this error does not show up when doing the same thing with the beta meet server. the error in question is below.

2021-04-15T15:41:03.479Z [modules/xmpp/xmpp.js] <P.tryParseJSONAndVerify>: SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at P.tryParseJSONAndVerify (xmpp.js:804)
at P._onPrivateMessage (xmpp.js:849)
at I.Handler.run (strophe.umd.js:1875)
at strophe.umd.js:3157
at Object.forEachChild (strophe.umd.js:830)
at I.Connection._dataRecv (strophe.umd.js:3146)
at O.Bosh._onRequestStateChange (strophe.umd.js:5012)

this is a problem because this parse error causes issues with how events are handled. their has been a form post about this previously, but no resolution was arrived at. the other post in question: Xmpp.js "SyntaxError: Unexpected end of JSON input"

I am currently using the most recent version of jitsi linked at https://meet.jit.si/libs/lib-jitsi-meet.min.js.

If you are able to reproduce it, open the developer console before joining the conference so you see the messages exchanged over the websockets in the network tab, and if you can get the content of the problem message, that will help to find the problem and fixing it.

there are multiple different contexts of this appearing, but here is one of them.

under the preview tab

<body
 
xmlns:stream
="
http://etherx.jabber.org/streams
"
 
xmlns
="
http://jabber.org/protocol/httpbind
"
 
sid
="
787c67ce-05f8-4dc0-9d8c-857c077ab658
"
>
<iq
 
xmlns
="
jabber:client
"
 
type
="
result
"
 
to
="
1119778d-7abb-492f-992e-9aeb507c5cec@meet.justineslinger.com/e46f0cb1-1130-4446-8488-5077fa6d3ff7
"
 
from
="
meet.justineslinger.com
"
 
id
="
93d1ec63-7f32-402f-9669-486252ffb2d8:sendIQ
"
/
>
</body>

under response
<body sid='787c67ce-05f8-4dc0-9d8c-857c077ab658' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'><iq type='result' to='1119778d-7abb-492f-992e-9aeb507c5cec@meet.justineslinger.com/e46f0cb1-1130-4446-8488-5077fa6d3ff7' from='meet.justineslinger.com' id='93d1ec63-7f32-402f-9669-486252ffb2d8:sendIQ' xmlns='jabber:client'/></body>

No its not that.

at P._onPrivateMessage (xmpp.js:849)

It should be <message.

Maybe when you see the error you can execute in the console APP.conference.saveLogs() and send me the file to damencho at jitsi dot org. Thank you.

Apologies, I pasted the wrong thing, this is what you are looking for correct?

Do you have the complete log? I’m interested in the messages since the presence unavailable coming for the participant leaving.

Thanks for the logs, they are vary helpful.

hey damencho i would be happy to give you full logs.i just sent a har file to you :slight_smile:

Send it to damencho at jitsi dot org, thanks.

Do you see any errors in prosody logs? Something about speakerstats?

I think you have enabled just the module without the component.

You have this:

And you are missing this: jitsi-meet/prosody.cfg.lua-jvb.example at c765e08aa1e41132c5d802f893ea5fe57d610a58 · jitsi/jitsi-meet · GitHub