Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet-sdk-10.0.100-alpha.1.25057.15] Blazor apps launch with error "Failed to load resource: the server responded with a status of 404()" #59805

Open
1 task done
Junjun-zhao opened this issue Jan 10, 2025 · 5 comments
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: By Design Resolved because the behavior in this issue is the intended design. Status: Resolved

Comments

@Junjun-zhao
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When run the 3rd party application with the latest .NET 10 build, right click the page and select inspect, it shows error "Failed to load resource: the server responded with a status of 404()" in console.

Application Name: BootstrapBlazor, visitormanagement, ContosoCrafts, BlazorBlogs, TabBlazor, Blazorise, BlazorStrap, BlazorPolyfill, OpenBudgeteer, MudBlazor, MP1TestRepo, eShopOnBlazor, ElementBlazor, BlogSimpleAPI, BlazorApexCharts, RulesEngineEditor, Blog1, AntSK, OqtaneFramework, Fenrus, WorldExplorer, OpenMU, Hawaso
OS: Windows 10 22H2
CPU: X64
.NET Build Number: dotnet-sdk-10.0.100-alpha.1.25057.15
App & Source Location checking at:https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2333382

Github Link:
https://github.com/dotnetcore/BootstrapBlazor
https://github.com/neozhu/visitormanagement
https://github.com/dotnet-presentations/ContosoCrafts
https://github.com/ADefWebserver/Blazor-Blogs
https://github.com/TabBlazor/TabBlazor
https://github.com/Megabit/Blazorise
https://github.com/chanan/BlazorStrap
https://github.com/Daddoon/Blazor.Polyfill
https://github.com/TheAxelander/OpenBudgeteer
https://github.com/MudBlazor/MudBlazor
https://github.com/ArgoZhang/MP1TestRepo
https://github.com/dotnet-architecture/eShopOnBlazor
https://github.com/Element-Blazor/Element-Blazor
https://github.com/thanhxuanhd/BlogSimpleAPI
https://github.com/apexcharts/Blazor-ApexCharts
https://github.com/alexreich/RulesEngineEditor
https://github.com/linkdotnet/Blog
https://github.com/AIDotNet/AntSK
https://github.com/oqtane/oqtane.framework
https://github.com/revenz/Fenrus
https://github.com/VladislavAntonyuk/WorldExplorer
https://github.com/MUnique/OpenMU
https://github.com/VisualAcademy/Hawaso

Verify Scenarios:
1). Windows 10 22H2 AMD64 + dotnet-sdk-9.0.102: Pass
2). Windows 10 22H2 AMD64 + dotnet-sdk-10.0.100-alpha.1.25057.15: Fail

Expected Behavior

Launch successfully.

Steps To Reproduce

Minimal Repro steps (Demo attached:BlazorDemo.zip):

  1. Create a default 9.0 blazor web project.
  2. Build the project.
  3. Change the runtime.config file to let the app run against with dotnet-sdk-10.0.100-alpha.1.25057.15:
"frameworks": [
      {
        "name": "Microsoft.NETCore.App",
        "version": "10.0.0-alpha.1.25052.4"
      },
      {
        "name": "Microsoft.AspNetCore.App",
        "version": "10.0.0-alpha.2.25056.9"
      }
    ]
  1. Launch the app.

Exceptions (if any)

Actual Result:
Show error in console: Failed to load resource: the server responded with a status of 404
Image

.NET Version

10.0.100-alpha.1.25057.15

Anything else?

Dotnet info:

.NET SDK:
 Version:           10.0.100-alpha.1.25057.15
 Commit:            39da6dde11
 Workload version:  10.0.100-manifests.a166a9cf
 MSBuild version:   17.14.0-preview-25056-07+8d395fd27

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\10.0.100-alpha.1.25057.15\

Host:
  Version:      10.0.0-alpha.1.25052.4
  Architecture: x64
  Commit:       efdd299533

.NET SDKs installed:
  10.0.100-alpha.1.25057.15 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.0-alpha.2.25056.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 10.0.0-alpha.1.25052.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 10.0.0-alpha.1.25056.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@dotnet-actwx-bot @dotnet/compat

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jan 10, 2025
@Junjun-zhao
Copy link
Member Author

@mkArtakMSFT Could you please check and triage this issue? There are 23 apps in our lab affected in Appcompat lab so far.

@javiercn
Copy link
Member

@MackinnonBuck Is this related to the work that you did in december?

@MackinnonBuck
Copy link
Member

@javiercn Yeah, probably. We removed blazor.web.js as an embedded resource in .NET 10, and the app is explicitly running on a .NET 10 version of Microsoft.AspNetCore.App as specified in the .runtimeconfig. However, since the app was built targeting the net9.0 TFM, the implicit package reference to Microsoft.AspNetCore.App.Internal.Assets wasn't added.

I'm not totally sure yet how we'd make this work without embedding blazor.web.js again. Unless we backported some of these changes to .NET 9.

@javiercn
Copy link
Member

@MackinnonBuck I think this is by design. Any part of the stack that requires JavaScript to work needs to be rebuilt against the newest target framework and can't be upgraded just by updating the runtimeconfig.json, as that only updates the app partially.

@javiercn javiercn added the ✔️ Resolution: By Design Resolved because the behavior in this issue is the intended design. label Jan 21, 2025
@MackinnonBuck
Copy link
Member

@javiercn, yeah makes sense. Just wasn't sure if this is a scenario we need to support, meaning the design would have needed to change. It sounds like it's not critical we support this, so I agree with the decision to mark it as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: By Design Resolved because the behavior in this issue is the intended design. Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants