garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.71k stars 603 forks source link

[Bug][Chrome][Randomly] Error: Unknow event id 14 & 17 #661

Open Kenith opened 6 years ago

Kenith commented 6 years ago

Hello All,

We found the following error appearing randomly during our test ( we have 300 links need to be tested). And we checked the captured page, some captured pages cannot totally captured. Appear: 4 times - 3 "Unknow event id 17", and 1 "unknow event id 14"

Error: Unknown event id: 17
    at /usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:81:28
    at Chrome.handleMessage (/usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:271:13)
    at WebSocket.<anonymous> (/usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:248:27)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver._receiver.onmessage (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/WebSocket.js:143:54)
    at Receiver.dataMessage (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/Receiver.js:385:14)
    at extension.decompress (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/Receiver.js:354:40)
    at _inflate.flush (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/PerMessageDeflate.js:279:12)
    at afterWrite (_stream_writable.js:454:3)
Error: Unknown event id: 14
    at /usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:81:28
    at Chrome.handleMessage (/usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:271:13)
    at WebSocket.<anonymous> (/usr/local/lib/node_modules/backstopjs/node_modules/chrome-remote-interface/lib/chrome.js:248:27)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver._receiver.onmessage (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/WebSocket.js:143:54)
    at Receiver.dataMessage (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/Receiver.js:385:14)
    at extension.decompress (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/Receiver.js:354:40)
    at _inflate.flush (/usr/local/lib/node_modules/backstopjs/node_modules/ws/lib/PerMessageDeflate.js:279:12)
    at afterWrite (_stream_writable.js:454:3)

System Info

  1. Backstop: 3.0.38
  2. Node: 8.9.4
  3. NPM: 5.6.0
  4. OS: Centos

Thank you, Ken

garris commented 6 years ago

@Kenith how much RAM do you have on your machine? Backstop tests will require a lot of memory -- especially if you have a lot of tests running concurrently. Does the problem disappear or diminish if you set asyncCaptureLimit to 1? Other users have addressed this problem by ensuring there is 4-8 gig of RAM on their test machine. Please let me know if any of these suggestions help.

FireGhost commented 5 years ago

Hey,

I just had the same issue than @Kenith using the Chromy engine. I was able to remove the issue by changing the default "waitTimeout" value. In my case, I had to change the value to "300000" in order to remove completely the errors.

Here is my config:

  "engine": "chromy",
  "engineOptions": {
    "waitTimeout": 300000,
    "gotoTimeout": 300000,
    "evaluateTimeout": 300000,
    "chromeFlags": ["--disable-gpu", "--no-sandbox", "--force-device-scale-factor=1"]
  },

Hope this helps someone one day ;)