Closed anandmuthurajan closed 5 years ago
Logs with IOTPNP_TEST_BY_MAIN subscription.
Info: Successfully created device with connectionString=<****>, deviceHandle=<0x558cb86ccd70>
Info: DigitalTwin Interface : Changing interface state on interface sampleDeviceInfo from DT_INTERFACE_STATE_UNINITIALIZED to DT_INTERFACE_STATE_CREATED
Info: DEVICE_INFO: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE. interfaceId=
@anandmuthurajan For double-checking, can you try this with another new device? Also, what region is your Hub in? It needs to be located in one of the supported regions for PnP: North Europe, Central US and Japan East regions
Created in Hub Central US to resolve the issue.
@anandmuthurajan, @massand, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey
Compiled public-preview branch on x64 VM running Ubuntu 1804.
SDK Version Sync'ed to commit 8b7cc18
Bug Description
Invalid Json error when PnP properties are reported to the IoT Hub. Using unmodified digitaltwin_sample_device. Below is the console output:
Info: Successfully created device with connectionString=<**>, deviceHandle=<0x55826b285d70> Info: DigitalTwin Interface : Changing interface state on interface sampleDeviceInfo from DT_INTERFACE_STATE_UNINITIALIZED to DT_INTERFACE_STATE_CREATED Info: DEVICE_INFO: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE. interfaceId=, interfaceName=, handle=<0x55826b28d280>
Info: DigitalTwin Interface : Changing interface state on interface sensor from DT_INTERFACE_STATE_UNINITIALIZED to DT_INTERFACE_STATE_CREATED
Info: ENVIRONMENTAL_SENSOR_INTERFACE: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE. interfaceId=, interfaceInstanceName=, handle=<0x55826b28d300>
Info: DigitalTwin Interface : Changing interface state on interface urn_azureiot_ModelDiscovery_ModelDefinition from DT_INTERFACE_STATE_UNINITIALIZED to DT_INTERFACE_STATE_CREATED
Info: MODEL_DEFINITION_INTERFACE: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE. interfaceId=, InterfaceInstanceName=, handle=<0x55826b28d380>
Info: MODEL_DEFINITION_INTERFACE: Published dtdl for
Info: DigitalTwin Interface : Changing interface state on interface sampleDeviceInfo from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: DigitalTwin Interface : Changing interface state on interface sensor from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: DigitalTwin Interface : Changing interface state on interface urn_azureiot_ModelDiscovery_ModelDefinition from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: Successfully queued registration message
Info: DigitalTwin Client Core: Processing register DigitalTwin interfaces callback. confirmationResult=IOTHUB_CLIENT_CONFIRMATION_OK
Info: DigitalTwin Client Core: Interfaces successfully registered. Register for device method and twin callbacks if needed
Info: Sending reported state for sdkInfo={"$iotin:urn_azureiot_Client_SDKInformation": { "language":{ "value":"C"},"version":{ "value":"0.9.0"},"vendor":{ "value":"Microsoft"}}}
Info: DigitalTwin Interface : Changing interface state on interface sampleDeviceInfo from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: DEVICE_INFO: Interface successfully registered.
Info: DEVICE_INFO: Queued async report read only property for swVersion
Info: DEVICE_INFO: Queued async report read only property for manufacturer
Info: DEVICE_INFO: Queued async report read only property for model
Info: DEVICE_INFO: Queued async report read only property for osName
Info: DEVICE_INFO: Queued async report read only property for processorArchitecture
Info: DEVICE_INFO: Queued async report read only property for processorManufacturer
Info: DEVICE_INFO: Queued async report read only property for totalStorage
Info: DEVICE_INFO: Queued async report read only property for totalMemory
Info: DEVICE_INFO: Queing of all properties to be reported has succeeded
Info: DigitalTwin Interface : Changing interface state on interface sensor from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: ENVIRONMENTAL_SENSOR_INTERFACE: Interface successfully registered.
Info: ENVIRONMENTAL_SENSOR_INTERFACE: Queued async report read only property for state
Info: DigitalTwin Interface : Changing interface state on interface urn_azureiot_ModelDiscovery_ModelDefinition from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: MODEL_DEFINITION_INTERFACE: Interface successfully registered.
Info: Interface registration callback invoked, interfaces have been successfully registered
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c040161c0
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef5958
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c04016200
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef5968
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c04020270
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef5975
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c040213c0
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef597b
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c0401b170
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef5990
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c0401b200
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef59b0
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Device Twin callback called. updateState=DEVICE_TWIN_UPDATE_COMPLETE, payload=0x7f2c040166f0, size=86, userContextCallback=0x55826b28d1d0
Info: Interface name does not have a property update callback registered with it. Skipping twin update processing
Info: Interface name does not have a property update callback registered with it. Skipping twin update processing
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c04018c40
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client**/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef59c8
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c04021c30
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sampleDeviceInfo, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef59d8
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_device_info/digitaltwin_sample_device_info.c Func:DigitalTwinSampleDeviceInfo_PropertyCallback Line:46 DEVICE_INFO: Property callback property= fails, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin Client Core: Processing callback for reported state update. status=400, userContextCallback=0x7f2c04005de0
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:603 Reported property failed with a 400 status code
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/src/dt_client_core.c Func:ReportedDTStateUpdate_Callback Line:604 This typically but not always means the JSON the application sent was invalid.
Info: DigitalTwin Interface: Invoking reported property update for interface=sensor, reportedStatus=DIGITALTWIN_CLIENT_ERROR, userContextCallback=0x55826aef62e3
Error: Time:Thu Aug 22 15:19:28 2019 File:/home/anand/pnp/digitaltwin_client/samples/digitaltwin_sample_environmental_sensor/digitaltwin_sample_environmental_sensor.c Func:DigitalTwinSampleEnvironmentalSensor_PropertyCallback Line:311 ENVIRONMENTAL_SENSOR_INTERFACE: Updating property property= failed, error=
Info: DigitalTwin Interface: Invoking reported property update returned
Info: DigitalTwin interfaces successfully registered
Info: Beginning worker loop. Will wake up every 20 seconds to send a telemetry message. Hit Control-C to terminate
Info: DigitalTwin Client Core: Processing telemetry callback. confirmationResult=IOTHUB_CLIENT_CONFIRMATION_OK, userContextCallback=0x55826b28db00
Info: DigitalTwin Interface: Invoking telemetry confirmation callback for interface=sensor, reportedStatus=DIGITALTWIN_CLIENT_OK, userContextCallback=0x55826aef62d8
Info: DigitalTwin Interface: Invoking telemetry confirmation returned
Info: DigitalTwin Client Core: Processing telemetry callback. confirmationResult=IOTHUB_CLIENT_CONFIRMATION_OK, userContextCallback=0x55826b28dc00
Info: DigitalTwin Interface: Invoking telemetry confirmation callback for interface=sensor, reportedStatus=DIGITALTWIN_CLIENT_OK, userContextCallback=0x55826aef62dd
Info: DigitalTwin Interface: Invoking telemetry confirmation returned
^C