robotframework-SikuliLibrary icon indicating copy to clipboard operation
robotframework-SikuliLibrary copied to clipboard

[Mac] SikuliLibrary keep throwing error on macOS

Open cplus02 opened this issue 6 years ago • 11 comments

Environment

OS: macOS Mojave Python: Python 3.7.0 / virtualenv JDK: JDK8 update181 SikuliLibrary: Latest source code from GitHub, built with maven on macOS Mojave, run setup.py to install

Description

The code of Robot Framework:

***Settings***
Library                     SikuliLibrary  mode=NEW
Suite Setup                 Start Sikuli Process
Suite Teardown              Stop Remote Server

***Test Cases***
Test
    Add Image Path  ${CURDIR}/img
    Click  test.png

On macOS, when run keywords to do some actions(e.g. Click), SikuliLibrary kept throwing error in Robot Framework test result: Connection to remote server broken: Remote end closed connection without response

and I checked the SikuliLibrary's log:

0 [main] INFO org.robotframework.remoteserver.RemoteServer  - Mapped path / to library com.github.rainmanwy.robotframework.sikulilib.SikuliLibrary.
1 [main] INFO org.robotframework.remoteserver.RemoteServer  - Robot Framework remote server starting
1 [main] INFO org.eclipse.jetty.server.Server  - jetty-7.x.y-SNAPSHOT
17 [main] INFO org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.s.ServletContextHandler{/,null}
68 [main] INFO org.eclipse.jetty.server.AbstractConnector  - Started [email protected]:54114
68 [main] INFO org.robotframework.remoteserver.RemoteServer  - Robot Framework remote server started on port 54114.
3828 [qtp344560770-11] WARN org.eclipse.jetty.servlet.ServletHandler  - /
org.apache.xmlrpc.XmlRpcException: I/O error while processing request: null
	at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:247)
	at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:112)
	at org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:196)
	at org.robotframework.remoteserver.servlet.RemoteServerServlet.doPost(RemoteServerServlet.java:122)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.robotframework.remoteserver.servlet.RemoteServerServlet.service(RemoteServerServlet.java:102)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:348)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
	at java.lang.Thread.run(Thread.java:748)

Full log: Sikuli_java_stdout_1540398302.533548.txt

cplus02 avatar Oct 24 '18 17:10 cplus02

@cplus02 , could you check whether any depended packages are installed in your env. https://sikulix-2014.readthedocs.io/en/latest/news.html#newin114

btw, i have updated sikulixapi version to 1.1.4.

rainmanwy avatar Oct 26 '18 05:10 rainmanwy

Hi,

@cplus02 , could you check whether any depended packages are installed in your env. https://sikulix-2014.readthedocs.io/en/latest/news.html#newin114

The link above shows nothing, but I believe it should work since the scripts worked in SikuliIDE

btw, i have updated sikulixapi version to 1.1.4.

I downloaded and tried again, the error still existed.

Any other ideas? Thanks :-)

cplus02 avatar Oct 26 '18 09:10 cplus02

@cplus02 , i am sorry, i haven't Mac to test it.

How about the SikuliIDE version you are using? Maybe you could modify sikulixapi version in pom file to match the version of SikuliIDE version you are using.

As i know when java process throw such exception, it is mostly because of the env problem.

rainmanwy avatar Oct 29 '18 05:10 rainmanwy

@rainmanwy ,

Thanks, I will try and give a feedback.

cplus02 avatar Nov 01 '18 03:11 cplus02

@rainmanwy , The sikuliapi version is the same as the IDE (1.1.4), no not sure why it doesn't work

cplus02 avatar Nov 01 '18 03:11 cplus02

@cplus02 , seems i could not give more help.

In my Linux env, sikulix will create a folder in HOME folder, like "~/.Sikulix " You may have a try to remove this folder, and execute SikuliLibrary again.

Maybe i could check sikuli's logging, and have a try to get more information from sikulix.

rainmanwy avatar Nov 05 '18 05:11 rainmanwy

Hi @rainmanwy , Today I tried again but got different error: 2018-12-20 18 04 07

I tried to install openCV and build from source with brew, but still no luck. Or should I put the native library in somewhere?

cplus02 avatar Dec 20 '18 10:12 cplus02

sorry for the inconvenience ;-)

look: https://github.com/RaiMan/SikuliX1/issues/58

Latest build of sikulixapi.jar (#150) should work again

RaiMan avatar Dec 20 '18 10:12 RaiMan

thanks @RaiMan , Which maven repository you are using to publish SikuliX. I am using sonatype in pom.

rainmanwy avatar Dec 21 '18 01:12 rainmanwy

Uuups, I have to say sorry once again :-(

finally fixed build #153 / snapshot 20181220.142335-67

Which maven repository you are using to publish SikuliX

Yes, snapshots to OSSRH and finals to MavenCentral (no final for 1.1.3 ever, next final will be for 1.1.4 later in 1st quarter 2019)

RaiMan avatar Dec 21 '18 09:12 RaiMan

Hi @RaiMan @rainmanwy So on macOS, I still need to compile SikuliLibrary manually, right? Any setting I need to modify to compile it?

cplus02 avatar Jan 25 '19 10:01 cplus02