microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
210 stars 235 forks source link

teams-recording-bot won't start running | _botService.Initialize (); #397

Open dejmsi opened 3 years ago

dejmsi commented 3 years ago

the query is directed to the project - https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/AksSamples/teams-recording-bot

I try to run this example, I have everything I need for it and I followed the instructions, though. some points come to me tossed. Does anyone have experience with this and did you manage to run it into a running shoe?

My current result is that after setting all points 1-7 and running the program in Visual Studio, it crashes due to an error on /RecordingBot.Services/ServiceSetup/AppHost.cs on the line _botService.Initialize (); , where I could not solve this problem.

I should have all the parameters from Azure, NgRok and Certificate set correctly.

1fabi0 commented 3 years ago

Can you please share the exact issue it is throwing?

dejmsi commented 3 years ago

specifically, it writes this in the figure "The object reference is not set to an object instance".

It is possible that I have something wrong stated during the setup, such as certificates or ngrok. if you would like to advise me, you can go to dejmsi (a) gmail.com, I will be grateful.

image

1fabi0 commented 3 years ago

It seems like you didn't call boot server so the dependency isn't resolved at the point where you call initialize

umkhan65 commented 3 years ago

@1fabi0 did you find out what was the issue?

1fabi0 commented 3 years ago

@umkhan65 as I said this happens because boot isn't called so the IServiceCollection isn't added with all needed classes and the IServiceProvider Can't resolve the dependency and returns null on the GetService Method If you would use GetRequiredService you will end up with a Exception on service Resolving

JasonTheDeveloper commented 3 years ago

@dejmsi Can you pop a breakpoint on line 101 and see if it throws any errors?

dejmsi commented 3 years ago

yes, thank you for the news. The problem was in the certificates, which was probably not well created, currently the application was running fine for me. In my opinion, this is not completely described in the documentation and can be confusing at times.

I'm currently struggling a bit with the problem, when I try to connect to the planned teams meeting via the request, where the bot/server responds to 500 with an error in the postman, which doesn't tell me anything and maybe it could be some region setting that comes to mind ?

image

image

beth-panx commented 3 years ago

Experiencing the same error with ngrok returning a /502 bad gateway...

Followed the instruction in this repo step by step and didn't modify anything.

1fabi0 commented 3 years ago

I think if you experience problems with ngrok best you can do is searching for solutions in the ngrok repository https://github.com/inconshreveable/ngrok