You are viewing a plain text version of this content. The canonical link for it is here.
Posted to geb-notifications@groovy.apache.org by "jonnybot0 (via GitHub)" <gi...@apache.org> on 2025/09/18 03:16:24 UTC
Re: [I] Issue while updating to Geb 8 Micronaut [groovy-geb]
jonnybot0 commented on issue #284:
URL: https://github.com/apache/groovy-geb/issues/284#issuecomment-3305267063
I thought maybe the deep delegation was part of the issue, so I built a local snapshot of Geb with a GebSpec that didn't use Delegate:
```
import geb.Browser
import geb.test.GebTestManager
import geb.test.ManagedGebTest
import geb.transform.DynamicallyDispatchesToBrowser
import spock.lang.Specification
@DynamicallyDispatchesToBrowser
class GebSpec extends Specification implements ManagedGebTest {
private final static GebTestManager TEST_MANAGER = new SpockGebTestManagerBuilder().build()
GebTestManager getTestManager() {
TEST_MANAGER
}
Browser getBrowser() {
TEST_MANAGER.browser
}
}
```
That failed in the same way, so it's probably not that.
From reproducing this error, I can see that the invocation goes through `geb.spock.GebExtension#addManagerCalls`. This happens even if I remove the wrapper method in another tests with the same failure (`io.micronaut.security.token.jwt.cookie.JwtCookieAuthenticationSpec`):
```
def "verify jwt cookie authentication works"() {
given:
if (embeddedServer) {
def newBaseUrl = BaseUrlUtils.getBaseUrl(embeddedServer)
browser.baseUrl = newBaseUrl
}
```
Lines 65 and 75 are both in the thread dump:
```
at geb.spock.GebExtension$_addManagerCalls_closure3.doCall(GebExtension.groovy:75)
at geb.spock.GebExtension$_addManagerCalls_closure2.doCall(GebExtension.groovy:65)
```
Interestingly, I can reproduce the error on your branch even if I downgrade that branch in Micronaut Security to Geb 7.0.
```
groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: baseUrl for class: geb.Browser
at app//groovy.lang.GroovyObject.setProperty(GroovyObject.java:61)
at app//io.micronaut.security.token.jwt.cookie.JwtCookieAuthenticationSpec.getBrowser(JwtCookieAuthenticationSpec.groovy:62)
at app//geb.spock.GebSpec.methodMissing(GebSpec.groovy:1)
at io.micronaut.security.token.jwt.cookie.JwtCookieAuthenticationSpec.verify jwt cookie authentication works(JwtCookieAuthenticationSpec.groovy:147)
Suppressed: groovy.lang.MissingMethodException: No signature of method: geb.Browser.clearCookiesQuietly() is applicable for argument types: () values: []
at app//geb.test.GebTestManager.resetBrowser(GebTestManager.groovy:140)
at app//geb.test.GebTestManager.afterTest(GebTestManager.groovy:112)
at geb.spock.GebExtension.addManagerCalls_closure3(GebExtension.groovy:74)
at app//groovy.lang.Closure.call(Closure.java:433)
at app//org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:101)
at app//org.spockframework.runtime.model.MethodInfo.invoke(MethodInfo.java:156)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchic
```
The only other change I can see on your branch was updating Selenium. If I downgrade it back to 4.33.0, the test passes, albeit rather slowly. It also passes in Selenium 4.34. That does seem like a potential compatibility issue, but I can't speculate further what that is.
Hopefully downgrading to 4.34 will suffice as a workaround for the moment until we can get a deeper answer.
[thread_dump.txt](https://github.com/user-attachments/files/22398142/thread_dump.txt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: geb-notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org