MQTT publish fails

Iā€™m currently trying out mosquitto and wanted to test it using postman. Connecting works fine, subscribing works fine, but when I tried to publish, I got this error.

Unable to publish message: Cannot read properties of undefined (reading ā€˜toStringā€™)

Hi @joint-operations-te8, thanks for reaching out! Could you share a bit more information to help us try to find the issue?

  • What version of Postman are you using? Which OS are you on?
  • Are you running mosquitto locally or using an online test broker?
  • Can you provide an example of what kind of message youā€™re trying to publish?

Hi Jonathan,

Iā€™m currently using v11.1.14 of Postman on Windows 10.
Iā€™m hosting mosquitto on a ā€œcloudā€ server that we have.
I was just going to send a plain text and it was already failing. Then I tried something that looks like a JSON string, and it also failed.

Are you trying to send any properties along when you publish? Iā€™m having a bit of an issue trying to reproduce the issue on my end. Could you share a version of the request youā€™re trying to send?

Do you see the same issues when trying to publish to ā€œtest.mosquitto.org:1883ā€?

Hi, I was just sending some random text with and without a double quote. Iā€™m not sending any property as I donā€™t know how to do that. Also, I was triggering a publish using the mosquitto cli straight from the server, so I guess that made it ā€œeffortlessā€ for that step, but not the other way around. I also made mosquitto allow anonymous connections for easy testing. This is the tutorial I followed to do the initial setup of mosquitto. Installing Mosquitto broker on Debian | by Ross Anderson | Medium

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.