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.

TimeoutError, Docker configuration and ERR_CONNECTION_REFUSED

See original GitHub issue

When running backstopjs from travis, I have many issues like follow:

Puppeteer encountered an error while running scenario "dialog: LoginForm"
TimeoutError: waiting for selector ".login-btn" failed: timeout 30000ms exceeded

Since tests pass on local, this issue is unique to the travis environment. Hoping that it would resolve such errors, I’m trying to setup docker to run tests with --shm-size 512m. But I’m having troubles configuring the /etc/hosts of the docker image.

Basically, I want backstop to query my nginx server using a specific local domain name, then have nginx forward the request to the backend server. docker cannot query the domain name out of the box. I tried adding the extra_hosts option to my docker-compose config file

  backstop:
    image: backstopjs/backstopjs
    depends_on:
    - reverse-proxy
    volumes:
    - ../../project:/src
    shm_size: 512m
    extra_hosts:
    - "project.local:127.0.0.1"

But it results in new errors when running backstop

Puppeteer encountered an error while running scenario "dialog-signup"
Error: net::ERR_CONNECTION_REFUSED at https://project.local/backstop

I also tried to play with networks, but unsure as to how I should configure it, I couldn’t get it working. I tried things like this:

version: '3.4'   # docker 17.09.0+  & docker-compose 1.23.2

services:

  reverse-proxy:
    build: ./reverse-proxy
    ports:
    - 443:443
    depends_on:
    - backend
    volumes:
    - ./reverse-proxy/project.conf:/etc/nginx/conf.d/project.conf
    networks:
      nginx:
        aliases:
          - project.local

  backstop:
    image: backstopjs/backstopjs
    depends_on:
    - reverse-proxy
    volumes:
    - ../../project:/src
    shm_size: 512m
    networks:
    - nginx

networks:
  nginx:

Do you know how to properly update a docker-compose config to use BackstopJS with a specific domain name ? Or might you know of a solution regarding the initial TimeoutError error so I can run backstopjs without docker from travis ?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
garriscommented, Feb 27, 2019

Articles are totally cool – thanks for posting! Do you mind if I link to them from the doc?

Also, quick notes: I am pretty sure that approve can be used with --filter and a viewport label e.g. approve --filter=<scenaroName>.*<viewportName> because it is grepping on filename.

And second: in some cases you may be able to avoid writing a config file by using the node invocation e.g. https://github.com/garris/BackstopJS/blob/master/README.md#pass-a-config-object-to-the-command

Just some suggested options.

Cheers

1reaction
garriscommented, Mar 20, 2019

Sorry for the delay – thank you for the reminder! Just added! Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker run connection timeout - Stack Overflow
I was getting timeouts on Windows 10 Docker 17.03.0-ce-rc1. To fix it I opened Settings / Network and then set the DNS server...
Read more >
Resolve "Connection refused" or "Connection timed out ... - AWS
I'm receiving "Connection refused" or "Connection timed out" errors when trying to connect to my EC2 instance with SSH.
Read more >
How to Fix the ERR_CONNECTION_TIMED_OUT Error - Kinsta
In this post, we take a deep dive into the “ERR_CONNECTION_TIMED_OUT” error and examine why you might see this and what you can...
Read more >
Connection refused? Docker networking and how it impacts ...
Learn how to fix connection refused errors when trying to connect to a Docker container.
Read more >
Resolving "Connection refused" or "Connection timed out ...
#CloudComputing #AmazonWebServices #AWS. Resolving " Connection refused " or "Connection timed out" errors connecting to my EC2 Instance.
Read more >

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