chromy icon indicating copy to clipboard operation
chromy copied to clipboard

ChromyJS returned an unexpected error while attempting to capture a selector.

Open ryuran opened this issue 7 years ago • 5 comments

Hello

I play with backstopJS and chromy seems to bug sometimes.

Maybe It’s because I try to find a only one selector and it’s not present in the tested page.

ChromyJS returned an unexpected error while attempting to capture a selector. Error: not opened
    at WebSocket.send (/home/travis/build/20minutes/colette/node_modules/ws/lib/WebSocket.js:356:18)
    at Chrome.enqueueCommand (/home/travis/build/20minutes/colette/node_modules/chrome-remote-interface/lib/chrome.js:115:16)
    at /home/travis/build/20minutes/colette/node_modules/chrome-remote-interface/lib/chrome.js:79:28
    at Promise (<anonymous>)
    at Chrome.send (/home/travis/build/20minutes/colette/node_modules/chrome-remote-interface/lib/chrome.js:78:16)
    at Object.handler [as evaluate] (/home/travis/build/20minutes/colette/node_modules/chrome-remote-interface/lib/api.js:32:23)
    at Chromy._callee$ (/home/travis/build/20minutes/colette/node_modules/chromy/dist/document.js:400:81)
    at tryCatch (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:117:21)
    at tryCatch (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:65:40)
    at invoke (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:155:20)
    at /home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:198:11
    at Promise (<anonymous>)
    at callInvokeWithMethodAndArg (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:197:16)
    at AsyncIterator.enqueue [as _invoke] (/home/travis/build/20minutes/colette/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:220:13)

You can se the log of the test here: https://travis-ci.org/20minutes/colette/jobs/267365456

ryuran avatar Aug 23 '17 07:08 ryuran

Hi @ryuran, This test seems to open the many ports. Would the test be failed even if it is small test?

dotneet avatar Aug 23 '17 15:08 dotneet

I will try.

ryuran avatar Aug 24 '17 16:08 ryuran

@dotneet It seems OK with only one test. Maybe I should use a limit of concurrent test with backstop.js. https://github.com/garris/BackstopJS#capturing-screens-in-parallel

ryuran avatar Sep 02 '17 11:09 ryuran

@dotneet I try to limit async test with backstop but this problem still here. garris/BackstopJS#537

ryuran avatar Sep 03 '17 14:09 ryuran

I'm also seeing this issue while running in docker on a linux container. I set the number of async captures to 1. After a while, the entire process just hangs and never exits without any other errors. This may need to be added to another issue, but I will start looking into how these threads are being created/cleaned up. it seems a thread is just locking and never cleaning up properly causing the entire run to just come to a halt.

mike-malandra avatar Jun 06 '18 15:06 mike-malandra