Skip to content

Fix loader has changed while resolving nodes in WebAuthnWebDriverTests #16463

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

Closed

Conversation

Kehrlann
Copy link
Contributor

@Kehrlann Kehrlann commented Jan 21, 2025

reviewer: @rwinch

Context

Test WebAuthnWebDriverTests.loginWhenNoValidAuthenticatorCredentialsThenRejects has been flakey ; throwing:

org.openqa.selenium.WebDriverException: aborted by navigation: loader has changed while resolving nodes
[... redacted ...]
    at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at [email protected]/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at [email protected]/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at [email protected]/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at app//org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
    at app//org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
    at app//org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
    at app//org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
    at app//org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53)
    at app//org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
    at app//org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:618)
    at app//org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
    at app//org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl(RemoteWebDriver.java:325)
    at app//org.springframework.security.config.annotation.configurers.WebAuthnWebDriverTests.lambda$loginWhenNoValidAuthenticatorCredentialsThenRejects$0(WebAuthnWebDriverTests.java:147)
    at app//org.springframework.security.config.annotation.configurers.WebAuthnWebDriverTests.lambda$await$8(WebAuthnWebDriverTests.java:283)
    at app//org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:203)
    at app//org.springframework.security.config.annotation.configurers.WebAuthnWebDriverTests.await(WebAuthnWebDriverTests.java:282)
    at app//org.springframework.security.config.annotation.configurers.WebAuthnWebDriverTests.loginWhenNoValidAuthenticatorCredentialsThenRejects(WebAuthnWebDriverTests.java:147)

The cause as a navigation by the browser during the getCurrentUrl call.

Fix: allow await to retry when encountering WebDriverException.

Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 21, 2025
@Kehrlann Kehrlann changed the base branch from main to 6.4.x January 21, 2025 22:03
@rwinch rwinch changed the title fix flakey test in WebAuthnWebDriverTests Fix loader has changed while resolving nodes in WebAuthnWebDriverTests Jan 22, 2025
@rwinch rwinch self-assigned this Jan 22, 2025
@rwinch rwinch added in: web An issue in web modules (web, webmvc) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 22, 2025
@rwinch rwinch added this to the 6.4.3 milestone Jan 22, 2025
@rwinch rwinch closed this in 028c212 Jan 22, 2025
@rwinch
Copy link
Member

rwinch commented Jan 22, 2025

Thanks for the Pull Request! This is now merged into 6.4.x and main 😄

kwondh5217 pushed a commit to kwondh5217/spring-security that referenced this pull request Feb 4, 2025
Closes spring-projectsgh-16463

Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
Signed-off-by: Daeho Kwon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants