Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Cannot read property 'split' of undefined #115

Open
christian-bromann opened this issue Nov 6, 2017 · 0 comments
Open

Cannot read property 'split' of undefined #115

christian-bromann opened this issue Nov 6, 2017 · 0 comments
Labels

Comments

@christian-bromann
Copy link
Contributor

From @jochakovsky on October 26, 2017 0:42

The problem

When the function passed to browser.call returns a rejected promise, I intermittently get an error, TypeError: Cannot read property 'split' of undefined

Environment

  • WebdriverIO version: 4.8.0
  • Node.js version: 8.7.0
  • Standalone mode or wdio testrunner: wdio testrunner
  • if wdio testrunner, running synchronous or asynchronous tests: synchronous
  • Additional wdio packages used (if applicable): wdio-mocha-framework, wdio-spec-reporter

Details

Running the same test twice with no changes, issue only appears on second run. Worth mentioning that there is no stack trace on the first error.

$ ./node_modules/.bin/wdio wdio.conf.js
(node:29505) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'currentRetry' of undefined
(node:29505) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
------------------------------------------------------------------
[firefox #0-0] Session ID: 2350368f-b8a8-0748-afa8-251e7318fe94
[firefox #0-0] Spec: /Users/jochakovsky/dev/webdriverio-test/test/specs/cannotReadPropertySplitOfUndefined.js
[firefox #0-0] Running: firefox
[firefox #0-0]
[firefox #0-0] Cannot read property 'split' of undefined
[firefox #0-0]   1) should recreate the bug
[firefox #0-0]
[firefox #0-0]
[firefox #0-0] 1 failing (2s)
[firefox #0-0]
[firefox #0-0] 1) Cannot read property 'split' of undefined should recreate the bug:
[firefox #0-0] blah
[firefox #0-0] no stack available
[firefox #0-0]

$ ./node_modules/.bin/wdio wdio.conf.js
------------------------------------------------------------------
[firefox #0-0] Session ID: de6b35a8-d7d6-bf45-953e-f52a8918ad4b
[firefox #0-0] Spec: /Users/jochakovsky/dev/webdriverio-test/test/specs/cannotReadPropertySplitOfUndefined.js
[firefox #0-0] Running: firefox
[firefox #0-0]
[firefox #0-0] Cannot read property 'split' of undefined
[firefox #0-0]   1) should recreate the bug
[firefox #0-0]
[firefox #0-0]
[firefox #0-0] 2 failing (2s)
[firefox #0-0]
[firefox #0-0] 1) Cannot read property 'split' of undefined should recreate the bug:
[firefox #0-0] blah
[firefox #0-0] no stack available
[firefox #0-0]
[firefox #0-0] 2) Cannot read property 'split' of undefined should recreate the bug:
[firefox #0-0] Cannot read property 'split' of undefined
[firefox #0-0] TypeError: Cannot read property 'split' of undefined
[firefox #0-0]     at Context.<anonymous> (/Users/jochakovsky/dev/webdriverio-test/test/specs/cannotReadPropertySplitOfUndefined.js:5:17)
[firefox #0-0]     at new Promise (<anonymous>)
[firefox #0-0]     at new F (/Users/jochakovsky/dev/webdriverio-test/node_modules/core-js/library/modules/_export.js:35:28)
[firefox #0-0]

Link to Selenium/WebdriverIO logs

Create a gist which is a paste of your full Selenium/WebdriverIO logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Selenium/WebdriverIO logs!

https://gist.github.com/jochakovsky/f5a2a23f111fb51eaa924d1c9be8e238

Code To Reproduce Issue [ Good To Have ]

https://github.com/jochakovsky/webdriver-io-split-of-undefined-bug

Copied from original issue: webdriverio/webdriverio#2371

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant