Running a backstop test, I get the following output and backstop fails to generate a report:

      COMMAND | Command "test" ended with an error after [195.665s]
      COMMAND | TimeoutError: waiting for target failed: timeout 30000ms exceeded
                    at Function.waitWithTimeout (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/helper.js:228:26)
                    at Browser.waitForTarget (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/Browser.js:214:27)
                    at Browser.<anonymous> (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/helper.js:112:23)
                    at ChromeLauncher.launch (/usr/local/lib/node_modules/backstopjs/node_modules/puppeteer/lib/Launcher.js:247:21)
                    at process._tickCallback (internal/process/next_tick.js:68:7)
x Close Browser

How do I tell which scenario is failing, so that I can debug it? Puppeteer is the engine I'm using.

** Update: I've noticed a pattern between these failing pages: most of them include iframes (mostly youtube). I've worked around the issue in most cases by instructing backstop to ignore iframes, by using the removeSelectors directive:

"removeSelectors": [
  "iframe"
]

I'm not thrilled with this solution, so leaving open in case someone has a better answer.

1

There are 1 answers

1
Tum On

The only thing that helped resolve it for me was reinstalling my node packages.

  1. rm -rf node_modules
  2. npm install