Here's my set up on Ubuntu
dalek and dalek-cli installed as instructed in the website, the version is displayed correctly
phantomjs was installed via npm install but the phantomjs command could not be run
installed phantomjs via apt-get ... now I have version 1.4
in the folder /var/www/first_tests/ I have the package.json file provided in the website along with a subfolder tests containing first.js with the google example provided
I am in my homedirectory since that's the only place I can call dalek (I'm guessing because that where I was when I installed it) so I'm doing
dalekjs /var/www/first_tests/tests/*.js
The console shows "Running tests" but nothing happens. Trying to run
phantomjs /var/www/first_tests/tests/first.js
gives me "undefined:0 ReferenceError: Can't find variable: module"
Dalek expects the PhantomJS binary in the:
node_modules/dalekjs/node_modules/dalek-browser-phantomjs/node_modules/phantomjs/bin
Folder. Also, it definitely needs version 1.9.0 or higher.
You could try to download the binary from the PhantomJS homepage & manually copy it to the folder mentioned above.
It would be awesome, if you could send me (dalekjs#asciidisco.com) the npm debug log,
so that I can check why this happened in the first place.
Related
I have installed ODOO on google cloud and it is working fine.
But when i give print command then it gives error:
Unable to find Wkhtmltopdf on this system. The report will be shown in html
Then I installed wkhtmltopdf on my cloud machine (linux 16).
After after installation I check:
wkhtmltopdf --version
And it checked that wkhtmltopdf is installed.
But still the same error when I give print Command.
Check that you have added the path where wkhtmltopdf is stored in the Odoo Service file. For instance:
PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/lib
Remember that you should restart the service to get the updated path.
Make sure you have installed a well tested wkhtmltopdf library for Odoo such as this version: 0.12.1.3
Background
I am tasked with replacing our IE based printing logic with Chromium so that we can eventually support running our current server software on Windows Server Core or potentially other operating systems that support .Net Core. My current thought is to either use Chromium embedded framework or to make use of Puppeteer. I am leaning towards the later because I feel it would be easier to port between operating systems.
Issue
Originally it failed to start with an error about sandboxing so I added the no-sandbox flag. Now when I try to load Chromium it fails to start with the exception below stating that it cannot load chrome.dll
PS C:\Program Files (x86)\Google\Chrome\Application>> .\chrome --headless --enable-logging --disable-gpu --screenshot="C:\screen.png" "https://www.chromestatus.com/"
Which yields the following error in the debug.log file:
[0813/133208.016:ERROR:main_dll_loader_win.cc(134)] Failed to load Chrome DLL from c:\Program Files (x86)\Google\Chrome\Application\68.0.3440.106\chrome.dll: The specified module could not be found. (0x7E)
I have checked around the internet and found a few mentions of this error but the suggested fixes don't seem to fix the issue.
I was able to download Chromium 72.0.3592.0 via Chocolatey and the issue is resolved in that version. I tested using Server Core 2016 LTSB.
choco install chromium --pre -y
chrome --headless --disable-gpu --dump-dom --enable-logging https://www.chromestatus.com/ --no-first-run
Edit:
If you are attempting to run Selenium Tests using Docker windowsservercore and chromium: The command line tests of chromium chrome.exe appear to never work from the container command line.
However when you run dotnet test app.csproj or dotnet vstest app.dll inside the container the webdriver successfully starts and drives the browser
This has been reported to the Chromium team. It appears that Chromium 68+ might have issues with Windows Server 2016.
https://bugs.chromium.org/p/chromium/issues/detail?id=873097
I'm new to this of Apache Cordova. I'm trying to follow the documentation but cannot understand it very well. It says that for prerequisite I need to install the correspondant SDK. I did install Android Studio. then downloaded the Node.js and then tried to run the installation but it doesn't start I don't understand why it doesn't start. There is another things that I need to do so it starts installing?
Any help will be great. Thanks!
I think the clue is in the message -- just run the command npm install -g cordova from the normal DOS command prompt.
first of all you have to install 1)node.js 2)apache ANT 3) Java JDK & JRE 4) Android SDk & Eclipse and then after all installation you have to set this all software path into environmental- variable. and then fire your npm install -g cordova. without this all software installation and there path setup your phoneGap application will not created. and still you have any confusion and any question related software installation and there path setup then again tell me i will help you.
First and foremost, you want to install Node.js in order to get the 'npm' commands to work.
https://nodejs.org/download/release/latest/
You can download the latest version of Node.js from there... I was on a Mac, so I did the .pkg download. Install the appropriate one for your development machine.
After that, the 'npm' commands for Cordova will work. Hope this at least gets you started! :)
I have installed casperjs and phantomjs on my windows machina via npm. However I get this issue.
C:\>casperjs sample.js
C:\>Unable to open file: sample.js
Unsafe JavaScript attempt to access frame with URL about:blank from frame
with URL file:///C:/Users/vini/AppData/Roaming/npm/node_modules/casperjs/bin/bootstrap.js.
Domains, protocols and ports must match.
This is a known issue with CasperJS and the 1.9.8 version of PhantomJS. It doesn't do anything and the errors are only printed during exit. They don't interfere with your script. There is a workaround and it was merged into master branch on GitHub, but it is not available as a release of CasperJS yet (latest is 1.1-beta3).
The easiest way to solve this is to downgrade to PhantomJS 1.9.7. Since you're using NPM it is easily done with
npm -g install phantomjs#1.9.7-15
The PhantomJS versions match with the NPM phantomjs package versions up until 1.9.7, then everything breaks. You can check the versions with npm show phantomjs.
If you downgrade to version 1.9.7, you will have to run with the --ssl-protocol=any commandline option for sites that request https resources. The reason is shown in my answer here.
The proper way to solve this is to install a new version from git. This will enable you to not only use PhantomJS 1.9.8 without the additional error lines, but also PhantomJS 2 which would not be possible with CasperJS 1.1-beta3.
References:
GitHub issue #1068
Workaround for CasperJS #1139
PhantomJS issue on SO
Use
"phantomjs": "^1.9.9"
And for caseperJs
casperjs --ssl-protocol=tlsv1 test run.js
I'm trying to set up testing for a Web app using behaving, which runs on top of behave and splinter - the latter of which in turn uses Selenium to drive PhantomJS. All of this is inside a VirtualBox-provided Vagrant box running CentOS 6.4. I've installed Selenium via pip, and I've installed PhantomJS from the Nux Dextop repo.
Trying to run my tests freezes Behave for 30 seconds, then raises:
selenium.common.exceptions.WebDriverException: Message: 'Can not connect to GhostDriver'
I think I've nailed it down to not being able to open a socket, and indeed, when I try to do this from the Python interactive shell, I can't open any socket to localhost at all. How do I get my tests to run?
I just had the same problem with the Can not connect to GhostDriver error. When trying phantomjs --help, I got the error
[WARNING] Unable to load library icui18n "Cannot load library icui18n: (libicui18n.so.48: cannot open shared object file: No such file or directory)"
After installing libicu48 (Ubuntu package), phantomjs --help gave me
[WARNING] phantomjs: cannot connect to X server
This made sense, since I didn't have an X server installed. Then, I discovered that phantomjs <= 1.4 requires an X server, but >= 1.5 is pure headless. So, instead of relying on my distro's phantomjs package, I installed it using npm, and now everything works fine.
I have installed the package of libicu48 and gnome-session-fallback for the bug.
$ sudo apt-get install libicu48 gnome-session-fallback