microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

Echo Bot showing object reference error

Open
#825 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

Describe the issue
When executing the code on my local machine, it displays the error message: 'Object reference not set to an instance of an object.

Code Snippet
var botInternalHostingProtocol = "https";
if (appSettings.UseLocalDevSettings) - The error displays here.
{
// if running locally with ngrok
// the call signalling and notification will use the same internal and external ports
// because you cannot receive requests on the same tunnel with different ports

 // calls come in over 443 (external) and route to the internally hosted port: BotCallingInternalPort
 botInternalHostingProtocol = "http";

 builder.Services.PostConfigure<AppSettings>(options =>
 {
     options.BotInstanceExternalPort = 443;
     options.BotInternalPort = appSettings.BotCallingInternalPort;

 });

}
else
{
//appSettings.MediaDnsName = appSettings.ServiceDnsName;
builder.Services.PostConfigure(options =>
{
options.MediaDnsName = appSettings.ServiceDnsName;
});
}

Expected behavior
We have to execute and run the Echobot.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Echobot startup code containing the UseLocalDevSettings branch and inspect how appSettings is initialized before that condition. Reproduce the local run, identify which reference is null, and verify that the Echobot executes successfully with the expected local settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.