microsoft / BotBuilder-RealTimeMediaCalling

BotBuilder-RealTimeMediaCalling extends the BotBuilder to enable bots to engage in Skype audio-video calling. It provides real-time, programmable access to the voice, video, and screen sharing streams of a Skype call. The bot is a direct participant in a Skype 1:1 call.
MIT License
76 stars 36 forks source link

MPServiceHostLib.dll- The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. #3

Closed tjr114 closed 7 years ago

tjr114 commented 7 years ago

Just trying to build and deploy the HueBot sample, I'm failing to deploy and run in the emulator. I'm getting an exception out of the WorkerRole at OnStart related to MPServiceHostLib.dll. Exception info is below. I don't think I have changed anything that would have broken it so I'm at a loss. Any ideas what I'm missing?

Exception thrown: 'System.InvalidOperationException' in MPServiceHostLib.dll FrontEnd Error: 0 : [- OnStart,WorkerRole.cs(68)] Exception on startup: System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. at Microsoft.Rtc.MPService.Internal.MPServiceHostMonitor.EndInitialize(IAsyncResult result) at Microsoft.Rtc.MPService.Internal.MPAzureAppHost.Start(String publicServiceUri, Int32 localPort, X509Certificate2 certificate, GetTrustedServersDelegate getTrustedServersDelegate, String alternateConfigFilePath) at Microsoft.Rtc.MPService.Internal.MPAzureAppHost.Initialize(String publicRoleInstanceFQDN, Int32 publicRoleInstancePort, Int32 localPort, X509Certificate2 certificate, MPServiceEventDelegate eventDelegate, GetTrustedServersDelegate getTrustedServersDelegate, String alternateConfigFilePath) at Microsoft.Skype.Internal.Bots.Media.InternalMediaPlatform.Initialize(MediaPlatformSettings settings, IConfigurationManager configurationManager, ILogger logger, Boolean isTest) at Microsoft.Skype.Bots.Media.MediaPlatform.Initialize(MediaPlatformSettings settings) at FrontEnd.Service.Initialize(IConfiguration config) in C:\Users\timrang\Source\Repos\BotBuilder-RealTimeMediaCalling\Samples\HueBot\FrontEnd\Service.cs:line 49 at WorkerRole.WorkerRole.OnStart() in C:\Users\timrang\Source\Repos\BotBuilder-RealTimeMediaCalling\Samples\HueBot\WorkerRole\WorkerRole.cs:line 57 Exception thrown: 'System.InvalidOperationException' in WorkerRole.dll

MalarGit commented 7 years ago

@tjr114 : Real-Time media bots cannot be debugged on the emulator (Azure emulator/Botframework emulator) - https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-real-time-media-requirements. We will work on this soon.

MalarGit commented 7 years ago

@tjr114 This happens when the registry is in a bad state. Try restarting the computer and then running unlodctr .NETFramework lodctr /R cd C:\Windows\Inf\.NETFramework lodctr corperfmonsymbols.ini

Please note that service will just start in emulator but calls will not work as emulator is not supported yet

tjr114 commented 7 years ago

Thanks for the follow up @MalarGit . I was trying to run locally because attempting to deploy kept coming back with an assembly reference error that I thought I might be able to troubleshoot better locally. My Azure Cloud Service continues to cycle repeating the error below "Could not load file or assembly 'Microsoft.Bot.Builder.Calling, Version=3.0.3.0", but since your replies I managed to fix that with an app config assembly reference. Curious why there's a version conflict in the sample- did I do something wrong to face that in the first place or is this expected?

In any event, with your help I focused back on the Azure deployment (rather than emulator) and it has deployed successfully. Not sure if it works yet, but onward and upward. Thanks for your help!

MalarGit commented 7 years ago

@tjr114 We tried to update the dlls last minute and had missed out on assembly references. I submitted a fix for it 2 days back. Now it should not give a problem. All you have to do is click restore nuget and the project should work fine.

Glad to hear that the service is deployed. you could use the "Test" in the bot registration portal to see if chat messages are received at the bot. If there is no error, that indicates the authentication is correct.

To get certificates, I was pointed to this link https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-purchase-ssl-web-site. Please note that I have not tried getting a certificate from here but I plan to try out soon. Let us know if you run into any more issues. would be glad to help.

jack888888 commented 7 years ago

@MalarGit, if we setup this sample in local and use the "Test" in the bot registration portal, does the chat messages can be received at the bot? And does it need certificate for testing the chat message received at bot?

MalarGit commented 7 years ago

In the initial stages of development, I have tried running the sample in local emulator, setting up ngrok and pointing the bot registration portal to the ngrok url to verify chat messages are received. This was before I had enabled https for the bot. since ngrok is supposed to support https:->https I suppose it should work even now. P.S. We track only open issues. In future please open as a separate issue.

jack888888 commented 7 years ago

Thanks. Will try it.