laurentj / slimerjs

A scriptable browser like PhantomJS, based on Firefox
http://slimerjs.org
Other
3k stars 258 forks source link

Error slimerjs 1.0.0-beta.1 ubuntu 16.04 headless #683

Closed xaiborweb closed 6 years ago

xaiborweb commented 6 years ago

versions

Steps to reproduce the issue

perform the following steps in the installation

apt-get install firefox
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1 libdbus-glib-1-2
cd ~
export SLIMER_JS="slimerjs-1.0.0-beta.1"
wget https://download.slimerjs.org/releases/1.0.0-beta.1/$SLIMER_JS.tar.bz2
sudo tar xvjf $SLIMER_JS.tar.bz2
sudo mv $SLIMER_JS /usr/local/share
sudo ln -sf /usr/local/share/$SLIMER_JS/slimerjs /usr/local/bin
export SLIMERJSLAUNCHER=/usr/bin/firefox
export MOZ_HEADLESS = 1
slimerjs --version

I create a file called html.js in the path /usr/local/share/slimerjs-1.0.0-beta.1 with the following "console.log("Hello Slimer!"); slimer.exit();;

Actual results:

run from the console in different ways and gives me the difliertes errors slimerjs /usr/local/share/slimerjs-1.0.0-beta.1/html.js

Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message

slimerjs /usr/local/share/slimerjs-1.0.0-beta.1/html.js --debug=true

Error: no DISPLAY environment variable specified
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message

slimerjs --headless /usr/local/share/slimerjs-1.0.0-beta.1/html.js --debug=true

*** You are running in headless mode.
2018-02-20T15:30:11.346Z [DEBUG] Gecko version: 58.0.2
2018-02-20T15:30:11.349Z [DEBUG] script args: /usr/local/share/slimerjs-1.0.0-be                                                                                                                                                             ta.1/html.js
2018-02-20T15:30:11.349Z [DEBUG] Configuration: debug=true
2018-02-20T15:30:11.349Z [DEBUG] Configuration: Script=/usr/local/share/slimerjs                                                                                                                                                             -1.0.0-beta.1/html.js
2018-02-20T15:30:11.349Z [DEBUG] Configuration: workingDirectory=/root
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: SyntaxError: test for equa                                                                                                                                                             lity (==) mistyped as assignment (=)?
JavaScript strict warning: coffee-scripts.js, line 8: ReferenceError: reference                                                                                                                                                              to undefined property "fs"
JavaScript strict warning: resource://slimerjs/slCookiesManager.jsm, line 16: Re                                                                                                                                                             ferenceError: reference to undefined property "nsICookieManager2"

Script Error: Component returned failure code: 0x80570018 (NS_ERROR_XPC_BAD_IID)                                                                                                                                                              [nsIJSCID.getService]
       Stack:
         -> resource://slimerjs/slCookiesManager.jsm: 15
         -> resource://slimerjs/slimer-sdk/phantom.jsm: 11
         -> resource://slimerjs/slLauncher.jsm: 485 (in function load)
         -> resource://slimerjs/slLauncher.jsm: 122 (in function launchMainScrip                                                                                                                                                             t)
         -> chrome://slimerjs/content/slimerjs.js: 20 (in function startup)
         -> chrome://slimerjs/content/slimerjs.xul: 1 (in function onload)

please help.

laurentj commented 6 years ago

Well, the error is understandable, right? ;-)

Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.

It is already fixed in the master branch...