Logging in on mod_conversejs served page returns errors

43 views Asked by At

Installed version: ejabberd-23.10

Installed on OS: Ubuntu 20.04 via apt-get

Config changes:

listen:
  -
    port: 5443
    ip: "::"
    module: ejabberd_http
    tls: true
    request_handlers:
      /admin: ejabberd_web_admin
      /api: mod_http_api
      /captcha: ejabberd_captcha
      /upload: mod_http_upload
      /websocket: ejabberd_http_ws
      /conversejs: mod_conversejs
  -
    port: 5280
    ip: "::"
    module: ejabberd_http
    request_handlers:
      /admin: ejabberd_web_admin
      /bosh: mod_bosh
      /.well-known/acme-challenge: ejabberd_acme
      /websocket: ejabberd_http_ws
      /conversejs: mod_conversejs

modules:
  mod_bosh: {}
  mod_conversejs: 
    websocket_url: "ws://@HOST@:5280/websocket"

Chrome error

Firefox error

I have ejabberd installed on xinghaizhandui.com, messaging is fine with Windows and Android clients. Now I am trying to enable the conversejs web client, http://xinghaizhandui.com:5280/conversejs. The logging page shows up fine, but when I log in, the following errors show up, what does I have to do?

I am using this guide. https://docs.ejabberd.im/admin/configuration/modules/#mod-conversejs

Top:error in Chrome, Edge. Bottom: error in Firefox.

1

There are 1 answers

0
Badlop On

That configuration should work

Now I am trying to enable the conversejs web client, http://xinghaizhandui.com:5280/conversejs

In ejabberd.yml do you have something like this?

hosts:
  - xinghaizhandui.com

And the account you try to login to is inside that host (for example [email protected] ) ?

In ejabberd 23.10 that configuration should work both with Firefox and with Chrome (I have tested now with Firefox 115.6 and Chrome 120.0.6099.199)

Just for testing, you can remove some options in 5443, keep them in 5280 only, and let the mod_conversejs detect the options itself:

listen:
  -
    port: 5443
    ip: "::"
    module: ejabberd_http
    tls: true
    request_handlers:
      /admin: ejabberd_web_admin
      /api: mod_http_api
      /captcha: ejabberd_captcha
      /upload: mod_http_upload
  -
    port: 5280
    ip: "::"
    module: ejabberd_http
    request_handlers:
      /websocket: ejabberd_http_ws
      /conversejs: mod_conversejs

modules:
  # disabled mod_bosh, not needed # mod_bosh: {}
  mod_conversejs: {}

If login works correctly with that configuration, you can start playing to improve the encryption, for example

listen:
  -
    port: 5443
    ip: "::"
    module: ejabberd_http
    tls: true
    request_handlers:
      /admin: ejabberd_web_admin
      /api: mod_http_api
      /captcha: ejabberd_captcha
      /upload: mod_http_upload
      /websocket: ejabberd_http_ws
      /conversejs: mod_conversejs

modules:
  # disabled mod_bosh, not needed # mod_bosh: {}
  mod_conversejs: {}

With that configuration, the website would be https://xinghaizhandui.com:5443/conversejs