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
Calling Direct Method issue with the auto-generated code on VSCode #480
Comments
For details of the initial conversation please refer to Azure/azure-iot-sdk-csharp#980 |
@SONENU Sorry for the delayed response. I tried the sample code updated by you, but haven't met the timeout issue yet. Could you share steps about how you ran into the timeout issue? Here's the steps performed by me:
By the way, I noticed you modified the main function to |
@SONENU As mentioned above, if you would like to declare the main function as async, it's recommended to use the await to avoid possible deadlocks. We haven't heard you for a while about whether this recommendation resolves your question. I'm going to close this issue for now and feel free to open new issues if you have additional questions. |
This issue was filed incorrectly under https://github.com/Azure/azure-iot-sdk-csharp
Moving it to the correct repository on behalf of @SONENU
Original issue: Azure/azure-iot-sdk-csharp#980
Description of the issue:
[Calling Direct Method Issue]
After several days of investigation and effort. I've found that when I am implementing IoT Edge Module by command-line in VSCode, calling Direct Method failed with an auto-generated code as below on VSCode. I had to change the code the other way to make it run properly. What they are different and what's MS's opinion.
The environment we use currently and see some similar issues below.
IoT Edge version 1.0.7.1: https://github.com/Azure/azure-iotedge/releases
• Fixes ObjectDisposedException (that we've seen also in our logs so it might be good to update the deployments to this version already)
IoT SDK C# version 1.20.2: https://github.com/Azure/azure-iot-sdk-csharp/releases
• It's probably better to have the SDK updated to the latest release and start fixing the version instead of using 1.* which automatically uses the latest version at build time, which means we are not in control of the version we will get during the build.
Github reported issues similar to what we're seeing:
• Issue #551: Azure/azure-iot-sdk-csharp#571
• Issue #646: Azure/iotedge#646
Code sample exhibiting the issue:
class Program
{
static async Task Main(string[] args)
{
Console log of the issue:
[DirectMethod] Failed to invoke Direct Method: Error: {"Message":"{"errorCode":504101,"trackingId":"8fb95f15eb734f5d92c292dc5fc29e17-G:19-TimeStamp:06/18/2019 10:07:22-G:11-TimeStamp:06/18/2019 10:07:22","message":"Timed out waiting for the response from device.","info":{},"timestampUtc":"2019-06-18T10:07:22.3918499Z"}","ExceptionMessage":""}
The text was updated successfully, but these errors were encountered: