Skip to content

Quarantine CanUseAntiforgeryAfterInitialRender #57766

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

Open
BrennanConroy opened this issue Sep 9, 2024 · 0 comments
Open

Quarantine CanUseAntiforgeryAfterInitialRender #57766

BrennanConroy opened this issue Sep 9, 2024 · 0 comments
Labels
area-blazor Includes: Blazor, Razor Components test-failure
Milestone

Comments

@BrennanConroy
Copy link
Member

Failing Test(s)

  • Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.FormHandlingTests.AntiforgeryTests.CanUseAntiforgeryAfterInitialRender(target: "server")

Error Message

OpenQA.Selenium.BrowserAssertFailedException : OpenQA.Selenium.StaleElementReferenceException: stale element reference: stale element not found in the current frame
(Session info: chrome=128.0.6613.113); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary2 parameters)    at OpenQA.Selenium.WebDriver.InternalExecute(String driverCommandToExecute, Dictionary2 parameters)
at OpenQA.Selenium.WebElement.get_Text()
at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass17_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 83
at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass18_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 101
Screen shot captured at '/home/vsts/work/1/s/src/Components/test/E2ETest/bin/screenshots/c495220e2c5746aa8c1c64c9d9662a14.png'
Encountered browser errors
[2024-09-09T13:31:51Z] [Warning] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:39511 "[2024-09-09T13:31:51.002Z] Warning: Initializer 'http://127.0.0.1:38431/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."
[2024-09-09T13:31:51Z] [Warning] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:39511 "[2024-09-09T13:31:51.002Z] Warning: Initializer 'http://127.0.0.1:38431/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."
[2024-09-09T13:31:51Z] [Info] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:47116 "[2024-09-09T13:31:51.005Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:38431/subdir/_blazor'."
[2024-09-09T13:31:51Z] [Info] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:47116 "[2024-09-09T13:31:51.022Z] Information: WebSocket connected to ws://127.0.0.1:38431/subdir/_blazor?id=JFDl-u5JLDrfBiJ07x58EA."
[2024-09-09T13:31:51Z] [Warning] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:39511 "[2024-09-09T13:31:51.260Z] Warning: Initializer 'http://127.0.0.1:38431/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."
[2024-09-09T13:31:51Z] [Warning] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:39511 "[2024-09-09T13:31:51.260Z] Warning: Initializer 'http://127.0.0.1:38431/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."
[2024-09-09T13:31:51Z] [Info] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:47116 "[2024-09-09T13:31:51.262Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:38431/subdir/_blazor'."
[2024-09-09T13:31:51Z] [Info] http://127.0.0.1:38431/subdir/_framework/blazor.web.js 0:47116 "[2024-09-09T13:31:51.275Z] Information: WebSocket connected to ws://127.0.0.1:38431/subdir/_blazor?id=tEwvMnSHGk1f2w1urNqyeQ."Page content:


<head><meta charset="utf-8">
    <base href="/subdir/">
    <title>Razor Components Forms</title></head>
<body>
Form test cases

Test


            <blazor-focus-on-navigate selector="[data-focus-on-navigate]"></blazor-focus-on-navigate>

Stacktrace

   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 129
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.WaitAssertCore(IWebDriver driver, Action assertion, TimeSpan timeout) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 83
   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.FormHandlingTests.AntiforgeryTests.CanUseAntiforgeryAfterInitialRender(String target) in /home/vsts/work/1/s/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/AntiforgeryTests.cs:line 49
   at InvokeStub_AntiforgeryTests.CanUseAntiforgeryAfterInitialRender(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
----- 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.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebElement.get_Text()
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass17_0.<WaitAssertCore>b__0() in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 83
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass18_0`1.<WaitAssertCore>b__0(IWebDriver _) in /home/vsts/work/1/s/src/Shared/E2ETesting/WaitAssert.cs:line 101

Logs

Same as error message

Build

https://dev.azure.com/dnceng-public/public/_build/results?buildId=801819&view=ms.vss-test-web.build-test-results-tab&runId=20696790&resultId=101036&paneView=debug

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 test-failure
Projects
None yet
Development

No branches or pull requests

2 participants