Protractor / Chrome - UnknownError: The process has not exited yet therefore no result is available - protractor

Trying to run a Protractor test but am receiving the following command line error when trying to test in Chrome.
UnknownError: The process has not exited yet therefore no result is available ...
The test successfully runs in Firefox, i.e. when the protractor.conf.js file is set as such:
capabilities: {
'browserName': 'firefox'
}
I'm currently using ChromeDriver 2.10, which seems to have something to do with the issue (https://github.com/angular/protractor/issues/1424). However, I'm unclear how to configure Protractor to use a different version of ChromeDriver.

So, reverting to ChromeDriver 2.9 was as easy as downloading it from here (http://chromedriver.storage.googleapis.com/index.html?path=2.9/) and extracting the zip into /usr/local/lib/node_modules/protractor/selenium.
That fixed the immediate issue of not being able to run the test in Chrome. Still waiting on a fix for 2.10, I suppose.

Related

Code runner runs javascript in terminal but does't work in otput

Hi when I try to run javascript with code runner i get only:
"[Running] node "/home/lukasz/JavaScript/app.js"
[Done] exited with code=0 in 0.11 seconds"
without any actual output.
When I switch to run in terminal everything works fine. Any ideas how to fix it?
[Run in terminal][Run in output]
I compared settings of execution map with other on osx which is working perfectly and can't see any difference.

Not able to launch chrome in protractor

While launching conf.js file in protractor its giving below error :
ERROR [OsProcess.checkForError] - org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88" (in directory "."): error=86, Bad CPU type in executable)
https://github.com/angular/webdriver-manager/issues/476
Fix will be available soon this weekend. but you will get a workaround by doing this.
As I badly needed to get unblocked - here is a hacky workaround for anyone in similar situation (only for x86_64 macOS). In node_modules/webdriver-manager/built/lib/files/file_manager.js update fileUrl.url around 166:
add below line
fileUrl.url = fileUrl.url.replace(/_m1/, '')
Was facing the similar issue in MacOs Catalina.
This is how it got resolved for me with below versions :
Option 1 :
Download these :
https://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_mac64.zip
https://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
And made the Selenium server UP with this :
java -Dwebdriver.chrome.driver=./chromedriver_71.0.3578.33 -jar ./selenium-server-standalone-3.141.59.jar -port 4444
Option 2 :
Protractor :
Use the below versions :
webdriver-manager update --versions.chrome=71.0.3578.33
webdriver-manager --versions.chrome=71.0.3578.33 start
Got an Error
"Timed out waiting for driver server to start." After running
webdriver-manager update
Resolved it by downgrading to the previous version of webdriver that was working for you.
Steps:
navigate to node_modules/protractor/node_modules/webdriver-manager/selenium/
check if you can see the last chromedriver that you were using before the update
for my case this is chromedriver_86.0.4240.22
since I still have my previous chromedriver, I just Deleted
chromedriver_87.0.4280.88
chromedriver_87.0.4280.88.zip
in node_modules/protractor/node_modules/webdriver-manager/selenium/update-config.json
I changed all instances of chromedriver_87.0.4280.88 and replaced with chromedriver_86.0.4240.22
Run your tests.
Incase you dont know what was the last version that worked for you, you can try
webdriver-manager update --versions.chrome=86.0.4240.22
or look for a version here
This is what worked for me:
Update the protractor version to current stable version: "protractor": "^7.0.0", npm install was the way to go for me, yours will be similar
Update the webdriver: webdriver-manager update with or without sudo is the right command as stated in other answers
Run the webdriver manager with the current chrome version, this is the command that I use for application: webdriver-manager start --versions.chrome=88.0.4324.96 as my chrome is currently at that version, replace it with your chrome's version (87.0.4280.88 as per the question)

How to fix ' Disconnected, because no message in 10000 ms.' error while trying to run karma unit test?

I am getting 'Disconnected, because no message in 10000 ms' error while trying to run karma unit tests. This error triggered only after the installation of webdriver-manager ( to run protractor) and ran unit tests successfully before this installation.
I assumed that the error might be hitting since webdriver is up and running. So,I passed command 'webdriver-manager shoutdown' to stop it. but,it showed that no server is up and running.
My requirement is to run both protractor functional test and karma unit tests in same machine without any error.
Found the solution for this issue by myself.
Solution: Install angular cli using the command 'npm install -g #angular/cli'.
I am able to execute both karma unit tests and protractor functional tests in my system without any issue after installing angular cli.

How to debug envoy unit tests on VScode mac

I am working with envoy (https://github.com/envoyproxy/envoy). I got this project to build and debug on mac in VSCode using --spawn_strategy=standalone --genrule_strategy=standalone flags when I do bazel build.
However, when I try the same with bazel test, I can't get it to run without sandbox. When I run the command:
bazel test //:test_name --spawn_strategy=standalone --genrule_strategy=standalone
It runs the whole test and shows which tests passed and which ones failed.
But when I run the binary from /bazel-bin/ as ./test_name, it gives me an error saying: Caught Abort trap: 6, suspect faulting address. I am assuming this is because of some missing env variables created in sandbox - I have also tried just using --strategy=TestRunner=standalone. Is it possible to run it standalone? so that I can debug in an IDE such as VScode. Thank you!

Protractor with Firefox : Failed: Error while running testForAngular: Document was unloaded

In chrome tests runs fine, but I get this error every time I run my test in Firefox browser:
Failed: Error while running testForAngular: Document was unloaded [stack]
Error: Error while running testForAngular: Document was unloaded at executeAsyncScript_.then (C:\jenkins\workspace\QA-E2E-Firefox-Win10\automation\TestAutomation\SeleniumFramework\node_modules\protractor\built\browser.js:727:23)
I was able to fix this issue by using the selenium server to interact with the browser driver instead of protractor directly interacting with the browser driver, following changes has been made to my conf.js file.
directConnect: false,
seleniumAddress: 'http://localhost:4444/wd/hub'