Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
224 stars 73 forks source link

Unable to get Telemetry for device #573

Closed jamesyun7 closed 2 years ago

jamesyun7 commented 2 years ago

Describe the bug I have same issue on new release v0.15.1.0 as previous version to monitor device telemetry message.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Telemetry' of IoT Edge device in Azure IoT Explorer v0.15.1.0
  2. Click on 'Start'
  3. See error of "Failed to start monitoring device telemetry: Error: "Attempted to perform an unauthorized operation."

Expected behavior Device Explorer can successfully monitor my device telemetry.

image

Screenshots

image

Desktop (please complete the following information):

YingXue commented 2 years ago

Hi @jamesyun Please make sure you are using the iot hub connection string with enough permission to monitor device telemetry. It is not a custom error message but was directly surfaced from the service. Device Explorer use different tech/library underneath. If your connection string does have all the permissions, I will create a ticket towards the event hub library that we use.

zhen9910 commented 2 years ago

I got the same issue today. My iothub works fine with IoT Explorer two weeks before, but I find I cannot get device telemetry of this iothub using IoT Explorer now.

I first used Iot Explorer 0.14.13, then tried 0.15.1, but both didn't work.

YingXue commented 2 years ago

Syned with @zhen9910 offline, and we found that a newly created iot hub works fine. With some investigation, the error resulted from event hub sdk: MessagingError [UnauthorizedError]: InvalidSignature: The token has an invalid signature. However, we don't have a consistent repro as newly created hub does not have this issue, and thus we cannot provide enough proof if we try to file a bug against event hub team. It can also be an iot hub service issue between its underlying connection to event hub.

Either way, I will leave this bug open, and please update us if you run into this issue again, and we can have a better idea which service team should we contact.

lucas-suntao commented 2 years ago

I have met the same problem.Yesterday,it worked well ,but today it shows"Failed to start monitoring device telemetry: Error: "Attempted to perform an unauthorized operation."."Do you have method to solve the problem?

YingXue commented 2 years ago

Hi, we are in the middle of updating the event hub sdk. Whiling testing @zhen9910's connection string, we found that the newer version of the sdk did not throw the same error. The event hub team made a fundemental change after a certain version, and we are incorporating the changes. The change is relatively big, please give us a few more days and we will update the issue once the release is out. Thanks.

russom commented 2 years ago

Hi all - I also ran in the same issue a few days ago. Looking forward to an update

russom commented 2 years ago

Good day all - hoping to provide useful info on this, I can say that I still run into the issue when connecting to an IoT Hub in my reference location location (France Central). However, I do not have the issue when connecting to an IoT Hub in East US, so there seem to be a dependency on the location. Hopefully we will have a common closure of the issue soon. Thanks

YingXue commented 2 years ago

We made a new release with updated Event Hub SDK: https://github.com/Azure/azure-iot-explorer/releases/tag/v0.15.2 We only got direct access to one of the customer's connection string and verified that the new version fixed issue. As we don't have much data, we will leave the issue open for a while for folks to report update.

jamesyun7 commented 2 years ago

New release solves this issue. Thanks a lot @YingXue :)

image
ThomasNauwelaerts commented 2 years ago

Issue solved for me, North Europe location

aleciav commented 2 years ago

Issue solved for me as well. South Europe area

russom commented 2 years ago

Confirmed - issue solved. Thanks a lot!

image

wvangeem commented 2 years ago

Issue solved for me (West-Europe). Thanks!

YingXue commented 2 years ago

Thank you folks for the update! We will close the issue.

lucas-suntao commented 2 years ago

Thank you! Issue solved for me too.(china location)

afroewis commented 9 months ago

This still seems to be an issue for the location switzerlandnorth.

After failing to view telemetry of my IoT hub that is bound to a resource group in switzerlandnorth, I created a new hub and assigned to a resource group in useast and it worked.