Search code examples
azureazure-iot-edgeazure-iot-hub-device-management

Azure IoT Hub Edge Module "AzureVideoAnalyzerEdge" wont deploy


The module "AzureVideoAnalyzerEdge" seems to be asking for a JWS token. I cant find a JWS token anywhere in azure for this.

Im not sure what this is referring to and it's my first time deploying AVA to the edge.

Happy to provide more info if required. just need to be pointed in the right direction.

The error is below:

Unhandled exception. System.ArgumentException: IDX12709: CanReadToken() returned false. JWT is not well formed: 'System.String'.
The token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EndcodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'.
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ReadJwtToken(String token)
   at Microsoft.Media.LiveVideoAnalytics.Edge.Common.Core.ProvisioningToken..ctor(String provisioningTokenString)
   at Microsoft.Media.LiveVideoAnalytics.Edge.Modules.MediaEdge.Hosts.IoTEdge.Core.MediaEdgeModule.InitializeAsync()
   at Microsoft.Media.LiveVideoAnalytics.Edge.Modules.MediaEdge.Hosts.IoTEdge.Core.MediaEdgeModule.InitializeAsync()
   at Microsoft.Media.LiveVideoAnalytics.Edge.Common.Hosts.IoTEdge.EdgeHost.SetModuleAsync(IEdgeModule module)
   at Microsoft.Media.LiveVideoAnalytics.Edge.Modules.MediaEdge.Hosts.IoTEdge.Program.Main(String[] args)
   at Microsoft.Media.LiveVideoAnalytics.Edge.Modules.MediaEdge.Hosts.IoTEdge.Program.Main(String[] args)
   at Microsoft.Media.LiveVideoAnalytics.Edge.Modules.MediaEdge.Hosts.IoTEdge.Program.<Main>(String[] args)

IotModule


Solution

  • The error is coming because you are entering the wrong JWT token, so you must follow this document to generate a JWT token for Azure Video Analyzer. https://learn.microsoft.com/en-us/azure/azure-video-analyzer/video-analyzer-docs/access-policies#creating-a-token