dotnet / dotnet/aspnetcore

Enhanced Navigation Silently Ignores Fetch Network Errors

Open
#51,618 3 comments 0 reactions 0 assignees View on GitHub
area-blazor bug Pillar: Technical Debt Priority:0
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

When a fetch request from enhanced navigation fails (due to the server being offline or a network issue), there is no indiction in the UI. If you look at the network inspector, you can see the failed requests.

![Failed requests in the web inspector, but no indication of anything in the UI](https://imgur.com/bkVs27z.png)

### Expected Behavior

I would expect the UI to show some sort of error when the `fetch` requests fail like the UI below

![A Blazor page showing a message saying that an unhandled problem has occurred](https://imgur.com/nMq9TML.png)

### Steps To Reproduce

* Create a new project with `dotnet new blazor` and run it
* Navigate to the app
* Shut down the web server
* Click the links and the UI shows nothing

### Exceptions (if any)

### .NET Version

8.0.100-rtm.23524.4

### Anything else?

This has been tested on 8.0.100-rc.2.23502.2, 8.0.100-rtm.23524.4 (nightly), and 8.0.200-preview.23523.27 (nightly). All were fresh installs of dotnet on VMs and the nightly NuGet config was added for the nightly ones.

```
.NET SDK:
Version: 8.0.100-rtm.23524.4
Commit: 5bc5eecc5a
Workload version: 8.0.100-manifests.ea856202

Runtime Environment:
OS Name: Mac OS X
OS Version: 14.0
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/8.0.100-rtm.23524.4/

.NET workloads installed:
Workload version: 8.0.100-manifests.ea856202
There are no installed workloads to display.

Host:
Version: 8.0.0-rtm.23519.13
Architecture: arm64
Commit: 86c949374e

.NET SDKs installed:
8.0.100-rtm.23524.4 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0-rtm.23520.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0-rtm.23519.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found
```

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.