So I have my open source project (https://github.com/ahmednuaman/radian) and I have some e2e tests that run fine locally using Protractor.
I've followed the Sauce Labs docs and set up my .travis.yml
accordingly. The tests run right to the point where Protractor tries to connect to selenium server on Sauce Labs, this is a brief snapshot of the error:
Running "exec:e2e" (exec) task
Using the selenium server at ahmednuaman-radian:06dd4e07-0f52-4fdf-be5e-389f2117bbf5@localhost:4445
>>
>> timers.js:103
>> if (!process.listeners('uncaughtException').length) throw e;
>> ^
>> TypeError: Cannot read property 'length' of undefined
>> at HttpClient.send (/home/travis/.nvm/v0.8.26/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:62:16)
Here's the full job log: https://travis-ci.org/ahmednuaman/radian/jobs/16250460
So the next thing I did was try to emulate this locally. I read the Sauce Labs Connect docs and eventually ran this in my terminal:
java -jar ~/bin/Sauce-Connect.jar USERNAME PASSWORD
Everything started fine, exactly the same as on Travis but as I then ran my grunt e2e
task (after updating the protractor.conf.coffee
to match the Travis config locally) and recieved the same error as Travis had, here's a snapshot:
Running "exec:e2e" (exec) task
Using the selenium server at ahmednuaman-radian:06dd4e07-0f52-4fdf-be5e-389f2117bbf5@localhost:4445
>>
>> /Users/ahmed/bin/node/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1542
>> throw error;
>> ^
>> TypeError: Cannot read property 'length' of null
>> at HttpClient.send (/Users/ahmed/bin/node/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:62:16)
I had a google around but I couldn't find anyone else with this problem. So, is it my config? Is it a protractor/webdriver issue? Care to shed any light on this?