Skip to content
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

spokystuff in lambda context #58

Open
webroboteu opened this issue Jun 11, 2019 · 5 comments
Open

spokystuff in lambda context #58

webroboteu opened this issue Jun 11, 2019 · 5 comments

Comments

@webroboteu
Copy link

I state that I started from your version 0.3.2 which seemed to me the most stable as far as the acquisition is concerned but in view of the new SQL like DSL it would be preferable to synchronize to your last release.
To isolate the error I directly launch the program from java from the lamdda. The problem actually occurs at the time of phantomjs orchestration while the executable is included in the aws lambda deployment package. Some idea?

Other question: How can I update the destination path of the log files /var/task/phantomjsdriver.log.

this is the exception
9/06/11 09:30:08 WARN Utils$: Retrying... 2 times left
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
System info: host: '9421a5d392ee', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.13.0-46-generic', java.version: '1.8.0_201'
Driver info: driver.version: PhantomJSDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:139)
at org.openqa.selenium.phantomjs.PhantomJSDriver.(PhantomJSDriver.java:115)
at org.openqa.selenium.phantomjs.PhantomJSDriver.(PhantomJSDriver.java:104)
at org.tribbloid.spookystuff.dsl.DriverFactories$PhantomJS$$anon$1.(DriverFactory.scala:121)
at org.tribbloid.spookystuff.dsl.DriverFactories$PhantomJS._newInstance(DriverFactory.scala:121)
at org.tribbloid.spookystuff.dsl.DriverFactory.newInstance(DriverFactory.scala:34)
at org.tribbloid.spookystuff.session.DriverSession$$anonfun$1$$anonfun$apply$1.apply(Session.scala:51)
at org.tribbloid.spookystuff.session.DriverSession$$anonfun$1$$anonfun$apply$1.apply(Session.scala:49)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.IllegalStateException: The process has not exited yet therefore no result is available ...
at org.apache.commons.exec.DefaultExecuteResultHandler.getException(DefaultExecuteResultHandler.java:76)
at org.openqa.selenium.os.UnixProcess.checkForError(UnixProcess.java:165)
at org.openqa.selenium.os.CommandLine.checkForError(CommandLine.java:183)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
at org.openqa.selenium.phantomjs.PhantomJSCommandExecutor.execute(PhantomJSCommandExecutor.java:78)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
... 17 more
19/06/11 09:30:08 INFO PhantomJSDriverService: executable: /tmp/phantomjs
19/06/11 09:30:08 INFO PhantomJSDriverService: port: 10415
19/06/11 09:30:08 INFO PhantomJSDriverService: arguments: [--webdriver=10415, --webdriver-logfile=/var/task/phantomjsdriver.log]
19/06/11 09:30:08 INFO PhantomJSDriverService: environment: {}
Unable to open file '/var/task/phantomjsdriver.log'

phantomjs://platform/fs.js:79 in open
phantomjs://platform/logger.js:95 in addLogFile
phantomjs://platform/config.js:76 in apply
phantomjs://platform/config.js:98 in init

@webroboteu
Copy link
Author

i'm adding this in this moment: PhantomJSDriverService service = new PhantomJSDriverService.Builder()
.usingPort(8080)
.usingPhantomJSExecutable(new File("/tmp/phantomjs"))
.withLogFile(new File("/tmp/phantomjs.log"))
.build();
Now i see

@webroboteu
Copy link
Author

would seem to work. Now I check on real lambda environment

@webroboteu
Copy link
Author

yes, resolved, I keep writing if anything else emerges

@webroboteu
Copy link
Author

other problem relative to autosave function
Caused by: java.io.IOException: Mkdirs failed to create temp/autosave/Wget('https/www.euroffice.it/search/term/stampanti'/MustHaveTitle)--1457

@tribbloid
Copy link
Owner

I'm investigating this, at this moment I don't have a stable EC2 access so I'll attempt to migrate some of my integration tests to yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants