microsoft-graph-comms-samples icon indicating copy to clipboard operation
microsoft-graph-comms-samples copied to clipboard

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

Open Khadeer-techie opened this issue 1 year ago • 11 comments

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", "AppSettings__AadAppId": "f05ea5ce-52a9-4efb-9dd4-e99a715c9570", "AppSettings__AadAppSecret": "mfL8Q~vJsmOk-.Jzu0QSqmZk7gAUdkI-~6.37b~J", "AppSettings__ServiceDnsName": "bot.techieguru-dev.cloud", //"bot.contoso.com", "AppSettings__CertificateThumbprint": "b0736802816d508d3e40dd9f0db87c6915f953c3", "AppSettings__BotCallingInternalPort": "9442", "AppSettings__BotInstanceExternalPort": "443", "AppSettings__BotInternalPort": "9441", "AppSettings__MediaInstanceExternalPort": "80", "AppSettings__MediaInternalPort": "8445", "AppSettings__ApplicationInsightsInstrumentationKey": "InstrumentationKey", "AppSettings__UseSpeechService": "false", "AppSettings__SpeechConfigKey": "SpeechConfigKey", "AppSettings__SpeechConfigRegion": "SpeechConfigRegion", "AppSettings__BotLanguage": "en-US", "AppSettings__UseLocalDevSettings": "true", "AppSettings__MediaDnsName": "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 avatar Jun 19 '24 13:06 Khadeer-techie

@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

Khadeer-techie avatar Jun 20 '24 07:06 Khadeer-techie

are you running Visual Studio as administrator?

jamil-z avatar Jun 25 '24 14:06 jamil-z

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

Khadeer-techie avatar Jun 26 '24 07:06 Khadeer-techie

@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) ?

ak0037 avatar Jul 08 '24 06:07 ak0037

@ak0037 issue still exists in local

Khadeer-techie avatar Jul 08 '24 06:07 Khadeer-techie

The issue is more on compatibility side As stated in docs

  • Install .Net Framework 4.7.1. The solution will not build if you do not install this.

ak0037 avatar Jul 10 '24 02:07 ak0037

@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

Khadeer-techie avatar Jul 10 '24 06:07 Khadeer-techie

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).

ak0037 avatar Jul 10 '24 07:07 ak0037

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?

jishnuraj-chimera avatar Jul 10 '24 11:07 jishnuraj-chimera

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.

bcage29 avatar Jul 31 '24 16:07 bcage29

@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

tamnguyenvan164 avatar Oct 30 '24 06:10 tamnguyenvan164