-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
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
Latest device client does not connect over MQTT #3413
Comments
Can you share some details about what .NET framework you are using in this application? .NET 6+? And what OS are you running here? |
I'm using .NET 8 and Windows 11. |
We don't currently support running this SDK on .NET 8, but we'll try to look into this when we get the chance. In the meantime, targeting .NET 7 should fix this issue for you. |
Why do you think. NET 8 is the cause of this when the previous version works fine with. NET 8? |
The only meaningful change from the previous SDK version is the upgrade we made to DotNetty from 0.7.4 to 0.7.5. Given that you are seeing this problem (only?) when using MQTT, that suggests to me that there may be some new compatibility issue between DotNetty and .NET 8 in DotNetty 0.7.5 |
I think I'm hitting this as well, running in a .Net8 Jammy devcontainer. I'm actually attempting to use mosquitto as a test MQTT broker, so that I don't need developers to register devices to an actual Azure IoT Hub and interfere with each other (among other benefits). Under .Net8 it would just... hang when attempting to connect, whereas on .Net7 it will connect and start passing messages. |
I believe this issue is related to the lack of .NET8 support in dotnetty Azure/DotNetty#614 |
The reason is that the logic for the SSLStream read buffer has been changed in .NET 8. DotNetty needs to be updated accordingly. I have submitted a pull request (PR), but I am uncertain how long it will take to be merged. |
Similar issues with DPS (provisioning) after the last upgrade.
|
Still waiting for this to be fixed? Is this not a urgent and necessary to restore faith in latest Nuget packages? |
I think this is fixed in DotNetty now, add direct references to DoNetty in your code to use latest
|
Should be addressed in the new release: |
Upgrading from the release in 2023-05-01 with Microsoft.Azure.Devices.Client 1.42.0 to 2023-12-11 and Microsoft.Azure.Devices.Client 1.42.1 using MQTT, causes the device client to never connect and thus calls to SetReceiveMessageHandlerAsync fails. Downgrading again without any code changes whatsoever makes it work again as expected.
The text was updated successfully, but these errors were encountered: