Fix @onclick:preventDefault not working with enhanced navigation #64917
.NET Result Analysis
Details
Tip
To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.
Build Failures
aspnetcore-components-e2e / Test: Blazor E2E tests on Linux / Run E2E tests
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌Bash exited with code '1'.
Test Failures (15 tests failed)
🔹 [All failing tests from aspnetcore-ci]
- Exception Message
Assert.Collection() Failure: Item comparison failure ↓ (pos 1) Collection: [["DateOnlyWithRange"] = ["Date must be between 2023-01-01 and 2025-12-31"], ["DateTimeWithRange"] = ["DateTime must be between 2023-01-01 and 2025-12-31"], ["DecimalWithRange"] = ["Amount must be between 0.1 and 100.5"], ["TimeOnlyWithRequiredValue"] = ["The TimeOnlyWithRequiredValue field is required."], ["TimeSpanWithHourRange"] = ["Hours must be between 0 and 12"], ···] Error: Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "DecimalWithRange" Actual: "DateTimeWithRange" ↑ (pos 1) Stack Trace: D:�_work1ssrcValidation estMicrosoft.Extensions.Validation.GeneratorTestsValidationsGenerator.Parsable.cs(96,0): at Microsoft.Extensions.Validation.GeneratorTests.ValidationsGeneratorTests.<>c.<CanValidateTypeWithParsableProperties>b__15_3(KeyValuePair`2 error)- CallStack
at Microsoft.Extensions.Validation.GeneratorTests.ValidationsGeneratorTests.<CanValidateTypeWithParsableProperties>b__15_0(Endpoint endpoint, IServiceProvider serviceProvider) in D:\a\_work\1\s\src\Validation\test\Microsoft.Extensions.Validation.GeneratorTests\ValidationsGenerator.Parsable.cs:line 88 at Microsoft.Extensions.Validation.GeneratorTests.ValidationsGeneratorTestBase.VerifyEndpoint(Compilation compilation, String routePattern, Func`3 verifyFunc) in D:\a\_work\1\s\src\Validation\test\Microsoft.Extensions.Validation.GeneratorTests\ValidationsGeneratorTestBase.cs:line 120 at Microsoft.Extensions.Validation.GeneratorTests.ValidationsGeneratorTests.CanValidateTypeWithParsableProperties() in D:\a\_work\1\s\src\Validation\test\Microsoft.Extensions.Validation.GeneratorTests\ValidationsGenerator.Parsable.cs:line 65 --- End of stack trace from previous location ---
❌ Microsoft.Extensions.Validation.GeneratorTests--net10.0.WorkItemExecution [Console] [Details] [Artifacts] [11.00% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
This is a helix work item crash with status: BadExit. To investigate look the [Console log] / navigate to [Helix Artifacts]
Failing Configurations (3)
❌ Microsoft.Extensions.Validation.GeneratorTests.ValidationsGeneratorTests.CanValidateTypeWithParsableProperties [Console] [Details] [Artifacts] [24.95% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (3)
🔹 [All failing tests from aspnetcore-components-e2e]
- Exception Message
OpenQA.Selenium.StaleElementReferenceException : stale element reference: stale element not found (Session info: chrome=143.0.7499.109); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#staleelementreferenceexception
- CallStack
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebElement.get_Text() at Microsoft.AspNetCore.Components.E2ETest.Tests.VirtualizationTest.<>c__DisplayClass21_0.<CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax>g__GetVisibleItemIndices|3() in /home/vsts/work/1/s/src/Components/test/E2ETest/Tests/VirtualizationTest.cs:line 658 at Microsoft.AspNetCore.Components.E2ETest.Tests.VirtualizationTest.CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax() in /home/vsts/work/1/s/src/Components/test/E2ETest/Tests/VirtualizationTest.cs:line 582 at InvokeStub_VirtualizationTest.CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax(Object, Object, IntPtr*) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
- Exception Message
OpenQA.Selenium.BrowserAssertFailedException : Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ Expected: False Actual: True at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 154 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass20_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 91 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass21_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 109 Screen shot captured at '/home/vsts/work/1/s/src/Components/test/E2ETest/bin/screenshots/3a80fc080d4b490991053d0fab48fcee.png' Encountered browser errors [2026-01-07T18:56:52Z] [Warning] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:59608 "[2026-01-07T18:56:52.322Z] Warning: Initializer 'http://127.0.0.1:36537/subdir/BasicTestApp.vpc4xa0l6h.lib.module.js' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead." [2026-01-07T18:56:52Z] [Warning] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:59608 "[2026-01-07T18:56:52.322Z] Warning: Initializer 'http://127.0.0.1:36537/subdir/JSInitializers/Classic/BasicTestApp.j2kfp6tx1s.lib.module.js' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead." [2026-01-07T18:56:52Z] [Info] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:73094 "[2026-01-07T18:56:52.397Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:36537/subdir/_blazor'." [2026-01-07T18:56:52Z] [Info] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:73094 "[2026-01-07T18:56:52.402Z] Information: WebSocket connected to ws://127.0.0.1:36537/subdir/_blazor?id=mzrDxFTEmEXZFKAnu7sFRg." [2026-01-07T18:56:52Z] [Info] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:73094 "[2026-01-07T18:56:52.451Z] Information: Connection disconnected." [2026-01-07T18:56:52Z] [Warning] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:59608 "[2026-01-07T18:56:52.538Z] Warning: Initializer 'http://127.0.0.1:36537/subdir/BasicTestApp.vpc4xa0l6h.lib.module.js' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead." [2026-01-07T18:56:52Z] [Warning] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:59608 "[2026-01-07T18:56:52.539Z] Warning: Initializer 'http://127.0.0.1:36537/subdir/JSInitializers/Classic/BasicTestApp.j2kfp6tx1s.lib.module.js' will be ignored because multiple runtimes are available. Use 'before(Web|WebAssembly|Server)Start' and 'after(Web|WebAssembly|Server)Started' instead." [2026-01-07T18:56:52Z] [Info] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:73094 "[2026-01-07T18:56:52.542Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:36537/subdir/_blazor'." [2026-01-07T18:56:52Z] [Info] http://127.0.0.1:36537/subdir/_framework/blazor.web.8tw1w2j9ea.js 0:73094 "[2026-01-07T18:56:52.552Z] Information: WebSocket connected to ws://127.0.0.1:36537/subdir/_blazor?id=6oMK6Uq9_i_78MiD9_1LrQ."Page content: <head><meta charset="utf-8"> <base href="/subdir/"> </head> <body><nav><a href="nav">Home</a> | <a href="streaming">Streaming</a> | <a href="large-streaming">Large Streaming</a> | <a href="streaming-interactivity" class="active" aria-current="page">Streaming with interactivity</a> | <a href="nav/give-404-with-content">Error page with 404 content</a> | <a href="nav/nonexistent-page">Error page with no content</a> | <a href="nav/non-html-response">Non-HTML page</a> | <a href="nav/non-blazor-html-response">Non-Blazor HTML page</a> | <a href="nav/scroll-to- CallStack
at Microsoft.AspNetCore.E2ETesting.WaitAssert.WaitAssertCore[TResult](IWebDriver driver, Func`1 assertion, TimeSpan timeout) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 137 at Microsoft.AspNetCore.E2ETesting.WaitAssert.Equal[T](IWebDriver driver, T expected, Func`1 actual) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 27 at Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.RootComponentOperation_Add_WaitsUntilReconnection() in /home/vsts/work/1/s/src/Components/test/E2ETest/ServerRenderingTests/EndpointsServerReconnectionTest.cs:line 101 at InvokeStub_EndpointsServerReconnectionTest.RootComponentOperation_Add_WaitsUntilReconnection(Object, Object, IntPtr*) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) ----- Inner Stack Trace ----- at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass20_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 91 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass21_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 109
- Exception Message
OpenQA.Selenium.BrowserAssertFailedException : OpenQA.Selenium.JavaScriptException: javascript error: Cannot read properties of undefined (reading 'style') (Session info: chrome=143.0.7499.109) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.<>c__DisplayClass6_0.<RootComponentOperation_Remove_WaitsUntilReconnection>b__3() in /home/vsts/work/1/s/src/Components/test/E2ETest/ServerRenderingTests/EndpointsServerReconnectionTest.cs:line 172 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass20_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 91 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass21_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 109 Screen shot captured at '/home/vsts/work/1/s/src/Components/test/E2ETest/bin/screenshots/72f413e40eee44668c5000e442d8083a.png' Page content: <head><meta charset="utf-8"> <base href="/subdir/"> </head> <body><nav><a href="nav">Home</a> | <a href="streaming">Streaming</a> | <a href="large-streaming">Large Streaming</a> | <a href="streaming-interactivity" class="active" aria-current="page">Streaming with interactivity</a> | <a href="nav/give-404-with-content">Error page with 404 content</a> | <a href="nav/nonexistent-page">Error page with no content</a> | <a href="nav/non-html-response">Non-HTML page</a> | <a href="nav/non-blazor-html-response">Non-Blazor HTML page</a> | <a href="nav/scroll-to-hash#some-content">Scroll to hash</a> | <a href="nav/throw-while-streaming">Error while streaming</a> | <a href="nav/interactive-component-navigation/server">Interactive component navigation (server)</a> | <a href="nav/interactive-component-navigation/webassembly">Interactive component navigation (webassembly)</a> | <a href="nav/list-headers">List headers</a> | <a href="nav/preserve-content">Preserve content</a> <span data-enhance-nav="false"><a href="nav/other"><span id="not-enhanced-nav-link">Other (no enhanced nav)</span></a> | <span data-enhance-nav=""><a href="nav/other">Other (re-enabled enhanced nav)</a> | </span></span> <a href="nav/location-changed/server">LocationChanged/LocationChanging event (server)</a> <a href="nav/location-changed/wasm">LocationChanged/LocationChanging event (wasm)</a> <a href="nav/location-changed/server-and-wasm">LocationChanged/LocationChanging event (server-and-wasm)</a> <a href="nav/null-parameter/server">Null component parameter (server)</a> <a href="nav/null-parameter/wasm">Null component parameter (wasm)</a> <a href="nav/prevent-default-link">PreventDefault link test</a> <br> <a href="nav/other" data-enhance-nav="false"><svg width="100" height="100" id="svg-in-anchor-not-enhanced-nav-link"><rect width="50" height="50" style="fill:rgb(0,0,255);"></rect></svg></a> <svg width="100px" height="30px" id="svg-nav-link"><a href="nav/other"><text x="15" y="15" font-size="15">Other SVG</text></a></svg> <br> <svg width="200px" height="30px" id="svg-not-enhanced-nav-link" data-enhance-nav="false"><a href="nav/other"><text x="15" y="15" font-size="15">Other SVG (no enhanced nav)</text></a></svg> <br></nav> <hr> <main><!--bl:36--><h1>Streaming Rendering with Interactivity</h1><!--bl:37--><h3>Current status:</h3>
<p id="status">Not streaming</p><p>
All counter action links will work via enhanced navigation. Interactivity will start immediately
for newly-added components.
</p>
<p>
When running this page manually, you can click the links normally an- CallStack
at Microsoft.AspNetCore.E2ETesting.WaitAssert.WaitAssertCore[TResult](IWebDriver driver, Func`1 assertion, TimeSpan timeout) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 137 at Microsoft.AspNetCore.E2ETesting.WaitAssert.Equal[T](IWebDriver driver, T expected, Func`1 actual) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 27 at Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.RootComponentOperation_Remove_WaitsUntilReconnection() in /home/vsts/work/1/s/src/Components/test/E2ETest/ServerRenderingTests/EndpointsServerReconnectionTest.cs:line 172 at InvokeStub_EndpointsServerReconnectionTest.RootComponentOperation_Remove_WaitsUntilReconnection(Object, Object, IntPtr*) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) ----- Inner Stack Trace ----- at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.<>c__DisplayClass6_0.<RootComponentOperation_Remove_WaitsUntilReconnection>b__3() in /home/vsts/work/1/s/src/Components/test/E2ETest/ServerRenderingTests/EndpointsServerReconnectionTest.cs:line 172 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass20_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 91 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass21_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 109
❌ Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests.ServerVirtualizationTest.CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax [Details] [2.27% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configuration
❌ Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.RootComponentOperation_Add_WaitsUntilReconnection [Details] [2.02% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configuration
❌ Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.EndpointsServerReconnectionTest.RootComponentOperation_Remove_WaitsUntilReconnection [Details] [2.02% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]