Cannot find config file. Please run `iotedgehubdev setup -c "<edge-device-connection-string>"` first. RRS feed

  • Question

  • I am trying develop Azure iot Edge module and debug this module

    As per link https://docs.microsoft.com/en-us/azure/iot-edge/how-to-vs-code-develop-module. 

    Last setup execute is from section "Set up IoT Edge simulator for IoT Edge solution"

    After that i am executing Azure IoT Edge: Start IoT Edge Hub Simulator for Single Modulegetting

    In OUTPUT window i get following message:


    Executing iotedgehubdev modulecred -l -o "c:\Users\bt00467445\AppData\Roaming\Code\User\workspaceStorage\5cb906c4e0d2b0e3134bbd115d16ba07\vsciot-vscode.azure-iot-edge\module.env" ERROR: Cannot find config file. Please run `iotedgehubdev setup -c "<edge-device-connection-string>"` first. Error: Command failed with exit code 1. Detail:

    As per document i already executed steps

    "iotedgehubdev setup -c "HostName=...."

    Got output Setup IoT Edge Simulator successfully.

    As in error message file 5cb906c4e0d2b0e3134bbd115d16ba07\vsciot-vscode.azure-iot-edge\module.env

    is empty.

    • Edited by BhanuThapa Wednesday, March 6, 2019 10:14 AM
    Wednesday, March 6, 2019 9:40 AM

All replies

  • Hi,

    Can you re-run the sample and check by deleting the existing workspace? I can run the example without any issues.

    Thursday, March 7, 2019 5:25 AM
  • I deleted the workspace from following folder


    But still getting the same error

    Any idea why I am getting "edge-device-connection-string" not set When running "Azure IoT Edge: Start IoT Edge Hub Simulator for Single Module " even though its already set.

    Thursday, March 7, 2019 11:01 AM
  • Issue resolved:

    Issue: If I execute the steps as per tutorial and start simulator from VS code the commands are executing in WSL. And if I run debugger is VC code I am getting MQTT connection error.

    Issue resolved if I execute same command in window command prompt (admin). I am able to run debugger on java code in VS code ID.

    command executed on cmd(admn)

    iotedgehubdev setup -c "HostName=xxxs.azure-devices.net;DeviceId=edgexxxdevice;SharedAccessKey=HUSHJxxxxap9GNAxxxfEBTcRzb4="

    iotedgehubdev start -i "input1"

    iotedgehubdev modulecred

    Azure tech team - Please investigate from your side if its bug or some config issue. As per Tech comments its working in his system.

    Tuesday, March 12, 2019 7:28 AM
  • Hi,

    Glad to hear that your issue is resolved. Appreciate for sharing the resolution, this would certainly benefit other community members. Sure, we will investigate this further and provide your feedback to the Product Team.

    Tuesday, March 12, 2019 10:31 AM