microsoft / microsoft/CSS-Exchange

[Issue] Troubleshoot-ModernSearch error in Get-IndexStateOfMessage

Open
#828 1 comment 0 reactions 1 assignee View on GitHub

@dpaulson45 is already working on this.

Since Dec 29, 2021.

bug Issue Search
Dominant language
PowerShell
Stars
1.3k
Forks
395
Avg merge
14h 7m
Merged PRs (30d)
5

Description

System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.PSScriptCmdlet.DoProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
at Get-IndexStateOfMessage<Process>, C:\distr\Troubleshoot-ModernSearch.ps1: line 398
at Get-MessageInformationObject<Begin>, C:\distr\Troubleshoot-ModernSearch.ps1: line 441
at Get-MessageIndexState<Process>, C:\distr\Troubleshoot-ModernSearch.ps1: line 598
at Main, C:\distr\Troubleshoot-ModernSearch.ps1: line 1697
at <ScriptBlock>, C:\distr\Troubleshoot-ModernSearch.ps1: line 1760
at <ScriptBlock>, <No file>: line 1

Get-IndexStateOfMessage probably needs a null check before calling ToString() here:

image

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.