Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Brouter finds no routes on WebAssembly when one type of the app assembly needs an assembly that isn't loaded

Đã đóng
#14,335 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #14336 của @yasmoradi — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, wasm
Lĩnh vực
backend

Hướng nghiên cứu

Start with BrouteScanner.Discover and the Assembly.GetTypes() call mentioned in the stack trace; check the scanner's existing handling of ReflectionTypeLoadException and the WebAssembly failure described here. Reproduce with a type whose base type or interface is in an unloaded lazy loaded assembly. Done means route discovery skips the unresolvable type and the app starts with its routes available.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Brouter reads the app's types with Assembly.GetTypes() and catches ReflectionTypeLoadException, so a type that can't be loaded is skipped. On WebAssembly, Mono throws FileNotFoundException instead when a type's base type or interface lives in an assembly that isn't loaded yet, for example one marked BlazorWebAssemblyLazyLoad. The exception escapes Brouter.OnInitialized, so no route is found and the app breaks at startup.

I hit it in bit Boilerplate while lazy loading SignalR: SignalRInfiniteRetryPolicy implements IRetryPolicy from Microsoft.AspNetCore.SignalR.Client.Core, so that assembly has to stay eagerly loaded.

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.SignalR.Client.Core, Version=10.0.14.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies.
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at Bit.Brouter.BrouteScanner.aa(Assembly , HashSet`1 , List`1 )
   at Bit.Brouter.BrouteScanner.Discover(Assembly , IReadOnlyList`1 )
   at Bit.Brouter.Brouter.bS()
   at Bit.Brouter.Brouter.OnInitialized()
Ngôn ngữ chính
C#
Star
1.4k
Fork
264
Merge trung bình
10 giờ 31 phút
Pull request đã merge (30 ngày)
405

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bitfoundation/bitplatform

Tất cả issue của bitfoundation/bitplatform

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.