This error:
status code 400 (Selenium::WebDriver::Error::ServerError)
is displayed after my test fails on a step where I have pasted input to a field. The test started to fail after I updated Selenium WebDriver to 3.6.0 and Firefox to 56.0.
I'm using Ruby - Capybara - Cucumber. What's the reason of a failure and how can I fix it?
upgrade your geckodriver
macOS:
brew install geckodriver
I hope it helps you.
I had the same issue on my deploy ubuntu server.
I installed geckodriver with this script
Before running run this
sudo apt-get install jq
install_dir="/usr/local/bin"
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)
if [[ $(uname) == "Darwin" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))')
elif [[ $(uname) == "Linux" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')
else
echo "can't determine OS"
exit 1
fi
curl -s -L "$url" | tar -xz
chmod +x geckodriver
sudo mv geckodriver "$install_dir"
echo "installed geckodriver binary in $install_dir"
Available on github.gist
It downloads latest bin version for geckodriver from official repo.
But it didn't help me. After many hours of investigation what is wrong I came across very strange issue.
geckodriver -v in my $HOME directory returned 0.19.1 version
But when I go to my deployed project path by capistrano.
cd ~/apps/app_name/production/current
geckodriver -v
=> 0.14.1
which geckodriver
=> /home/$USER/.rvm/bin/geckodriver
rm -rf /home/$USER/.rvm/bin/geckodriver
=> geckodriver -v
0.19.1
So I have first to delete .rvm default version for project, and then my global geckodriver version became available for application.
Related
I am using Ubuntu 18.04 I have installed ngrok using below command:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
It is installed fine and is also working fine. I am now creating a systemd service for it. For that I need to know the installation path of ngrok. I did which ngrok, it shows me the path /usr/local/bin/ngrok. Where is its config file stored?
I have tried the following steps to install and setup mongodb in my mac from here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ but I got the following error when running the final "mongo" command in my terminal:
Error Message - Zsh: Command Not found : mongo
This error msg occurred after trying to install mongodb 4.2 using brew
sudo chown -R $(whoami) $(brew --prefix)/*
then
brew tap mongodb/brew
then
brew install mongodb-community#4.2
and
brew services start mongodb-community#4.2
or
mongod --config /usr/local/etc/mongod.conf
then
ps aux | grep -v grep | grep mongod
and
mongo
running brew services start mongodb-community#4.2 returns:
Successfully started `mongodb-community#4.2` (label: homebrew.mxcl.mongodb-community#4.2)
running ps aux | grep -v grep | grep mongod returns:
9081 0.2 0.5 5528024 41856 ?? S 3:01pm 0:01.48 /usr/local/opt/mongodb-community#4.2/bin/mongod --config /usr/local/etc/mongod.conf
7613 0.0 0.1 4298832 5600 s000 T 2:47pm 0:00.08 vim /usr/local/etc/mongod.conf
running mongod --config /usr/local/etc/mongod.conf returns:
zsh: command not found: mongod
There are also no mongo files in my /usr/local/bin directory after using these commands
I created a data/db folder in my /usr/local/bin directory using the following commands:
sudo mkdir -p /usr/local/bin/data/db
sudo chown -R `id -un` /usr/local/bin/data/db
Running "brew update" returns:
brew update
Updated 1 tap (homebrew/cask).
==> Updated Casks
brave-browser
brew install mongodb-community-shell
Fixed the problem for me.
Solved it by manually installing the mongodb community files and db tools using the website instead. Then copying them into /usr/local/bin. Then ignoring the app permissions whenever calling mongo or related commands in the terminal through System Preferences > Security & Privacy > General.
After googling I found out that mongoimport and the other features have to be installed separately: https://www.mongodb.com/try/download/database-tools
Followed by copying those bin files after extracting them into the same /usr/local/bin directory
Not sure why its' not working through homebrew though
This worked for me, I was having same issue on mongodb-community#4.4
brew reinstall mongodb-community#4.4
On terminal something like this will appear during reinstallation.
copy highlighted path with echo
echo 'export PATH="/opt/homebrew/opt/mongodb-community#4.4/bin:$PATH"' >> ~/.zshrc
Now open another terminal and start mongodb services
brew services restart mongodb/brew/mongodb-community#4.4
write mongo on terminal and here we fly
If you installed the mongodb via Homebrew. Need to add the mongo path in your bash_profile.
Edit the bash_profile vi ~/.bash_profile
Add the below line in EOF export PATH=$PATH:/usr/local/opt/mongodb-community#4.2/bin
After the edit bash_profile. Close all terminals and open them again. mongo command start works.
In addition to #ramesh-babu-t-b 's answer, https://stackoverflow.com/a/68407530/1279516, the issue could also be that your MongoDB installation did add mongod to your path, but the installation happened within the current shell session, and so your shell doesn't have the updates to the PATH variable yet.
In this case, only his last step is still necessary - Open a new console window and retry the mongod command.
I am following this article to install and tried both methods.
Downloading the headless and the .deb methods I run the following commands:
$ ./dropboxd
And the DEB:
$ sudo dpkg -i dropbox_2020.03.04.deb
$ sudo apt -f install
$ dropbox start
For both I'm getting the error:
ImportError: libglapi.so.0:
I'm new to Linux server and I'm a little bit lost. Should I upgrade my server to Ubuntu 20?
I am planning to learn cakePHP. I already installed composer globally, but whenever I run composer self-update && composer create-project --prefer-dist cakephp/app my_app, I get an error saying:
[ErrorException]
copy(/Users/a/.composer/cache/files/cakephp/cakephp/4528680ebd888b7778e5755c957f
c9a26a0d10d1.zip):failed to open stream: Permission denied.
To be exact, this error runs after the ff things:
- Installing cakephp/plugin-installer(1.1.0): Loading from cache
- Installing aura/intl (3.0.0): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing zendframework/zend-diactoros (1.7.2): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing cakephp/chronos (1.1.4): Loading from cache
- Installing cakephp/cakephp (3.6.5): Downloading (100%)
I also tried running
sudo composer self-update && composer create-project --prefer-dist cakephp/app my_app
but still the error persists. Any ideas why this is happening?
Change directory to your project directory:
cd cakePHPproject
if you know under what user your web server is running then:
chown -R "userWebserverIsRunning" . * without " "
above will recursively (-R) change the owner of the files in your current directory (.)
Also set:
chmod -R 777 tmp
chmod -R 777 logs
PS, If you do not know under what user your webserver is running please run:
ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'
You can read more on cake's documentation:
https://book.cakephp.org/3.0/en/tutorials-and-examples/blog/blog.html#directory-permissions-on-tmp-and-logs
Have fun!
Set the ownership for the cache directory using chown -R this will recursively change ownership for all files and folders inside cache directory if any
Reference
actually had that problem and took me allot of time to figure out the solution: (if any previous php versions where installed, make sure to first get completely rid of them. if necessary purge and reinstall apache2 and php7)
first:
> sudo apt-get install php-xdebug
then edit the php.ini file of php 7 :
> sudo gedit /etc/php/7.0/apache2/php.ini
and just on the bottom add:
xdebug.remote_enable = On
save and of course then:
> sudo service apache2 restart
Download stable release of xdebug 2.4.0
wget -c "http://xdebug.org/files/xdebug-2.4.0.tgz"
Extract archive
tar -xf xdebug-2.4.0.tgz
cd xdebug-2.4.0/
Build extension
phpize
./configure
make && make install
Enable the extension
echo "zend_extension=xdebug.so" > /etc/apache2/mods-available/xdebug.ini
ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini
ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini
service php7.0-fpm restart
Check it
php -m | grep -i xdebug
It should print:
xdebug
Xdebug