Web application tutorial has a new bug

Alex Fang 230 Reputation points
2023-07-26T15:10:21.75+00:00

I have been following this tutorial for visualizing real-time sensor data from my IoT Hub in a web application. It was working fine around 1-2 weeks ago for me and the behavior was as described in the tutorial. However, when I run it now, it still runs, but it seems that the same data is sent iteratively more times. In the picture, the first message was sent the first iteration, the 2nd and 3rd messages were sent on the second round, and the last 3 messages were sent in the third round. This has caused there to be repeated devices on the web application. I'm not sure what caused this as there have been no changes to the Azure IoT Hub. If anything, I think it might be the network I am using?

Does anyone have any insights?

User's image

User's image

Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
0 comments No comments
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 13,471 Reputation points
    2023-07-26T15:30:51.54+00:00

    Hi @Alex Fang I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

    Issue:

    Device ID sending the telemetry to IoT Hub is populated in the Web App iteratively and the message events send from the device were duplicated.

    Solution:

    Modifications made to the code has resulted in this behavior. Downloaded the source code from the GitHub repository has resolved the issue.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Alex Fang 230 Reputation points
    2023-07-26T15:18:42.8466667+00:00

    I apparently changed something in the original source code that messed things up. I redownloaded the original repo and now it's working properly.

    1 person found this answer helpful.
    0 comments No comments