question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BackstopJS (Docker) will randomly hang during execution

See original GitHub issue

I have been experiencing this issue where a command such as reference or test would just hang an not complete execution when run in docker.

$backstop reference
BackstopJS v3.1.19
Loading config:  /src/backstop.json 

COMMAND | Executing core for `reference`
  clean | tests/visual/backstop_data/bitmaps_reference was cleaned.
createBitmaps | Selected 1 of 1 scenarios.
searching for 4 available ports.
These ports will be used: [9222,9223,9224,9225]
Starting Chromy: {"chromeFlags":["--disable-gpu","--force-device-scale-factor=1","--disable-infobars=true","--window-size=320,480"],"port":9222,"waitTimeout":30000,"visible":false}
CREATING NEW REFERENCE FILES
Cookie state restored with: [
  {
    "path": "/",
    "name": "yourCookieName",
    "value": "yourCookieValue",
    "expirationDate": 1798790400,
    "hostOnly": false,
    "httpOnly": false,
    "secure": false,
    "session": false,
    "sameSite": "no_restriction",
    "url": "https://.www.yourdomain.com"
  }
]
SCENARIO > patterns_section-1
Starting Chromy: {"chromeFlags":["--disable-gpu","--force-device-scale-factor=1","--disable-infobars=true","--window-size=600,960"],"port":9223,"waitTimeout":30000,"visible":false}
CREATING NEW REFERENCE FILES
Cookie state restored with: [
  {
    "path": "/",
    "name": "yourCookieName",
    "value": "yourCookieValue",
    "expirationDate": 1798790400,
    "hostOnly": false,
    "httpOnly": false,
    "secure": false,
    "session": false,
    "sameSite": "no_restriction",
    "url": "https://.www.yourdomain.com"
  }
]
SCENARIO > patterns_section-1
Starting Chromy: {"chromeFlags":["--disable-gpu","--force-device-scale-factor=1","--disable-infobars=true","--window-size=1008,1920"],"port":9224,"waitTimeout":30000,"visible":false}
CREATING NEW REFERENCE FILES
Cookie state restored with: [
  {
    "path": "/",
    "name": "yourCookieName",
    "value": "yourCookieValue",
    "expirationDate": 1798790400,
    "hostOnly": false,
    "httpOnly": false,
    "secure": false,
    "session": false,
    "sameSite": "no_restriction",
    "url": "https://.www.yourdomain.com"
  }
]
SCENARIO > patterns_section-1
Starting Chromy: {"chromeFlags":["--disable-gpu","--force-device-scale-factor=1","--disable-infobars=true","--window-size=1366,2048"],"port":9225,"waitTimeout":30000,"visible":false}
CREATING NEW REFERENCE FILES
Cookie state restored with: [
  {
    "path": "/",
    "name": "yourCookieName",
    "value": "yourCookieValue",
    "expirationDate": 1798790400,
    "hostOnly": false,
    "httpOnly": false,
    "secure": false,
    "session": false,
    "sameSite": "no_restriction",
    "url": "https://.www.yourdomain.com"
  }
]
SCENARIO > patterns_section-1
9224 Chrome v64 detected.
9225 Chrome v64 detected.
9223 Chrome v64 detected.
9222 Chrome v64 detected.
9224 INFO >  BackstopTools have been installed.
9222 INFO >  BackstopTools have been installed.
9223 INFO >  BackstopTools have been installed.
9225 INFO >  BackstopTools have been installed.

Even if I log into the container with the provided debugging command and run the “reference” command its will intermittently just hang and not complete. I monitored the processes in that docker instance then I ran backstop and as expected a bunch of chrome processes appeared and most of them closed again almost immediately, but a few just remained open forever. This is what I get:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
    1 root      20   0   20248   3212   2732 S   0.0  0.2   0:00.04 bash        
 1117 root      20   0   20248   2988   2696 S   0.0  0.1   0:00.02 bash        
 1122 root      20   0   21920   2320   1992 R   0.0  0.1   0:00.18 top         
 1687 root      20   0 1226124  51448  24688 S   0.0  2.5   0:00.92 node        
 1862 root      20   0  597420  82508  58824 S   0.0  4.0   0:00.27 chrome      
 1884 root      20   0    4392    704    620 S   0.0  0.0   0:00.00 cat         
 1885 root      20   0    4392    720    636 S   0.0  0.0   0:00.00 cat         
 1887 root      20   0  350692  40076  31860 S   0.0  2.0   0:00.01 chrome      
 1934 root      20   0  403824  46936  37968 S   0.0  2.3   0:00.03 chrome  

Does this happen for anyone else?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cactusacommented, Feb 22, 2018

Yup the hang was totally cause by this memory issue, thanks for that. I guess it’s my fault for not reading the readme properly …

0reactions
garriscommented, Feb 21, 2018

Yes. these are good points. One thing I am suspecting, there are some relative paths in your config – could there be a directory mapping issue there? Again, my docker experience is very limited – so I don’t really know if this is an issue – just a guess. Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

backstopjs/backstopjs Dockerfile - Docker Hub
FROM node:14.17.3 ARG BACKSTOPJS_VERSION ENV \ BACKSTOPJS_VERSION=$BACKSTOPJS_VERSION # Base packages RUN apt-get update && \ apt-get install -y git sudo ...
Read more >
Web Test Tools - SoftwareQATest.com
Listing of 500 web test tools and management tools - load testing, mobile testing, page speed testing, link checking, html validation, ...
Read more >
Overview of BackstopJS, a tool to test a web application's UI
In this article, we'll talk about the BackstopJS CSS regression testing framework, and how we integrated it in our business application to ...
Read more >
Full Stack Testing - Harness
Testing is a critical discipline for any organization looking to deliver high-quality software. This practical book provides.
Read more >
Untitled
Labarquette, Hapjeong hotel, Ancient japanese military ranks, Game in 60 seconds ... Aaj tum pe pyar aaya, Mondharmonica liedjes, Me without you is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found