MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.41k forks source link

Error while following "Quickstart: Find available rooms by using Azure Digital Twins" #24895

Closed sw-dev-code closed 5 years ago

sw-dev-code commented 5 years ago

Hi, when I follow all instructions from "Quickstart: Find available rooms by using Azure Digital Twins", following error ocurres:

trce: DigitalTwinsQuickstart[0] Request: GET https://milandigialtwins.westeurope.azuresmartspaces.net/management/api/v1.0/devices?hardwareIds=1234567890AB&spaceIds=db3aad02-d123-4f7a-8b04-39bc18d45140 trce: DigitalTwinsQuickstart[0] Response Status: 200, OK , [] info: DigitalTwinsQuickstart[0] Existing Device ID: info: DigitalTwinsQuickstart[0] Creating Device: { "HardwareId": "1234567890AB", "Name": "Raspberry Pi 3 A1", "SpaceId": "db3aad02-d123-4f7a-8b04-39bc18d45140" } trce: DigitalTwinsQuickstart[0] Request: POST https://milandigialtwins.westeurope.azuresmartspaces.net/management/api/v1.0/devices trce: DigitalTwinsQuickstart[0] Response Status: 400, BadRequest , {"error":{"code":"400.600.000.000","message":"Cannot create device because its parent IoT hub is not in the running state."}} info: DigitalTwinsQuickstart[0] Device ID is: 00000000-0000-0000-0000-000000000000 Exception: System.ArgumentException: GetDevice requires a non empty guid as id at Microsoft.Azure.DigitalTwins.Samples.Api.GetDevice(HttpClient httpClient, ILogger logger, Guid id, String includes) in C:\Users\PC\Desktop\Files\test\AzureDigitalTwin\digital-twins-samples-csharp-master\occupancy-quickstart\src\api\get.cs:line 103

Can someone give meet a hint what may be wrong?

Thank you in advance.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Alberto-Vega commented 5 years ago

@Milan991 Thanks for the feedback! We are currently investigating and will update you shortly.

asergaz commented 5 years ago

Hello @Milan991 can you confirm that the error shows when you complete the first step of Provision graph ? This is after running dotnet run ProvisionSample ? It looks like a device with the same ID already exists, did you try to clean up resources and do it again?

I am assigning the issue to the content author @alinamacelaru . Alina would you need us to reproduce the issue or file a new issue here as I believe this can be related with the yaml file? We are not specifying if the device can't exist whenever we run the quickstart, though I want to double check that with you first.

Thank you!

sw-dev-code commented 5 years ago

@sergaz-msft After I've deleted previously created IoTHub and Device Twin I was able to pass previous error, now everything work fine. I'm hopping that in the following releases of Device Twin we would be able to select our own already created IoTHub.

I'm closing issue for now with remark for IoTHub configuration feature in future.