microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
209 stars 232 forks source link

MediaPerf is not registered: no key found at SYSTEM\CurrentControlSet\Services\MediaPerf\Performance #734

Open Khadeer-techie opened 4 months ago

Khadeer-techie commented 4 months ago

While running the Echo Bot locally I am getting below error: [SkypeBotsMediaPlatform][AppId:f05ea5ce-52a9-4efb-9dd4-e99a715c9570][KHADEERKI] MediaPerf is not registered: no key found at SYSTEM\CurrentControlSet\Services\MediaPerf\Performance

I have used the code which is given in the repo and any steps and one change what I made is I have used cloudflare instead of ngrok. As I was not able to run the EchoBot with ngrok to support http and tcp tunneling.

Below is the sample setting what I have made in launchsettings.json { "profiles": { "EchoBot": { "commandName": "Project", "environmentVariables": { "DOTNET_ENVIRONMENT": "Development", "AppSettingsAadAppId": "f05ea5ce-52a9-4efb-9dd4-e99a715c9570", "AppSettingsAadAppSecret": "mfL8Q~vJsmOk-.Jzu0QSqmZk7gAUdkI-~6.37b~J", "AppSettingsServiceDnsName": "bot.techieguru-dev.cloud", //"bot.contoso.com", "AppSettingsCertificateThumbprint": "b0736802816d508d3e40dd9f0db87c6915f953c3", "AppSettingsBotCallingInternalPort": "9442", "AppSettingsBotInstanceExternalPort": "443", "AppSettingsBotInternalPort": "9441", "AppSettingsMediaInstanceExternalPort": "80", "AppSettingsMediaInternalPort": "8445", "AppSettingsApplicationInsightsInstrumentationKey": "InstrumentationKey", "AppSettingsUseSpeechService": "false", "AppSettingsSpeechConfigKey": "SpeechConfigKey", "AppSettingsSpeechConfigRegion": "SpeechConfigRegion", "AppSettingsBotLanguage": "en-US", "AppSettingsUseLocalDevSettings": "true", "AppSettingsMediaDnsName": "http-bot.techieguru-dev.cloud" //"tcp.contoso.com" }, "dotnetRunMessages": true } } } Below are the tunnel settings in Cloudflare image

Can you help in running the Echbot locally using free ngrok or cloudflare?

Khadeer-techie commented 4 months ago

@bcage29 can you help in resolving the issue

I am getting below error

image

I have changed the code to get the port as the port was null

private static HttpRequestMessage SetAbsoluteUri(this HttpRequestMessage msg, HttpRequest req) => msg.Set(m => m.RequestUri = new UriBuilder { Scheme = req.Scheme, Host = req.Host.Host, Port = req.Host.Port != null? req.Host.Port.Value: 80, Path = req.PathBase.Add(req.Path), Query = req.QueryString.ToString() }.Uri);

Also I to join the call I have used the calls instead of Joincall image

Even the API call 200 Success ok but I could not see the Bot joining the call. image

When I try to join the call again using the postman I am getting different callId and scenarioId, But the Bot is not added to the call

jamil-z commented 4 months ago

are you running Visual Studio as administrator?

Khadeer-techie commented 4 months ago

@jamil-z I tried running Visual Studio 2022 as administrator and the error remains the same. image

ak0037 commented 3 months ago

@Khadeer-techie were you able to solve the issue:- MediaPerf is not registered: no key found at SYSTEM\CurrentControlSet\Services\MediaPerf\Performance (for local deployment) ?

Khadeer-techie commented 3 months ago

@ak0037 issue still exists in local

ak0037 commented 3 months ago

The issue is more on compatibility side As stated in docs

Khadeer-techie commented 3 months ago

@ak0037 I do have .Net framework 4.7.1 installed in my local box. I am getting error when I run the EchoBot code locally

ak0037 commented 3 months ago

the issue is with BotMediaLogger.cs since it utilizes MediaPerf key which is specific to Skype Bot Media Platform so you need to have registry for MediaPerf which probably Windows Server 2022 has (but not on Windows 11 or 10).

jishnuraj-chimera commented 3 months ago

Hi @ak0037, I work with @Khadeer-techie. When we checked, there's no item with the name "MediaPerf" in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

I added a new Key with the name "MediaPerf" in there and a property with the name "performance", but can you please tell me what should be the value of this property?

bcage29 commented 3 months ago

The media stack perf counters are not required to be registered and don't need to be used in a 3P application. The error is not a true error and can be ignored. I have logged this with the PG as something to remove from logging.

tamnguyenvan164 commented 5 days ago

@bcage29 @jishnuraj-chimera any idea for the issue (But the Bot is not added to the call)? I am facing the same problem. I deployed on Azure successfully and call with success but the bot is not added