angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.74k stars 2.31k forks source link

Getting error "WebDriverError: Invalid timeout type specified: ms" #4445

Open moinuddin14 opened 7 years ago

moinuddin14 commented 7 years ago

Hi

I have not made any changes to my tests but all of a sudden started seeing the below error on the console.

[12:19:49] E/runner - Unable to start a WebDriver session. [12:19:49] E/launcher - Error: WebDriverError: Invalid timeout type specified: ms

Bug report

Unfortunately the entire code is inside vpn and cannot bring it outside VPN. Any help in this regard is appreciated.

robertsmith2 commented 7 years ago

Same issue here

moinuddin14 commented 7 years ago

@robertsmith2 Were you able to successfully run the tests earlier? I was able to, but all of a sudden i see this happening. I restarted my machine and clean installed at several places, but still see this happening. In the other VM machine that i have, i did not touch anything and the tests are running fine there. Not sure what could be the issue here.

robertsmith2 commented 7 years ago

@moinuddin14 yeah IE was working a couple days ago. I upgraded from 5.1.1 to 5.1.2 only thing I can think of that changed

moinuddin14 commented 7 years ago

@robertsmith2 I have verified with 5.0.0 and with IE driver its working fine. Looks like with 5.1.2 its broken somehow. Protractor team can you please look into this issue. Tried to find within protractor code base from where this error is originating from but couldn't find the trace of this error.

moinuddin14 commented 7 years ago

It's working fine for me till 5.0.0, and with 5.1.1 as well 5.1.2 it's throwing the error "WebDriverError: Invalid timeout type specified: ms"

bruderol commented 7 years ago

same problem here :-(

wswebcreation commented 7 years ago

Need to dive into it more in detail, but these are the changes between 5.1.1 and 5.1.2

https://github.com/angular/protractor/compare/5.1.1...5.1.2

ashlives commented 7 years ago

Same issue here. Node version: 6.11.1 Protractor version: 5.1.2

conf.js

exports.config = {
    framework: 'custom',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    suites:{
        LanguageSelectionPopup: 'tests/*.feature'
    },
    restartBrowserBetweenTests: true,
    capabilities: {
        browserName: 'internet explorer'
    },
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 360000
    }
};

Error:

"C:\Program Files\nodejs\node.exe" "C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\bin\protractor" "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3\plugins\JavaScriptLanguage\helpers\protractor-intellij\lib\protractor-intellij-config.js" "--intellijOriginalConfigFile=C:\Users\Lenovo G50-70\IdeaProjects\com.protractortest.myapp\conf.js"
[18:46:13] I/launcher - Running 1 instances of WebDriver
[18:46:13] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[18:46:25] E/runner - Unable to start a WebDriver session.
[18:46:25] E/launcher - Error: WebDriverError: Invalid timeout type specified: ms
Build info: version: '3.5.0', revision: '8def36e068', time: '2017-08-10T23:00:22.093Z'
System info: host: 'DESKTOP-9AVDLI7', ip: '192.168.2.100', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131'
Driver info: driver.version: unknown
    at WebDriverError (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:27:5)
    at Object.checkLegacyResponse (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:505:15)
    at parseHttpResponse (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.manage().timeouts().setScriptTimeout(11000)
    at WebDriver.schedule (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
    at Timeouts._scheduleCommand (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:1500:25)
    at Timeouts.setScriptTimeout (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:1483:17)
    at browser_.ready.browser_.ready.then.then (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\lib\runner.ts:281:49)
    at ManagedPromise.invokeCallback_ (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1366:14)
    at TaskQueue.execute_ (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2970:14)
    at TaskQueue.executeNext_ (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2953:27)
    at asyncRun (C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2813:27)
    at C:\Users\Lenovo G50-70\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:676:7
    at process._tickCallback (internal/process/next_tick.js:109:7)
[18:46:25] E/launcher - Process exited with error code 100

Process finished with exit code 100
Empty test suite.
bruderol commented 7 years ago

with protractor 5.0.0 it is working - the bug seems to be introduced with 5.1.0 (if I tested correctly)

robertsmith2 commented 7 years ago

5.0.0 works for me locally hopefully works on release agent.

bruderol commented 7 years ago

Actually this must be somehow related to the selenium server being used for ie testing - I found out that it was once working for me with version 5.1.2 but with Selenium IEDriverServer Version 3.4.0 - and since that version changed to 3.5.0 it does not work anymore. I try now to install the older version of the server and hope that one is still gonna work with my IE version. šŸ™

robertsmith2 commented 7 years ago

I got mine working with IEDriver 2.53.1 good luck @bruderol

ashlives commented 7 years ago

@robertsmith2 you mean IEDriver 2.53.1 with Protractor: 5.1.2 worked? Or did you used 5.0.0 for this?

Harish247 commented 7 years ago

I had the same problem in IE. I figured out that selenium standalone server and IE driver got updated to 3.5.0. Try to downgrade the standalone server and IE to 3.4.0. This worked for me.

bruderol commented 7 years ago

Just using webdriver-manager update --ie --versions.standalone 3.4.0 --versions.ie 3.4.0 solved the issue for me.

Roman150 commented 7 years ago

I had the same issue, but I managed it with this "webdriver-manager update --ie --versions.standalone 3.4.0 --versions.ie 3.4.0" command protractor version 5.1.2.

jbprat commented 7 years ago

@bruderol, @Roman150 I tried your instruction, but when I run webdriver-manager start the logs start with this:

I/start - java -Dwebdriver.chrome.driver=C:\Users\JeanB\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\chromedriver_2.31.exe -Dwebdriver.ie.driver=C:\Users\JeanB\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\IEDriverServer3.5.1.exe -Dwebdriver.gecko.driver=C:\Users\JeanB\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\geckodriver-v0.18.0.exe -jar C:\Users\JeanB\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.5.2.jar -port 4444

But when I look in the selenium folder IĀ can see that the versions of standalone and ie driver are 3.4.0. Giving me an error when I run Protractor.

What does your log looks like when you start webdriver-manager?

wswebcreation commented 7 years ago

Guys

See here https://github.com/angular/protractor/issues/4451#issuecomment-324120250

jbprat commented 7 years ago

@wswebcreation How would you pin the version for a specific webdriver?Ā I have removed and uninstalled webdriver-manager and I cannot seem to downgrade IE driver.

wswebcreation commented 7 years ago

Will check later today, come back to it

Harish247 commented 7 years ago

@jbprat Try to start the webdriver manager with a specific version.

webdriver-manager start --versions.standalone=3.4.0

If we do not mention version webdriver will consider the latest version. I hope this will solve your issue.

Total flow would be webdriver-manager clean webdriver-manager update --ie --versions.standalone=3.4.0 --versions.ie=3.4.0 webdriver-manager start --versions.standalone=3.4.0

Roman150 commented 7 years ago

@jbprat, my logs was different from yours, your log starts with "java" ,check if java is present in classpath and java -version command in console return version of your jdk, tomorrow i can write you version of all my environment and drivers , and then you can compare all

wswebcreation commented 7 years ago

@Harish247

Tnx for your answer.

@jbprat The docs that mention the reason why you need to start with a specific version can be found here

webdeveloperninja commented 7 years ago

Thanks @Harish247 I did not know you could specify a version like that

jbprat commented 7 years ago

@wswebcreation @Roman150 @Harish247, Thank you for the details!

jbprat commented 7 years ago

What worked for me was: webdriver-manager clean webdriver-manager update --ie --versions.standalone 3.4.0 --versions.ie 3.4.0 webdriver-manager start --versions.standalone 3.4.0 --versions.ie 3.4.0

I had to start webdriver-manager with specific version because it was trying to load the latest version of standalone and driver, could not find it, and crashed.

wswebcreation commented 7 years ago

@jbprat,

Tnx tot the feedback

agne-a-t commented 7 years ago

Any news on this issue?

saadEB commented 6 years ago

I have the same issue with: selenium-server-standalone-3.6.0 Didn't try different versions yet. Is there a selenium & IE driver that works fine? with: Node Version: v6.11.1 Protractor Version: 5.1.2

ajklotz commented 6 years ago

Still having this issue, is it expected of us to install a earlier version of the IE driver in order to keep 5.1.2, or does a later version of protractor solve this problem?

raberana commented 6 years ago

Still having this issue with IEDriver 3.9 and Protractor 5.3

AdvanceAutomation commented 6 years ago

Any solution on this?

ben-yocum commented 6 years ago

I see this error consistently whenever I use SELENIUM_PROMISE_MANAGER: false with Internet Explorer. The same code works great in Chrome.

Node v.8.10.0 Protractor v.5.3.0 IEDriverServer v.3.11.1

LilSebastian5000 commented 6 years ago

Has anybody figured out why IEDriverServer 3.11.1 doesn't work?

Downgrading to IEDriverServer 3.4.0 does the trick for me, but I'd really like to use the latest to see if any bugs I've been facing have been fixed in the later webdriver versions.

Node v6.11.0 Protractor v5.1.2 IEDriverServer v3.11.1 (Does not work- so using 3.4.0)

elsticky commented 6 years ago

Today I also struggled with this issue with later webdriver versions than 3.4.0 , currently using 3.4.0 as workaround..

ben-yocum commented 6 years ago

This error may come up when you make a webdriver request before other requests come back. Chromedriver has an internal queue to prevent multiple requests going out at once but IE lacks one or it is buggy.

See this thread. It talks about getting 404s but in my experience it is sometimes this error instead.