Open omni-htg opened 1 day ago
Tagging related issues, including those in /dotnet/runtime:
Apologies if the report should be handled on the /dotnet/runtime side of things, please indicate so.
@maraf is this the same issue we had a while back?
@omni-htg you can try adding a Cache: no-cache
to the response for the JS files or do a hard refresh to see if the issue goes away.
Hey @javiercn, here's some updates on what I could find:
This last item is the most critical for us, as we cannot realistically have our customers manually clearing their cache just to be able to visit the site. What is weird to me is that we have gone through multiple 8.0.x versions without any issues -- so I hope you understand how worrisome it is for next versions.
Apologies for the rant-y tone -- now for the provided proposal:
You're suggesting that I add a Cache-Control: no-cache
response header to the JS files being served, correct?
Let me check it out :)
I have the same issue. But I think it is related to the update to Visual Studio 2022 17.11.5!
It is not a Visual Studio issue! I have the exact same error message when creating a build (Ubuntu 20.04). I have also tried using different browsers and the issue persists. The issue appeared with sdk-version 8.0.10
Edit: "Fixed" for now by manually installing sdk version 8.0.8
I haven't upgraded my project to 8.0.10 and I get this issue. But with the visual studio update came an sdk update. I guess that is causing the issue.
I'm using the SDK Version 8.0.403 now and my app works with packages 8.0.8 and 8.0.10.
Experiencing the same issue after doing an upgrade today of latest Visual Studio. The Blazor WASM web app does not "boot" if I am not doing a cache clear like Ctrl+F5 in browser.
On our IIS servers I've fixed the problem using the no-cache directive which seems to fix the issues for our end-users, but it's far from ideal.
<!-- Fix for https://github.com/dotnet/aspnetcore/issues/58313 -->
<location path="_framework/dotnet.js">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
In our Azure Static Web App, adding following config to staticwebapp.config.json
seems to fix the issue for Edge and Chrome but not Firefox. We did not do any update in our local development environment. Seems that the agent in Azure DevOps pipeline has the update.
{
"route": "/_framework/dotnet.js",
"headers": {
"cache-control": "no-cache"
}
},
Is there an existing issue for this?
Describe the bug
Upon upgrading a Blazor WASM Standalone .NET 8 project to 8.0.10 (including all related NuGet packages), Debugging on Visual Studio 2022 17.11.5 or navigating to a Deployed site with previous version cache breaks during runtime with the following:
Previous issues related to that version difference message recommended clearing out all
bin
andobj
folder -- which I have tried with no success.One of our users reported the same errors on their Chrome / Edge console, for which clearing out their browser cache made it work. It seems that there might be some sort of incompatibility somewhere that "breaks" instead of "upgrading" the .NET libraries -- so it looks like the issue comes from the moving from one version to the next, not 8.0.10 by itself.
If this is the case, where just by navigating to the site without a "clean cache" it breaks, then it's a bigger regression than I expected. Hopefully it's not!
Thanks for your time.
Expected Behavior
On VS 2022, debugging should just work flawlessly. On deployed site, users should NOT be expected to clear their cache to navigate to the site.
Steps To Reproduce
From a Standalone Blazor WASM project starting on 8.0.8, compile and debug. Then, upgrade to 8.0.10 and try again.
On a deployed site, deploy the 8.0.8 version and navigate to it. Then, deploy the 8.0.10 version and with the same browser with the site cached, navigate to the site.
Exceptions (if any)
Clearing cache, or navigating with a "fresh" browser works fine.
.NET Version
8.0.403
Anything else?
.NET 8.0.10 / 8.0.403 Visual Studio 2022 17.11.5
dotnet --info
: .NET SDK: Version: 8.0.403 Commit: c64aa40a71 Workload version: 8.0.400-manifests.e99c892e MSBuild version: 17.11.9+a69bbaaf5