-
Couldn't load subscription status.
- Fork 713
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
If you refresh the console logs page after restarting the app host, you won't see console logs for the new version of your app. This is particularly a problem with VS Code which doesn't auto open a new browser window when you start debugging.
I believe this is caused by the url of the console log page containing the resource id (i.e https://localhost:17275/consolelogs/resource/apiservice-ehuwumjj), and the instance id changes after the app host restart (e.g. ResourceName-aaaaaaaa becomes ResourceName-bbbbbbbb), so refreshing the page after an app host restart results in the old name no longer being found.
Expected Behavior
When I've only got one replica, I'd expect to be shown the console logs for the new version after refreshing.
When the resource no longer exists or there are multiple replicas so it's unclear where to be redirected to, I'd expect to see something other than a blank screen - maybe a "Resource XYZ not found" error, or possibly even just redirect back to the dashboard homepage.
Steps To Reproduce
- Start an aspire app
- Go to the console logs for one of your resource
- Stop and Restart the app host
- Refresh the browser window with your console logs
After refreshing, the console logs page shows up with everything blank.
A cruder way of reproducing this issue is to hack the url to a resource that doesn't exist
e.g. https://localhost:17275/consolelogs/resource/**webddfrontend-strkkver**
Exceptions (if any)
No response
.NET Version info
<Sdk Name="Aspire.AppHost.Sdk" Version="9.2.0-preview.1.25176.5" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0-preview.1.25176.5" />Anything else?
No response

