Skip to content

Re-enable Web Worker template tests after runtime JSExport fix flows #70502

Closed

Description

@akoeplinger

Failing Test(s)

The following tests were temporarily skipped in #70481 when switching browser runtime selection to CoreCLR:

  • BlazorTemplates.Tests.WebWorkerTemplateE2ETest.WebWorkerTemplate_CanInvokeMethods
  • BlazorTemplates.Tests.WebWorkerTemplateE2ETest.WebWorkerTemplate_HandlesErrors
  • BlazorTemplates.Tests.WebWorkerTemplateE2ETest.WebWorkerTemplate_CanDisposeWorker
  • BlazorTemplates.Tests.WebWorkerTemplateE2ETest.WebWorkerTemplate_CanInvokeMethodsAfterPublish

Track dotnet/runtime#136924. Once it merges and the runtime/JavaScript interop changes flow through the VMR into ASP.NET Core's consumed dependencies:

  • Verify the consumed runtime includes the fix.
  • Remove the four Theory(Skip = ...) reasons in src/ProjectTemplates/test/Templates.Blazor.Tests/WebWorkerTemplateE2ETest.cs.
  • Run all four Chromium cases, including the publish scenario, with UseMonoRuntime=false and confirm worker initialization and assertions pass.

Error Message

Worker initialization failed: Error: Unable to create the web worker JavaScript object:
Could not resolve type 'System.Runtime.InteropServices.JavaScript.__GeneratedInitializer'
in assembly 'AspNet.…'

The worker calls getAssemblyExports(mainAssemblyName) before loading the worker library's exports. The generated Blazor host has no [JSExport] methods and therefore no generated initializer. Mono tolerates that absence; the consumed CoreCLR implementation throws before reaching WorkerLib.

Stacktrace

Details
at BlazorTemplates.Tests.WebWorkerTemplateE2ETest.WaitForWorkerInit(IPage page, Int32 timeout)
   in /_/src/ProjectTemplates/test/Templates.Blazor.Tests/WebWorkerTemplateE2ETest.cs:line 437
at BlazorTemplates.Tests.WebWorkerTemplateE2ETest.TestWebWorkerInteraction(BrowserKind browserKind, String baseUri, String clientRoute)
   in /_/src/ProjectTemplates/test/Templates.Blazor.Tests/WebWorkerTemplateE2ETest.cs:line 337

Logs

Details
Windows-Release-xunit: all four WebWorkerTemplateE2ETest cases failed during worker initialization.
Build Analysis recorded the same missing-initializer exception on attempt 5.

Diagnostics were obtained from GitHub check annotations and Build Analysis; the complete Azure log was not retrieved.

Build

aspnetcore-ci build 1674185, Windows Server x64, source commit 632d9aa9a306639249db0169b1936cb217b459e6.

Activity

  1. self-assigned this
    on Nov 11, 2026
  2. added this to the 12.0-preview1 milestone on Nov 11, 2026
  3. added
    area-blazor
    on Nov 11, 2026
  4. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor

    Triage Summary

    Area: area-blazor (Blazor Web Worker template E2E tests, src/ProjectTemplates/test/Templates.Blazor.Tests/WebWorkerTemplateE2ETest.cs)
    Type: Task (re-enable skipped tests after a runtime fix flows)

    Potential Duplicates

    • None found

    Generated by Issue Triage Agent for dotnet/aspnetcore for #70502 · copilot · auto · 21 AIC · ⌖ 1.04 AIC · ⊞ 7.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-blazortest-failure

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions