MQTT pathname is stripped from URL

Describe the bug
We have an MQTT broker reachable via Websocket at e.g. wss:// If I use this URL the pathname /broker/ws is stripped/ignored and Paho tries to connect to

To Reproduce
Steps to reproduce the behavior:

  1. Go to ‘Realtime/MQTT’
  2. Type wss:// as URL
  3. Check error message in console which shows the stripped URL without its pathname

Expected behavior
The pathname should not be stripped.


  • Browser: Firefox
  • Version 94

Additional context
The issue is due to this line:

Maybe a fix could look like this?
parseUrl.hostname + parseUrl.pathname !== "/" ? parseUrl.pathname : ""

Thank you!

Read more here: Source link