dotnet / dotnet/aspnetcore

Sending more than 32K to localstorage Then Reading It Causes Circuit Deadlock

Open
#67,479 9 comments 0 reactions 0 assignees View on GitHub
area-blazor help wanted
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When writing more than 32K of data to local storage, and then reading it, a circuit deadlock occurs, and all operations cease to execute on the circuit. It is unclear what is happening and a warning should instead be presented to the user.

### Expected Behavior

Instead of freezing and a deadlock, a warning/error should be presented to the developer so they know what is occurring, and how to fix it.

### Steps To Reproduce

Run the following reproduction:
https://github.com/Mike-E-angelo/Stash/tree/master/Blazor.MessageLimit

1. Press the first button
2. Press the 2nd button
3. Observe circuit deadlock

Uncomment this line to fix the issue:
https://github.com/Mike-E-angelo/Stash/blob/master/Blazor.MessageLimit/Program.cs#L12

### Exceptions (if any)

None, that's what this request is for

### .NET Version

10.0.301

### Anything else?

Thank you for all your great and amazing work on Blazor. 🙏

Contributor guide

Open the contributing guide

Research direction

Run the Blazor.MessageLimit reproduction, following the two-button steps, and inspect Program.cs at line 12, including the commented setting that avoids the failure. Trace the local-storage write and read until the circuit stops processing. Done means the oversized value produces a developer-visible warning or error instead of a circuit deadlock.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.