Getting a lot of "Object reference not set to an instance of an object."

Hey all,

I am getting alot of thoes now in my grids that run serverside
I can see in the log also:

16:27:22 [Warn] PowerShellExecutionService Error executing endpoint CaseOverviewNeglected. Object reference not set to an instance of an object.
at , : line 6

the powershell code is this:

New-UDGrid -Id ‘CaseOverviewNeglected’ -ServerSideProcessing -NoExport -PageSize $Session:UserSettings.Dashboard.CasesPerPage -Title “Neglected for $username” -Properties $Properties -Headers $Headers -Endpoint {

                    $NeglectedCases = $Cases | 

                    Where-Object IsNeglected -eq $true | 

                    Where-Object Title -like "*$filtertext*"

                    $NeglectedCases |

                    Sort-Object $SortColumn -Descending:(!$SortAscending) |

                    Select-Object -Skip $Skip -First $Take |

                    Select-Object Title, ToolkitCustomer, AssignmentTypeName, PriorityLetter, Status, DueDate, $CreateOpenLink, $CreateEditLink | 

                    Out-UDGridData -TotalItems $NeglectedCases.count


line 6 should be: "Select-Object -Skip $Skip -First $Take | "
but this is not happening all the time ?

this is possible after I moved the dashboard to a new server.
I am running in IIS, Windows server 2019, core hosting bundle 2.1.17
executed under Powershell v7 RTM.
UD is 2.9.0 Enterprise

edit: The web call return the following:

Can you grab a UD Log with Enable-UDLogging? Kinda sounds like an internal error in UD.

Which log level ? on Info, you have it already what it throw in it :slight_smile:

but it seems that it’s like the variable I am using in the new-udgrid get removed, so it’s unable to access the data.

very simple I have this:

new-udPage -endpoint {
$Data = $cache:data | [Filters]
new-udtabcontainer -renderonactive -tabs {
new-udtab -text Type1 -RefreshWhenActive -Dynamic -content {
New-UDgrid -id Type1grid -serversideprocessing -endpoint {
$Data | [anotherfilter1] | out-udgriddata
new-udtab -text Type2 -RefreshWhenActive -Dynamic -content {
New-UDgrid -id Type2grid -serversideprocessing -endpoint {
$Data | [anotherfilter2] | out-udgriddata

debug level dont give much insight:

22:20:42 [Warn] PowerShellExecutionService Error executing endpoint ID. Object reference not set to an instance of an object.
at , : line 6
22:20:42 [Debug] ComponentController ConvertToActionResult() {“Error”:{“message”:“Object reference not set to an instance of an object.”,“location”:null,“type”:“error”,“id”:null,“refreshInterval”:0,“autoRefresh”:false,“hasCallback”:false}}

Ok. I was curious about the Debug level. I’d like to see the surrounding log messages as well.

Se email Adam :wink:

Thanks. Looking at it today.

I realise the error is sort of generic and can be caused by potentially different things, but I’ve been getting ‘Object reference not set to an instance of an object.’ on one of my pages in UD2.9.0 and wasn’t sure where to start with my troubleshooting.
When I refresh my page, it instantly goes away, so not sure if its on the first initialisation or not.
Searching for the error in the forum I can see a few people have had this but there doesn’t seem to have been any follow up, out of interest was there ever a solution to this? I’m hoping whatever caused this for others may point me in the right direction with mine :slight_smile:

it seems that not all component works inside all components.

So try pull the thing that give you issue, out of the parent cmdlet.