Azure / iotedgedev

The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
https://aka.ms/iotedgedev
Other
160 stars 71 forks source link

`iotedgedev solution deploy` fails with `$edgeHub` schema version `1.2` #555

Closed EliiseS closed 2 years ago

EliiseS commented 2 years ago

Description

iotedgedev solution deploy does not work out of the box with manifest generated by iotedgedev init.

Issue is fixed by changing $edgeHub schemaVersion from 1.2 to 1,1:

"$edgeHub": {
      "properties.desired": {
        "schemaVersion": "1.2", // <- change to 1.1
        "routes": {
          "sensorTofiltermodule": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/filtermodule/inputs/input1\")",
          "filtermoduleToIoTHub": "FROM /messages/modules/filtermodule/outputs/* INTO $upstream"
        },
        "storeAndForwardConfiguration": {
          "timeToLiveSecs": 7200
        }
      }

Requires further investigation as to if this is correct approach to solve this issue

Steps to Reproduce:

  1. iotedgedev init
  2. Set up VM with IoT Edge, create an ACR and populate the .env with the ACR connection string
  3. iotedgedev build --push
  4. iotedgedev solution deploy

Expected

Deployment succeeded in IoT Hub

image

Actual

Deployment failed with message: Unable to retrieve IoT Edge informationIoT Edge configuration uses an unsupported schema and cannot be displayed.

image

EliiseS commented 2 years ago

This is a known issue of the IoT Hub Azure Portal when using "schemaVersion": "1.2" and not an issue with this CLI. The Azure Portal will show an error and you'll need to use Azure CLI exclusively.

image

Please see this thread for more information: https://docs.microsoft.com/en-us/answers/questions/753353/publish-and-subscribe-with-azure-iot-edge-schema-v.html#answer-844718