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
Chromium with GebReportingSpec fails with groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method geb.report.Base64#decode. #292
Comments
Originally posted by Lee Davis. Curious if there is anything related to this issue noted on stacktrace with NULL and method overloading? http://stackoverflow.com/questions/12528823/unexpected-behavior-with-overloaded-methods It's a (somewhat little-known) oddity of Groovy's multi-dispatch mechanism, which as attempting to invoke the "most appropriate" method, in combination with the fact that the provided static type (in your case A or B) is not used as part of the dispatch mechanism. When you declare A a = null, what you get is not a null reference of type A, but a reference to NullObject. Ultimately, to safely handle possibly null parameters to overloaded methods, the caller must cast the argument, as in A a = null |
Originally posted by Lee Davis. https://github.com/geb/geb/blob/master/module/geb-core/src/main/groovy/geb/report/ScreenshotReporter.groovy#L37 |
Originally posted by Luke Daley. Thanks for the thorough report. We'll get this fixed. |
Originally posted by Lee Davis. Thanks Luke! Besides the problem listed above with the Base64 decoding, there appears to be a limitation with CEF3.1650 and earlier that breaks browser reporting used by GebReportingSpec . This has been addressed is CEF3.1750 and later. Also with CEF3.1750 and later it never hits the "NULL" scenario of |
Resolved |
Originally created by Lee Davis.
Ubuntu 13.10 - 3.11.0-18-generic
Java Version - 1.7.0_51
Grails 2.3.7
Testing a custom build of chromium, with chromedriver 2.9/selenium-chrome-driver:2.40.0
Running spec extending GebSpec everything works as expected, but as soon as I extend GebReportingSpec and run the same spec, I receive the following error:
{noformat}
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method geb.report.Base64#decode.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class [B]
[class [C]
[class java.lang.String]
at geb.report.ScreenshotReporter.writeReport(ScreenshotReporter.groovy:37)
at geb.report.CompositeReporter.writeReport(CompositeReporter.groovy:31)
at geb.Browser.report(Browser.groovy:775)
at geb.spock.GebReportingSpec.report(GebReportingSpec.groovy:44)
at geb.spock.GebReportingSpec.cleanup(GebReportingSpec.groovy:39)
{noformat}
The text was updated successfully, but these errors were encountered: