Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Edge module deployment issue - JSON error #611

Closed
ghost opened this issue May 23, 2018 · 13 comments
Closed

Edge module deployment issue - JSON error #611

ghost opened this issue May 23, 2018 · 13 comments
Labels

Comments

@ghost
Copy link

ghost commented May 23, 2018

OK so this issue only started happening this morning. Yesterday I had a fully operational edge runtime with 2 modules working perfectly. This morning one of the modules was not running and when I went into to edgeAgent logs I saw config errors - and I made no config changes over night.

So after trying to resolve unsuccessfully, cleared down the edge device (both locally and from Azure) and started from scratch.

Problem? Can't deploy ANY module other than edgeAgent or edgeHub. Even trying to deploy the example tempSensor module results in edge runtime reporting:

400 - The deployment configuration is malformed or invalid

and when you look at the logs of the edgeAgent, as soon as you try and submit a module deployment you see this. So has there been a bug introduced overnight into edge runtime????

2018-05-23 10:29:38.741 +00:00 [ERR] - Error refreshing edge agent configuration from twin.
Microsoft.Azure.Devices.Edge.Agent.Core.ConfigSources.ConfigEmptyException: This device has an empty configuration for the edge agent. Please set a deployment manifest.
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.UpdateDeploymentConfig() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 171
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.<RefreshTwinAsync>d__20.MoveNext() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 124
2018-05-23 10:29:41.128 +00:00 [INF] - Updated reported properties
2018-05-23 10:31:48.726 +00:00 [ERR] - Error updating deployment config from edge agent desired properties.
Newtonsoft.Json.JsonSerializationException: Value cannot be null.
Parameter name: version
   at Microsoft.Azure.Devices.Edge.Agent.Core.Serde.TypeSpecificSerDe`1.Deserialize[TU](String json) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/serde/TypeSpecificSerDe.cs:line 56
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.UpdateDeploymentConfig() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 165
2018-05-23 10:31:48.751 +00:00 [ERR] - Edge agent failed to process desired properties update patch
Microsoft.Azure.Devices.Edge.Agent.Core.ConfigSources.ConfigFormatException: Agent configuration format is invalid. ---> Newtonsoft.Json.JsonSerializationException: Value cannot be null.
Parameter name: version
   at Microsoft.Azure.Devices.Edge.Agent.Core.Serde.TypeSpecificSerDe`1.Deserialize[TU](String json) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/serde/TypeSpecificSerDe.cs:line 56
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.UpdateDeploymentConfig() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 165
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.UpdateDeploymentConfig() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 177
   at Microsoft.Azure.Devices.Edge.Agent.IoTHub.EdgeAgentConnection.<ApplyPatchAsync>d__21.MoveNext() in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/EdgeAgentConnection.cs:line 141
@Strandfelt
Copy link

Same here. Just posted my issue as well and realized that this was posted in the meantime.
My issue: #612

@carloshm
Copy link

Same issue:

V2 issue

OS version and architecture used: Raspberrypi Raspbian

Version used: 1.0.0rc22

V2 Docker version and container type: linux

@ghost
Copy link
Author

ghost commented May 23, 2018

Glad I'm not alone! I'll sit back and wait for MSFT to answer.

FYI have just re-verified on a brand new edge device (new windows, docker, python build).

Windows 10 Edge machine
Docker v18.03.1-ce-win65 (stable latest windows build)
Linux containers
Python v3.6.5

@aribeironovaes
Copy link
Contributor

aribeironovaes commented May 23, 2018 via email

@aribeironovaes
Copy link
Contributor

Just an update. Problem was identified on the service side (UX Portal).
It's been rolled off. We will update here once it's done.

Angelo Ribeiro.

@ghost
Copy link
Author

ghost commented May 23, 2018 via email

@jongio
Copy link
Member

jongio commented May 23, 2018

Please use the Az IoT CLI Extension as a workaround: https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-create-deployment-with-cli-iot-extension

@ChenchenC
Copy link

@jongio It does not work.

@darobs
Copy link
Contributor

darobs commented May 23, 2018

I just got word the UX team has rolled out a fix. Please try the Azure Portal again.

From our UX team: "Users may encounter problems with javascript caching and users may need therefore clear cache if still encountering issue."

You will have to submit the deployment again, so that correct schema is generated.

Thank you all for your patience.

@ghost
Copy link
Author

ghost commented May 24, 2018

Update - UX Still not working, even tried from unused Edge browser so no cache issues to deal with.

CLI works fine.

@ChenchenC
Copy link

For my case, removing the UX Portal caching is helpful. It seems like the Portal can not support frequent module deployment operations.

@jongio
Copy link
Member

jongio commented May 24, 2018

@ChenchenC - LMK if you want to debug the CLI issue you had. If so, let me know what you experienced. Error messages or repro steps would be helpful.

@myagley
Copy link
Collaborator

myagley commented Jun 4, 2018

This issue was resolved in the service and the portal has been verified to be working. Closing for now, but please reopen if the issue persists.

@myagley myagley closed this as completed Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants