FYI: "item-not-found" error when room not set on bosh config setting (lib-jitsi-meet)

This took me a day to figure out, so hopefully it benefits someone else in the future:

If you see the following error at the end of an attempt to connect to jitsi using lib-jitsi-meet, it’s possible you forgot to set the “room” parameter in the bosh config. The error:

<body type='terminate' condition='item-not-found' xmlns='http://jabber.org/protocol/httpbind'/>

I had been passing in a config that looked like this:

const JITSI_CONFIG = {
    hosts: {
      domain: 'meet.jit.si',
      muc: 'conference.meet.jit.si',
      focus: 'focus.meet.jit.si',
    },
    externalConnectUrl: 'https://meet.jit.si/http-pre-bind',
    enableP2P: true,
    p2p: {
      enabled: true,
      preferH264: true,
      disableH264: true,
      useStunTurn: true,
    },
    useStunTurn: true,
    bosh: 'https://meet.jit.si/http-bind',
    websocket: 'wss://meet.jit.si/xmpp-websocket',
    clientNode: 'http://jitsi.org/jitsimeet',
  }
  // ...
  connection = new JitsiMeetJS.JitsiConnection(null, null,
    JITSI_CONFIG
  )

The bosh setting above does not have a room parameter. The fix goes like this:

bosh: `https://meet.jit.si/http-bind?room=${ROOM}`

where ROOM is the conference name or room, i.e. the part that you’d see in the jitsi URL: https://meet.jit.si/ROOM

(Note also that in the bosh string above, I’ve switched from single-quote to backticks for ES6 template string).

The open source codebase that we’re building is called Relm, and it’s available on Github.