Error "MissingPropertyException: Unable to resolve atChecker" with Geb 2.3.1

306 views
Skip to first unread message

Klaus L.

unread,
May 14, 2019, 5:50:53 AM5/14/19
to Geb User Mailing List
Hi all,

I am using Geb in connection with Cucumber in a Maven project.
(Groovy 2.4.15, Cucumber (cucumber-groovy + cucumber-junit) 4.2.0, JUnit 4.12, and some other libraries.

When upgrading my Geb dependency from 2.2 to 2.3.1, this exception occurs apparently on each page object navigation (using Browser.to()):

groovy.lang.MissingPropertyException: Unable to resolve atChecker as content for automation.pages.<GEB_PAGE_OBJECT>, or as a property on its Navigator context. Is atChecker a class you forgot to import?
 at geb
.content.PageContentSupport.propertyMissing(PageContentSupport.groovy:47)
 at geb
.content.PageContentSupport$propertyMissing.call(Unknown Source)
 at geb
.Page.propertyMissing(Page.groovy:112)
 at geb
.Page.getShouldVerifyAtImplicitly(Page.groovy:477)
 at geb
.Browser.to(Browser.groovy:560)
 at geb
.Browser$to$4.callCurrent(Unknown Source)
 at geb
.Browser$to$4.callCurrent(Unknown Source)
 at geb
.Browser.to(Browser.groovy:537)
 at geb
.Browser$to$3.callCurrent(Unknown Source)
 at geb
.Browser.to(Browser.groovy:526)
 at geb
.Browser.to(Browser.groovy)
 at geb
.binding.BindingUpdater$InvocationForwarding.doCall(BindingUpdater.groovy:106)
 at automation
.UITSteps$_run_closure114.doCall(UITSteps.groovy:934)
 at
✽.<CUCUMBER_STEP_NAME>(src/test/resources/features/UAT/Smoketest/Smoketest_UIT.feature:20)



Although 
private Closure getAtChecker() { getClass().at }
is defined in geb.Page just some lines below getShouldVerifyAtImplicitly(), the runtime does not seem to find it.

Have you seen this behaviour before, or what would you suggest?

Alexander Kriegisch

unread,
May 14, 2019, 8:41:24 PM5/14/19
to geb-...@googlegroups.com

My suggestion would be to provide an MCVE. Thank you. :-)
--
Alexander Kriegisch
https://scrum-master.de

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/9596bbfc-4e4b-4859-a060-3fceb039b4ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trinidad Esparza

unread,
May 14, 2019, 11:13:29 PM5/14/19
to Geb User Mailing List
We recently updated the Geb project examples with all proper dependencies .

https://github.com/geb/geb-example-cucumber-jvm/blob/master/build.gradle

If this doesn’t work let us know but please provide example code.

Klaus L.

unread,
May 16, 2019, 4:28:26 AM5/16/19
to Geb User Mailing List
Thanks for responding :)

Providing an MCVE is not that easy here though, because we have "modular" setup with a shared library (bringing in a large GebConfig and necessary dependencies), and actual product-related test projects. So I would have to flatten the whole structure and compose a whole new small test project e.g. for google.com :(

@Trinidad: Thanks for the reference!
However it seems you are on a quite outdated version of cucumber (1.2.5 vs. 4.3.x), so I do not know if we are comparable here.

But focusing on the other difference (Gradle vs. Maven), I played around with the configs and found something peculiar:
When I modify my maven-failsafe-plugin config to reuse the Maven JVM process ( <forkCount>0</forkCount> ) then the error disappears!
This is no feasible workaround for me for other reasons, but an interesting observation, I think :-)

Klaus L.

unread,
May 17, 2019, 10:46:51 AM5/17/19
to Geb User Mailing List
I admit being tempted to just roll back to Geb 2.2 and abandon the topic.
But that cannot be the solution, right?

So I built up a new Geb/Cucumber Maven project, boiling it down to an MCVE (see attached zip file).

At least now I am able to link the problem to JavaFX:
We developed a little GroovyFX dialogue running in a separate thread, allowing to interact with the running Maven Cucumber job (pausing at will, evaluating some expressions etc.).
And now the MissingPropertyException arises if
  • Geb has version 2.3.1 AND 
  • JavaFX "Application" is launched during Cucumber World hook.
Reverting to Geb 2.2 OR removing the GroovyFX call both remove the Exception.

Now I am completely lost! How can those two seemingly unrelated "things" interfere??? :-(
Any ideas, anyone?

Klaus

PS: Stacktrace from MCVE project for reference:

groovy.lang.MissingPropertyException: Unable to resolve atChecker as content for automation.EcosiaStartPage, or as a property on its Navigator context. Is atChecker a class you forgot to import?
at geb.content.PageContentSupport.propertyMissing(PageContentSupport.groovy:47)
at geb.content.PageContentSupport$propertyMissing.call(Unknown Source)
at geb.Page.propertyMissing(Page.groovy:112)
at geb.Page.getShouldVerifyAtImplicitly(Page.groovy:477)
at geb.Browser.to(Browser.groovy:560)
at geb.Browser$to$1.callCurrent(Unknown Source)
at geb.Browser.to(Browser.groovy:537)
at geb.Browser$to$0.callCurrent(Unknown Source)
at geb.Browser.to(Browser.groovy:526)
at geb.Browser.to(Browser.groovy)
at geb.binding.BindingUpdater$InvocationForwarding.doCall(BindingUpdater.groovy:106)
at automation.EcosiaSteps$_run_closure1.doCall(EcosiaSteps.groovy:6)
at ✽.I open Ecosia(src/test/resources/features/Ecosia.feature:4)
geb-atchecker-mcve.zip

Marcin Erdmann

unread,
May 17, 2019, 1:16:38 PM5/17/19
to geb-...@googlegroups.com
Klaus,

Thanks for spending the time to provide an MCVE.

I have to admit I have no idea what exactly is going on here, but what I'm certain of is:

1. This is happening in 2.3.1 because in that version private geb.Page#getAtChecker method has been introduced and it does not exist in 2.2, see:
vs

In your stacktrace getAtChecker() is called from getShouldVerifyAtImplicitly() but that method does not exist in 2.2 so I showed a different code path as an example.

2. Initialising Groovy FX has to be doing something very strange to Groovy internals or class loading if after it happens out of a sudden private properties are not found when accessed from within the class declaring them.

We could potentially cater for GroovyFX causing this behaviour but I'm not sure that if we fix this particular instance a similar issue would not pop up elsewhere or that we actually should. The code in question is valid Groovy code and all tests in our suite pass so why should we be forced not to use it? I'd be inclined to suggest going and asking on the GroovyFX mailing list but the project seems not to be actively developed and the mailing list page asks to post on the general Groovy User mailing list so I don't expect that to yield any results. Another thing I'd potentially try is to use plain JavaFX instead of GroovyFX - the scene you are building seems simple enough so I'd expect using plain JavaFX not to be too big of an inconvenience in this case.

Cheers,
Marcin

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.

AlexB

unread,
May 20, 2019, 6:53:11 AM5/20/19
to Geb User Mailing List
Hi Everyone!

I have the same issue on a project with Groovy+Maven+Geb-Spock. How do I vote for this issue to be fixed asap?

Brian Kotek

unread,
May 20, 2019, 10:00:21 AM5/20/19
to geb-...@googlegroups.com
You are also using GroovyFX in your Geb project?

On Mon, May 20, 2019 at 6:53 AM AlexB <bolzhel...@gmail.com> wrote:
Hi Everyone!

I have the same issue on a project with Groovy+Maven+Geb-Spock. How do I vote for this issue to be fixed asap?

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.

AlexB

unread,
May 29, 2019, 6:26:38 AM5/29/19
to Geb User Mailing List
No, we don't use GroovyFX.


On Monday, May 20, 2019 at 5:00:21 PM UTC+3, brian428 wrote:
You are also using GroovyFX in your Geb project?
On Mon, May 20, 2019 at 6:53 AM AlexB <bolzhel...@gmail.com> wrote:
Hi Everyone!

I have the same issue on a project with Groovy+Maven+Geb-Spock. How do I vote for this issue to be fixed asap?

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-...@googlegroups.com.

Marcin Erdmann

unread,
May 29, 2019, 7:05:06 AM5/29/19
to geb-...@googlegroups.com
Any chance you would be able to provide a reproducible sample, please? I won't be able to track down the issue without it just based on the information that you have provided so far, unfortunately.

Cheers,
Marcin

To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages