Running Sikuli scripts built using Java in Jenkins VDI

Asked by Sivakumar S on 2018-01-18

We have extracted the sikuli binaries in to our framework and we are pointing to them while running in our local machines.

When running the Sikuli scripts built using Java in Jenkins VDIs, we are getting error message as

\libs\WinUtil.dll: Can't find dependant Libraries [error] ResourceLoaderBasic: loadLib: Check whethera valid Sikuli libs folder is in System path at runtime! [error] Terminating SikuliX after a Fatal error(110)!

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

What version of SikuliX?

Sivakumar S (shivshivku) said : #2

Version is SikuliX 1.0.1

RaiMan (raimund-hocke) said : #3

please upgrade to at least 1.1.1

I do not support prior versions any more.

Sivakumar S (shivshivku) said : #4

Thanks RaiMan, We have upgraded it to 1.1.1 and while running in Jenkins VDI, We are getting below error

[error] Location: outside any screen (425255008, 0) - subsequent actions might not work as expected

Sivakumar S (shivshivku) said : #5

The above win32.dll error is resolved, this is new error.

RaiMan (raimund-hocke) said : #6

run your script with -Dsikuli.Debug=3 added to the java run command and check in the output, what is said about the detected screen.

Sivakumar S (shivshivku) said : #7

I ran the script in Debug mode and the log is as follows, the screenshots were only black screen.

[debug] Debug.init: from sikuli.Debug: on: 3
[debug] RunTimeINIT: loadOptions: check: C:\Jenkins\workspace\Framework
[debug] RunTimeINIT: loadOptions: check: C:\Users\USERID
[debug] RunTimeINIT: loadOptions: check: C:\Users\UserID\AppData\Roaming\Sikulix\SikulixStore
[debug] RunTimeINIT: global init: entering as: API
[debug] RunTimeINIT: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[debug] RunTimeINIT: Monitor 0: (0, 0) 1364 x 768
[debug] RunTimeINIT: runs as sikulixapi.jar in: C:\Jenkins\workspace\ Framework\libs
[debug] RunTimeINIT: exists libs folder at: C:\Users\USERID\AppData\Roaming\Sikulix\SikulixLibs_201703300100
[debug] RunTimeINIT: addToWindowsSystemPath: added to systempath:
[debug] RunTimeINIT: checkJavaUsrPath: added to ClassLoader.usrPaths
***** show environment for API (build 201703300100)
user.home: C:\Users\USERID
user.dir (work dir): C:\Jenkins\workspace\Framework USERID C:\Users\USERID\AppData\Local\Temp\2
running 64Bit on Windows (6.1) from a jar
java 8-64 version 1.8.0_112-b15 vm 25.112-b15 class 52.0 arch amd64
app data folder: C:\Users\USERID\AppData\Roaming\Sikulix
libs folder: C:\Users\USERID\AppData\Roaming\Sikulix\SikulixLibs_201703300100
executing jar: C:\Jenkins\workspace\Framework\libs\sikulixapi.jar
*** classpath dump sikulix
73: /C:/Jenkins/workspace/Framework/libs/sikulixapi.jar
*** classpath dump end
***** show environment end
[debug] RunTimeAPI: global init: leaving
[debug] RunTimeAPI: initAPI: entering
[debug] RunTimeAPI: resourceList: enter
[debug] RunTimeAPI: resourceLocation: (class org.sikuli.script.RunTime) /Lib/sikuli
[debug] RunTimeAPI: resourceList: having jar: jar:file:/C:/Jenkins/workspace/Framework/libs/sikulixapi.jar!/Lib/sikuli
[debug] RunTimeAPI: files exported: 7 from: Lib/sikuli to:
[debug] RunTimeAPI: initAPI: leaving
[debug] RunTimeAPI: loadLib: VisionProxy.dll
[debug] Mouse: init start
[error] Location: outside any screen (490134752, 0) - subsequent actions might not work as expected
[debug] Mouse: init end
[debug] ImagePath: new BundlePath:
[debug] Image: loaded: /Image Repository/CRT/cfruserID.png (file:/C:/Jenkins/workspace/Framework/Image Repository/CRT/cfruserID.PNG)
[debug] Image: cached: /Image Repository/CRT/cfruserID.png (4 KB) (# 1 KB 4 -- 0 % of 64 MB)
[debug] Region: wait: waiting 3.0 secs for /Image Repository/CRT/cfruserID.png to appear in S(0)[0,0 1364x768]
[debug] Region: handleFindFailed: \Image Repository\CRT\cfruserID.png
[debug] Region: wait: /Image Repository/CRT/cfruserID.png did not appear [3026 msec]
Test Flushed
[debug] RunTimeAPI: final cleanup
[debug] FileManager: deleteFileOrFolder:

Sivakumar S (shivshivku) said : #8

Above script ran in an Remote VDI.

RaiMan (raimund-hocke) said : #9

If the screenshots are black screens, then you do not have an appropriate setup of the screen, that SikuliX accesses via Java Robot.

You have to correct this

BTW: what is Remote VDI?

Sivakumar S (shivshivku) said : #10

The scripts are running in Jenkins nodes(which I have told as Remote VDI). we cannot view the screen or access the screens. We are running selenium scripts in the Jenkins nodes and we are not having any issues, we are getting the screenshots properly. But when we run the sikuli scripts we are getting the screenshots as black.

RaiMan (raimund-hocke) said : #11

the Java GraphicsEnvironment.getLocalGraphicsEnvironment() apparently sees a monitor:
[debug] RunTimeINIT: Monitor 0: (0, 0) 1364 x 768

... but later Java Robot does not:
[debug] Mouse: init start
[error] Location: outside any screen (490134752, 0) - subsequent actions might not work as expected
[debug] Mouse: init end

Robot is used by SikuliX for capture, mouse and keyboard actions.

Selenium surely internally uses another technique for capturing.

More I cannot help you, sorry.

Can you help with this problem?

Provide an answer of your own, or ask Sivakumar S for more information if necessary.

To post a message you must log in.