SergeyPirogov / video-recorder-java

This library allows easily record video of your UI tests by just putting couple annotations.
http://automation-remarks.com/video-recorder-java/
MIT License
218 stars 65 forks source link

Cannot save video in Java11 (access to public member failed: VideoConfiguration.screenSize) #61

Closed asolntsev closed 5 years ago

asolntsev commented 5 years ago

Getting an exception when executing tests on Java11:

java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy20.screenSize(Unknown Source)
    at com.automation.remarks.video.recorder.monte.MonteRecorder.getScreenRecorder(MonteRecorder.java:76)
    at com.automation.remarks.video.recorder.monte.MonteRecorder.<init>(MonteRecorder.java:34)
    at com.automation.remarks.video.RecorderFactory.getRecorder(RecorderFactory.java:25)
    at com.automation.remarks.junit.VideoRule.starting(VideoRule.java:30)
    at org.junit.rules.TestWatcher.startingQuietly(TestWatcher.java:108)
    at org.junit.rules.TestWatcher.access$000(TestWatcher.java:46)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:53)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at play.test.PlayTestsRunner.run(PlayTestsRunner.java:91)
    at ui.PlayInstanceReuseTestsRunner.run(PlayInstanceReuseTestsRunner.java:21)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.IllegalAccessException: access to public member failed: com.automation.remarks.video.recorder.VideoConfiguration.screenSize[Ljava.lang.Object;@64a8c844/invokeSpecial, from com.automation.remarks.video.recorder.VideoConfiguration/2 (unnamed module @76b0bfab)
    at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:942)
    at java.base/java.lang.invoke.MethodHandles$Lookup.checkAccess(MethodHandles.java:2206)
    at java.base/java.lang.invoke.MethodHandles$Lookup.checkMethod(MethodHandles.java:2146)
    at java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:2290)
    at java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:2283)
    at java.base/java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1798)
    at org.aeonbits.owner.util.Java8SupportImpl.invokeDefaultMethod(Java8SupportImpl.java:30)
    at org.aeonbits.owner.util.Reflection.invokeDefaultMethod(Reflection.java:65)
    at org.aeonbits.owner.PropertiesInvocationHandler.invoke(PropertiesInvocationHandler.java:61)
    ... 28 more
SergeyPirogov commented 5 years ago

Fixed in release 2.0