BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

TimeoutError: Navigation Timeout Exceeded when Using Puppeteer headless

Open jasonlimantoro opened this issue 5 years ago • 5 comments

It seems that when I'm trying to use the headless feature, i.e.

// backstop.json
{
  "debug": false,
  "debugWindow": false
}

and use the puppeteer engine

// backstop.json
{
  "engine": "puppeteer"
}

I always get the TimeoutError.

When using Chromy, same thing also happens when using the headless version.

I'm not using docker (the portion in the official documentation is irrelevant). I'm just running the backstop for my React application.

I'm using the currently latest Chrome (version72.0.3626.121) and Backstopjs latest release (version v3.8.8)

I also try to set the asyncCaptureLimit and asyncCompareLimit to 1

// backstop.json
{
  "asyncCaptureLimit": 1,
  "asyncCompareLimit": 1,
}

But, still no luck! Any ideas?

jasonlimantoro avatar Mar 07 '19 10:03 jasonlimantoro

I'm getting this a lot, too. I recommend checking resource usage and making sure you are not running out of memory, CPU is not pushed to 100% on all cores, etc. If that's the case, you might want to try messing around with args, e.g --process-per-site, --disable-accelerated-2d-canvas, --disable-gpu and the likes of these.

mhavelant avatar Mar 08 '19 10:03 mhavelant

Did you try to get it work? @mhavelant

jasonlimantoro avatar Mar 08 '19 11:03 jasonlimantoro

I tried tweaking it and got from "frequent timeouts" to "sometimes it times out", so that's progress, but not a fully working solution, sadly. I'm working on ironing it out in my projects, though, hopefully with success.

mhavelant avatar Mar 08 '19 11:03 mhavelant

I also encountered the same problem. Running with browser showing is smooth but running with headless is not working.

It is very likely a puppeteer issue, not backstop's problem. Its headless mode in windows has many problems. Here is one I encountered quite a while ago GoogleChrome/puppeteer#1718 where headless mode is extremely slow.

foresightyj avatar Mar 11 '19 03:03 foresightyj

This fixed an error related to navigation timeout for me.

LionOps avatar Jul 20 '21 03:07 LionOps