microsoft / microsoft/aspire

Upgrading from 13.2.4 to 13.5 yields dashboard warning about LocalBrowserStorage

Open
#19,546 1 comment 1 reaction 0 assignees View on GitHub
area-dashboard triage:needs-human
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

I upgraded today from 13.2.4 directly to 13.5 and when running the apphost (very large with 30+ projects), I see this error in the apphost terminal output:

```
warn: Aspire.Hosting.Dashboard.Model.BrowserStorage.LocalBrowserStorage[0]
Error when reading 'Aspire_Resources_CollapsedResourceNames_IonPerceptCloud' as List`1.
System.Security.Cryptography.CryptographicException: The payload was invalid. For more information go to https://aka.ms/aspnet/dataprotectionwarning
at Microsoft.AspNetCore.DataProtection.Cng.CbcAuthenticatedEncryptor.DecryptImpl(Byte* pbCiphertext, UInt32 cbCiphertext, Byte* pbAdditionalAuthenticatedData, UInt32 cbAdditionalAuthenticatedData)
at Microsoft.AspNetCore.DataProtection.Cng.Internal.CngAuthenticatedEncryptorBase.Decrypt(ArraySegment`1 ciphertext, ArraySegment`1 additionalAuthenticatedData)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
at Microsoft.AspNetCore.DataProtection.DataProtectionCommonExtensions.Unprotect(IDataProtector protector, String protectedData)
at Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage.Unprotect[TValue](String purpose, String protectedJson)
at Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage.GetAsync[TValue](String purpose, String key)
at Aspire.Dashboard.Model.BrowserStorage.BrowserStorageBase.GetAsync[TValue](String key) in D:\a\_work\1\s\src\Aspire.Dashboard\Model\BrowserStorage\BrowserStorageBase.cs:line 31
```

I have not noticed any behaviour consequences in the apphost, yet. I will add to this report if I find anything.

### Expected Behavior

n/a

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### Aspire doctor output

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with src/Aspire.Dashboard/Model/BrowserStorage/BrowserStorageBase.cs at line 31 and trace the LocalBrowserStorage read shown in the stack trace. Reproduce the upgrade from 13.2.4 to 13.5 with persisted browser data, then determine the expected handling of the invalid payload and verify the warning no longer appears without unintended dashboard behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.