bijin-ab
bijin-ab

Reputation: 496

WebDriverError: Cannot define class using reflection

I am using gulp-angular-protractor for end-to-end testing of my web app. I am getting the following error recently but earlier it used to work perfectly.

enter image description here

Any help to fix this issue will be appreciated.

Details:

OS - Ubuntu 16.04,
node - v6.12.2,
npm - v3.10.10,
Vagrant - v1.9.3,
karma - v0.13.22,
gulp-angular-protractor - v1.1.1,
protractor - v5.1.2,
webdriver-manager - v12.0.6

Upvotes: 2

Views: 2164

Answers (1)

bijin-ab
bijin-ab

Reputation: 496

Removing java-common and installing openjdk-8-jre fixed the issue for me.

To remove java-common and its dependencies, run below command

sudo apt-get purge --auto-remove java-common

To install openjdk-8-jre, run below command

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update 
sudo apt-get install openjdk-8-jdk

Additionally, if you have more than one Java versions installed on your system. Run below command set the default Java

sudo update-alternatives --config java

and type in a number to select a Java version. enter image description here

Upvotes: 2

Related Questions