webdriverio: nullPointerException in firefox when calling setValue
Environment (please complete the following information):
- WebdriverIO version: 5.7.15
- Mode:WDIO Testrunner
- If WDIO Testrunner, running sync/async: async
- Node.js version:10.15
- NPM version:6.4.1
- Browser name and version:Firefox latest (66)
- Platform name and version:macOS 10.13
- Additional wdio packages used (if applicable): @wdio/sauce-service @wdio/mocha-framework @wdio/spec-reporter @wdio/local-runner @wdio/cli
Config of WebdriverIO Repo to reproduce the issue: https://github.com/hborawski/wdio-sauce-junit-error
Describe the bug
When using setValue in saucelabs firefox environment, a null pointer exception is thrown and the value is never set. (Observed in firefox 59-66, did not test earlier versions)
Error: java.lang.NullPointerException
at getErrorFromResponseBody (/Users/hborawski/sandbox/wdio-sauce-nullpointer/node_modules/webdriver/build/utils.js:348:10)
at Request._callback (/Users/hborawski/sandbox/wdio-sauce-nullpointer/node_modules/webdriver/build/request.js:121:64)
at Request.self.callback (/Users/hborawski/sandbox/wdio-sauce-nullpointer/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:441:20)
at Request.<anonymous> (/Users/hborawski/sandbox/wdio-sauce-nullpointer/node_modules/request/request.js:1161:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:441:20)
at IncomingMessage.<anonymous> (/Users/hborawski/sandbox/wdio-sauce-nullpointer/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
To Reproduce
Steps to reproduce the behavior in README.md:
https://github.com/hborawski/wdio-sauce-nullpointer
Expected behavior
Test should pass and exit with exit code 0
Log https://gist.github.com/hborawski/a8536a3ebb97240005e0eb5bae993d37
Notes I found this issue: https://github.com/webdriverio/webdriverio/issues/3844 that looks to be the same problem but was closed as a duplicate of https://github.com/webdriverio/webdriverio/issues/3834 which seems to be unrelated. In either case, this was reproduced with the newest versions which includes the fix for the log type error from https://github.com/webdriverio/webdriverio/issues/3834
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (18 by maintainers)
This is the complete set that currently works for Sauce Labs and WDIO
The problem is that WebdriverIO is already using W3C but the Sauce Labs platform not. By providing the
'sauce:options'and the new properties, see here all should workI actually don’t know. I don’t believe it is fixed anytime soon on the Sauce side so I believe maybe moving it into the sauce service would make most sense 🤷♂ ?
So imo we should add
automatically to the capabilities if someone is running tests on Sauce.
@wswebcreation I would almost say let’s add this for all SL jobs as default options. I don’t see a reason why someone would not like to use W3C sessions.
@wswebcreation would it be useful to pin somewhere in wdio docs?