electron-userland / electron-userland/spectron
javascript error: Cannot convert undefined or null to object
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Hey, after updating `electron` to v10 and `spectron` to v12 I've started having issues with running my test suite. So I started debugging by creating a single test with code taken from spectron's readme. And when trying to run this test (I'm using Jest by the way) I get this error:
```
javascript error: javascript error: Cannot convert undefined or null to object
(Session info: chrome=85.0.4183.98)
at getErrorFromResponseBody (node_modules/webdriver/build/utils.js:121:10)
at WebDriverRequest._request (node_modules/webdriver/build/request.js:149:56)
at Browser.wrapCommandFn (node_modules/@wdio/utils/build/shim.js:74:23)
at Browser.wrapCommandFn (node_modules/@wdio/utils/build/shim.js:74:23)
```
Application window launches however, the test fails
- Node: v14.10.1
- spectron: 12.0.0
- electron: v10.1.2
- chromedriver: 85.0.4183.98
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the single Jest test based on the Spectron README with Electron 10, Spectron 12, Node 14, and ChromeDriver 85. Read the reported stack locations in node_modules/webdriver/build/utils.js, node_modules/webdriver/build/request.js, and node_modules/@wdio/utils/build/shim.js. Done means the README-based test runs without the reported null-or-undefined conversion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- desktop, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100