microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
208 stars 226 forks source link

Not able to start AudioVideoPlaybackBot #509

Open slackmathew opened 2 years ago

slackmathew commented 2 years ago

I registered the calling bot, provided correct permissions, created a classic cloud service, applied a cert, configured the CNAME entry (and validated that it resolved to xxx.cloudapp.net), ran the configure_cloud script with the app ID, secret, etc. and published to the cloud service. However, when trying to start the app I get the following error:

Recycling (Recovering role... Application startup task 0 is running. [2021-11-10T13:14:50Z] Last exit time: [2021/11/10, 13:14:36.172]. Last exit code: 0. Last role exception: (System.UriFormatException)|>Process ID: 4256 Process Name: WaWorkerHost Thread ID: 4 AppDomain Unhandled Exception for role AVPWorkerRole_IN_0 Exception: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at Sample.AudioVideoPlaybackBot.WorkerRole.AzureConfiguration.Initialize() in C:\Bot\microsoft-graph-comms-samples-master\Samples\V1.0Samples\LocalMediaSamples\AudioVideoPlaybackBot\WorkerRole\AzureConfiguration.cs:line 295 at Sample.AudioVideoPlaybackBot.WorkerRole.WorkerRole.OnStart() in C:\Bot\microsoft-graph-comms-samples-master\Samples\V1.0Samples\LocalMediaSamples\AudioVideoPlaybackBot\WorkerRole\WorkerRole.cs:line 95 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum) at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() , Details: Exception: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at Sample.AudioVideoPlaybackBot.WorkerRole.AzureConfiguration.Initialize() in C:\Bot\microsoft-graph-comms-samples-master\Samples\V1.0Samples\LocalMediaSamples\AudioVideoPlaybackBot\WorkerRole\AzureConfiguration.cs:line 295 at Sample.AudioVideoPlaybackBot.WorkerRole.WorkerRole.OnStart() in C:\Bot\microsoft-graph-comms-samples-master\Samples\V1.0Samples\LocalMediaSamples\AudioVideoPlaybackBot\WorkerRole\WorkerRole.cs:line 95 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum) at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() '.)

1fabi0 commented 2 years ago

It seems like the ServiceDnsName is not a correct URI

slackmathew commented 2 years ago

In ServiceConfiguration.Cloud.cscfg I have ServiceDNSName configured with my domain (example.com) and it is resolvable. For ServiceCNAME I have botname.example.com which is also resolvable and resolves back to my cloud service public IP. I have a cert generated and the thumbprint is correct that lists example.com, *.example.com and botname.example.com as SAN's. Any thoughts on what I can try next? Thanks!

1fabi0 commented 2 years ago

Can you please verify that your code in execution receives your settings from environment variabels, correct cname etc