angular / webdriver-manager

A binary manager for E2E testing
MIT License
224 stars 116 forks source link

Protractor tests occasionally fail to start #435

Open jonathan-fw opened 4 years ago

jonathan-fw commented 4 years ago

I'm not entirely sure if this is related to https://github.com/angular/protractor/issues/4347 or not since my output is slightly different, but I have an occasional failure running my protractor suite and it only occurs in CircleCi instead of my local.

Output: [18:35:44] I/launcher - Running 1 instances of WebDriver [18:35:44] I/direct - Using ChromeDriver directly... [18:36:17] E/launcher - Error while running testForAngular: script timeout (Session info: headless chrome=78.0.3904.108) (Driver info: chromedriver=78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}),platform=Linux 4.10.0-35-generic x86_64) [18:36:17] E/launcher - Error: Error while running testForAngular: script timeout (Session info: headless chrome=78.0.3904.108) (Driver info: chromedriver=78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}),platform=Linux 4.10.0-35-generic x86_64) at executeAsyncScript_.then (/app/node_modules/protractor/built/browser.js:727:23) at ManagedPromise.invokeCallback_ (/app/node_modules/selenium-webdriver/lib/promise.js:1376:14) at TaskQueue.execute_ (/app/node_modules/selenium-webdriver/lib/promise.js:3084:14) at TaskQueue.executeNext_ (/app/node_modules/selenium-webdriver/lib/promise.js:3067:27) at asyncRun (/app/node_modules/selenium-webdriver/lib/promise.js:2927:27) at /app/node_modules/selenium-webdriver/lib/promise.js:668:7 at processTicksAndRejections (internal/process/task_queues.js:86:5) [18:36:17] E/launcher - Process exited with error code 199

giulianabb commented 4 years ago

I'm having the same problem using SauceLabs. For some reason, if I run the tests on Chrome 76, it works. Running with version 77 and 78 produce occasional failures, with a few different errors (I remember occurring timeout errors and stale element not attached to page, even though those tests were running fine at local environment). Running with Chrome 79 seems to be working on SauceLabs, but for some reason the tests are failing locally. It's a mess, honestly 😢

jonathan-fw commented 4 years ago

I've found as a temporary solution to wrap the flag ignoreSynchronization on starting up the browser, but I still don't know why it specifically only happens in one environment over the other. browser.ignoreSynchronization = true; browser.get(baseUrl); browser.ignoreSynchronization = false; They are running off of the same docker image.