We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT TLS connection ends up with error below. The earlier nuget version 4.2.1.781 works. Tested on .Net 6 and 7
MQTTnet.Adapter.MqttConnectingFailedException: 'Error while authenticating. Expected at least 770 bytes but there are only 3 bytes'
Steps to reproduce the behavior:
static async Task Main(string[] args) { string _topic = "/monitor"; Console.WriteLine("Starting Part 1"); string clientID = Guid.NewGuid().ToString(); var options = new MqttClientOptionsBuilder() .WithClientId(clientID) .WithTcpServer((opt) => { opt.Server = "broker.emqx.io"; opt.Port = 8883; opt.TlsOptions = new MqttClientTlsOptions { UseTls = true, SslProtocol = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13 }; }) .WithCleanSession() .Build(); using var mqttClient = new MqttFactory().CreateMqttClient(); var connResult = await mqttClient.ConnectAsync(options, CancellationToken.None); Console.WriteLine($"Connection Result: {connResult.ResultCode}"); if (connResult.ResultCode == MqttClientConnectResultCode.Success) { var result = await mqttClient.PublishAsync(new MqttApplicationMessage { Topic = _topic + "/data", Payload = Encoding.UTF8.GetBytes("123") }); } else { Console.WriteLine(connResult.ReasonString); } Console.ReadKey(); }
There should be no error. Previous version of the nuget works.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here. Include debugging or logging information here:
\\ Put your logging output here.
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Ideally a Unit Test (which shows the error) is provided so that the behavior can be reproduced easily.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
MQTT TLS connection ends up with error below. The earlier nuget version 4.2.1.781 works.
Tested on .Net 6 and 7
MQTTnet.Adapter.MqttConnectingFailedException: 'Error while authenticating. Expected at least 770 bytes but there are only 3 bytes'
Which component is your bug related to?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be no error. Previous version of the nuget works.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context / logging
Add any other context about the problem here.
Include debugging or logging information here:
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Ideally a Unit Test (which shows the error) is provided so that the behavior can be reproduced easily.
The text was updated successfully, but these errors were encountered: