Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot read property 'log' of undefined" for crashes #1180

Closed
graingert opened this issue Mar 18, 2016 · 4 comments
Closed

"Cannot read property 'log' of undefined" for crashes #1180

graingert opened this issue Mar 18, 2016 · 4 comments
Labels

Comments

@graingert
Copy link

In some errors I often get "Cannot read property 'log' of undefined"

https://github.com/graingert/wdio-console-log-crash/tree/master

@eyalzek
Copy link

eyalzek commented Apr 4, 2016

I'm getting this also in a lot of the errors. Coming from line 287 of webdriverio.js:
this.logger.log('\tSaved screenshot: ' + fileName);

@christian-bromann
Copy link
Member

Already working on fixing this 😉

@eyalzek
Copy link

eyalzek commented Apr 15, 2016

Can you please explain how to fix this manually in the meantime? It causes too many crashes in my tests..

@molily
Copy link

molily commented Apr 15, 2016

@eyalzek I monkey-fixed this locally by putting an if (this.logger) around the this.logger.log call. There might be a better way. 🐵
https://github.com/webdriverio/webdriverio/blob/master/lib/webdriverio.js#L220

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

No branches or pull requests

4 participants