microsoft / microsoft/aspire

[AspireE2E] An error “Cannot create a JSObjectReference from the value 'undefined'” occurs when quickly switching to details page and closing it

Open
#15,438 4 comments 0 reactions 0 assignees View on GitHub
area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

**REGRESSION INFO**: Also repro on Aspire 13.1.3

**INSTALL STEPS**
1. Clean machine: Windows x64 25h2
1. Install SDK 10.0.201
1. Add feed
1. Install Aspire.ProjectTemplate:
`dotnet new install Aspire.ProjectTemplates@13.2.0 --force`

**REPRO STEPS**
1. Open CMD, create an Aspire Starter App using following commands:
```
dotnet new aspire-starter -o aspire01
cd aspire01/aspire01.AppHost
```
1. Run the app with `dotnet run`
1. Open the Dashboard URL in browser
1. Click the `View options` icon in the upper right corner, then click `Show hidden resources` option
1. For `apiservice` proejct, quickly navigating to `details` page and close
1. Open the `Console logs`, view the log of `aspire-dashboard`

**Actual Result**

![Image](https://github.com/user-attachments/assets/a25b434a-e2c6-4e1e-b109-31f31ecf53a7)

Image

Sometimes the page will display this error:

Image

**Error log**
```
[FluentDataGrid] Cannot create a JSObjectReference from the value 'undefined'.
Error: Cannot create a JSObjectReference from the value 'undefined'.
at m (https://localhost:17094/framework/blazor.web.js:1:2125)
at T (https://localhost:17094/framework/blazor.web.js:1:8107)
at w.beginInvokeJSFromDotNet (https://localhost:17094/framework/blazor.web.js:1:4121)
at async _n._invokeClientMethod (https://localhost:17094/framework/blazor.web.js:1:67458)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.