testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

TypeError: Cannot read property 'callsite' of undefined

Open sijosyn opened this issue 7 years ago • 5 comments

What is your Test Scenario?

Started seeing this error after upgrading to TestCafe v1.0.0 from v0.23.0 and TestCafe would quit when it runs into this error. I can't consistently reproduce this but this happens from time to time. Screenshot of error is attached (see screenshot section). Sorry I don't have the exact repro steps but my test repo is provided here.

What is the Current behavior?

TestCafe quits execution with the following error:

/Users/.../node_modules/brotli/build/encode.js:3
1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program");b.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=b);process.on("uncaughtException",function(a){if(!(a instanceof y))throw a;});b.inspect=function(){return"[Emscripten Module object]"}}else if(x)b.print||(b.print=print),"undefined"!=typeof printErr&&(b.printErr=printErr),b.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},b.readBinary=function(a){if("function"===

TypeError: Cannot read property 'callsite' of undefined
at TestRun.callsite [as _rejectCurrentDriverTask] (/Users/.../node_modules/testcafe/src/test-run/index.js:401:75)
at TestRun._rejectCurrentDriverTask [as _disconnect] (/Users/.../node_modules/testcafe/src/test-run/index.js:692:14)
at BrowserConnection._disconnect (/Users/.../node_modules/testcafe/src/test-run/index.js:280:44)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at BrowserConnection.emit (events.js:211:7)
at Timeout.emit [as _onTimeout] (/Users/.../node_modules/testcafe/src/browser/connection/index.js:127:18)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
 

What is the Expected behavior?

TestCafe should run without any errors and should not quit execution

What is your web application and your TestCafe test code?

Download this repo - https://github.com/sijosyn/testcafe-syntests and run the test suite.

Your complete test code (or attach your test files):
 
Your complete test report:

Screenshots: screen shot 2019-02-13 at 11 22 25 am

Steps to Reproduce:

Please read the README provided in the repo - https://github.com/sijosyn/testcafe-syntests . Run the full test suite.

Your Environment details:

  • testcafe version: v1.0.0
  • node.js version: v8.11.1
  • command-line arguments: npm run aperture or testcafe chrome desktop -e
  • browser name and version: Chrome 72
  • platform and version:
  • other: macOS 10.14

sijosyn avatar Feb 13 '19 18:02 sijosyn

@sijosyn,

Hello.    I didn't reproduce the "Cannot read property 'callsite' of undefined" issue on Node v8.11.1 / [email protected]. But I saw unstable results with AssertionError and specified selector does not match any node in the DOM tree errors. Let's keep all information of your repository in this issue. Our team will research your issue in that context.

Farfurix avatar Feb 14 '19 13:02 Farfurix

This is something that I started seeing as well. Just upgraded to testcafe 1.1.0 from testcafe 0.23.2. It happens intermittently

/Users/.../node_modules/brotli/build/encode.js:3
1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program");b.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=b);process.on("uncaughtException",function(a){if(!(a instanceof y))throw a;});b.inspect=function(){return"[Emscripten Module object]"}}else if(x)b.print||(b.print=print),"undefined"!=typeof printErr&&(b.printErr=printErr),b.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},b.readBinary=function(a){if("function"===
                                                                                                                                                                                                                              ^

TypeError: Cannot read property 'callsite' of undefined
    at TestRun.callsite [as _rejectCurrentDriverTask] (/Users/.../node_modules/testcafe/src/test-run/index.js:396:75)
    at TestRun._rejectCurrentDriverTask [as _disconnect] (/Users/.../node_modules/testcafe/src/test-run/index.js:687:14)
    at BrowserConnection._disconnect (/Users/.../node_modules/testcafe/src/test-run/index.js:280:44)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at BrowserConnection.emit (events.js:211:7)
    at Timeout.emit [as _onTimeout] (/Users/.../node_modules/testcafe/src/browser/connection/index.js:127:18)
    at ontimeout (timers.js:482:11)
    at tryOnTimeout (timers.js:317:5)
    at Timer.listOnTimeout (timers.js:277:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 7

KingM1 avatar Mar 11 '19 20:03 KingM1

@KingM1 As far as I understand @Farfurix was not able to reproduce the initial issue, so I recommend you create a separate issue following this form Please provide us with an example project or url to your site. It will help us to research the issue efficiently

AlexKamaev avatar Mar 12 '19 13:03 AlexKamaev

I'm sporadically getting the same error. I'm using testcafe 1.1.0 though.

TypeError: Cannot read property 'callsite' of undefined at TestRun.callsite [as _rejectCurrentDriverTask] (/home/n639216/dev/radio-web/radio-testcafe/node_modules/testcafe/src/test-run/index.js:396:75) at TestRun._rejectCurrentDriverTask [as _disconnect] (/home/n639216/dev/radio-web/radio-testcafe/node_modules/testcafe/src/test-run/index.js:687:14) at BrowserConnection._disconnect (/home/n639216/dev/radio-web/radio-testcafe/node_modules/testcafe/src/test-run/index.js:280:44) at Object.onceWrapper (events.js:285:13) at BrowserConnection.emit (events.js:197:13) at BrowserConnection.EventEmitter.emit (domain.js:446:20) at Timeout.emit [as _onTimeout] (/home/n639216/dev/radio-web/radio-testcafe/node_modules/testcafe/src/browser/connection/index.js:127:18) at listOnTimeout (timers.js:327:15) at processTimers (timers.js:271:5)

eMTe123 avatar Mar 14 '19 11:03 eMTe123

@eMTe123

@Farfurix marked this issue as a duplicate of #1920. Track this issue to be notified about our progress. If this problem is not related to the one from #1920 please consider creating a new issue with a complete example to reproduce.

miherlosev avatar Mar 14 '19 12:03 miherlosev