Skip to content

[Blazor] localStorage.getItem errors with complex objects #43974

Closed
@JonathanShrek

Description

@JonathanShrek

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I created a fairly complex object that I want to store in local storage. The object gets set in local storage, but when I go to get the item from local storage I get a pretty generic error and the server hangs and dies.

"Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'."

Expected Behavior

To be able hold more complex objects in local storage and retrieve them without an error.

Steps To Reproduce

https://github.com/kobrien603/BlazoredLocalStorageErrorExample

Exceptions (if any)

No response

.NET Version

6.0.101

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions