eclipse-paho / eclipse-paho/paho.mqtt.java

validateQos() Crash

Open
#394 16 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

Please fill out the form below before submitting, thank you!

- [x ] Bug exists Release Version 1.1.1 ( Master Branch)
- [ ] Bug exists in Snapshot Version 1.1.2-SNAPSHOT (Develop Branch)

This is the stacktrace:
```java
Fatal Exception: java.lang.IllegalArgumentException
at org.eclipse.paho.client.mqttv3.MqttMessage.validateQos(MqttMessage.java:41)
at org.eclipse.paho.client.mqttv3.MqttMessage.setQos(MqttMessage.java:181)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish.(MqttPublish.java)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage.createWireMessage(MqttWireMessage.java:193)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage.createWireMessage(MqttWireMessage.java:167)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:119)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:116)
at java.lang.Thread.run(Thread.java:841)
```

I understand that `validateQos()` is receiving an invalid QOS, but is the client trying to publish that invalid QOS message or is it received on the client in a malformed way from the broker?

As per my understanding of this stack trace, the client received a msg which it failed to convert into a valid MqttMessage due to an invalid QOS. Is that right?
It's a confusing stacktrace :(

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.