-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When using the [PersistentState] attribute on an iPhone or iPad running iOS 16.5, we are seeing unexpected behavior when the app is backgrounded.
Expected Behavior
The app should reconnect and restore state, with the counter still set to the previous value.
Notes
- On iOS 18.6.2, the expected behavior is observed.
- Upgrading the device that experienced the issue resolved the problem.
Steps To Reproduce
- Scaffold a new .NET 10 project with Blazor Web App and the following settings:
- .NET 10 Preview
- Auth: none
- Interactive render mode: server
- Interactivity: global
- include sample pages: true
- On the counter page add the [PersistentState] above the current count and change it to a property.
- In Program.cs add DisconnectedCircuitMaxRetained = 0 inside the AddInteractiveServerComponents method
.AddInteractiveServerComponents(options => { options.DisconnectedCircuitMaxRetained = 0; });
- Deploy to IIS and go to an iPhone/iPad
- Increase the counter and leave the Safari browser for 30 seconds

Exceptions (if any)
No exceptions
.NET Version
10.0.100-preview.7.25380.108
Anything else?
VS: 17.14.12 Preview 1.0
.NET SDK:
Version: 10.0.100-preview.7.25380.108
Commit: 30000d883e
Workload version: 10.0.100-manifests.8bb6be96
MSBuild version: 17.15.0-preview-25380-108+30000d883
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.7.25380.108\
.NET workloads installed:
[maui-windows]
Installation Source: VS 17.14.36408.4
Manifest Version: 10.0.0-preview.6.25359.8/10.0.100-preview.6
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.6\microsoft.net.sdk.maui\10.0.0-preview.6.25359.8\WorkloadManifest.json
Install Type: Msi
[maccatalyst]
Installation Source: VS 17.14.36408.4
Manifest Version: 18.5.10415-net10-p6/10.0.100-preview.6
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.6\microsoft.net.sdk.maccatalyst\18.5.10415-net10-p6\WorkloadManifest.json
Install Type: Msi
[ios]
Installation Source: VS 17.14.36408.4
Manifest Version: 18.5.10415-net10-p6/10.0.100-preview.6
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.6\microsoft.net.sdk.ios\18.5.10415-net10-p6\WorkloadManifest.json
Install Type: Msi
[android]
Installation Source: VS 17.14.36408.4
Manifest Version: 36.0.0-preview.6.169/10.0.100-preview.6
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100-preview.6\microsoft.net.sdk.android\36.0.0-preview.6.169\WorkloadManifest.json
Install Type: Msi
Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.
Host:
Version: 10.0.0-preview.7.25380.108
Architecture: x64
Commit: 30000d883e
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.428 [C:\Program Files\dotnet\sdk]
9.0.304 [C:\Program Files\dotnet\sdk]
10.0.100-preview.7.25380.108 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found