Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Win: Phantom not executable. #10

Closed
1 task
ryan-roemer opened this issue Apr 7, 2015 · 0 comments · Fixed by #13
Closed
1 task

Win: Phantom not executable. #10

ryan-roemer opened this issue Apr 7, 2015 · 0 comments · Fixed by #13
Labels

Comments

@ryan-roemer
Copy link
Member

Error from npm test.

[SERVER] [stderr] 15:19:06.455 ERROR - org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "X:\scm\fmd\rowdy\node_modules\.bin\phantomjs" (in directory "."):
CreateProcess error=193, %1 is not a valid Win32 application)
[SERVER] [stderr] 15:19:06.455 DEBUG - Exception: [null, newSession {desiredCapabilities=Capabilities [{browserName=phantomjs, javascriptEnabled=true, version=, platform=ANY}]}]

... but weirdly:

X:\scm\fmd\rowdy>node_modules\.bin\phantomjs
phantomjs> phantom.exit()

works.

Potentially related issues:

Full npm test works with:

diff --git a/lib/server.js b/lib/server.js
index 8080633..ee5b006 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -86,7 +86,10 @@ Server.prototype.start = function (callback) {

   // Start selenium process.
   selenium.start({
-    seleniumArgs: debug ? ["-debug"] : [],
+    seleniumArgs: [].concat(
+      debug ? ["-debug"] : [],
+     ["-Dphantomjs.binary.path=..\\..\\node_modules\\phantomjs\\lib\\phantom\\phantomjs.exe"]
+    ),
     spawnOptions: {
       stdio: "pipe"
     },

TASK:

  • Figure out how to work this better into Rowdy config / command line defaults, etc.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant