Skip to content

fix: browser tests failing because containers can't find Redis#814

Open
asmit27rai wants to merge 3 commits intolibp2p:masterfrom
asmit27rai:DNS
Open

fix: browser tests failing because containers can't find Redis#814
asmit27rai wants to merge 3 commits intolibp2p:masterfrom
asmit27rai:DNS

Conversation

@asmit27rai
Copy link
Copy Markdown

Fixes #787

What was happening

All 42 browser tests (chromium, firefox, webkit) were failing because
the containers couldn't find transport-redis by name.

What I changed

1. Told Docker which DNS to use (run-single-test.sh)

  • Added dns: 127.0.0.11 to the docker-compose template
  • This is Docker's built-in DNS server — makes sure containers
    always know how to find each other by name

2. Added retry logic (.aegir.js in v1.x, v2.x, v3.x)

  • Instead of trying to connect to Redis once and dying, now it
    tries 10 times with a short wait between each attempt
  • If it connects on the first try (normal case), nothing changes

3. Fixed a potential broken DNS config file (BrowserDockerfile in v1.x, v2.x, v3.x)

  • Playwright install can sometimes break /etc/resolv.conf
  • Added a check that fixes it if it's broken, does nothing if it's fine

Files changed

  • transport/lib/run-single-test.sh — dns config in compose template
  • transport/images/js/v1.x/.aegir.js — retry logic
  • transport/images/js/v2.x/.aegir.js — retry logic
  • transport/images/js/v3.x/.aegir.js — retry logic
  • transport/images/js/v1.x/BrowserDockerfile — resolv.conf fix
  • transport/images/js/v2.x/BrowserDockerfile — resolv.conf fix
  • transport/images/js/v3.x/BrowserDockerfile — resolv.conf fix

@dhuseby
Copy link
Copy Markdown
Contributor

dhuseby commented Feb 16, 2026

I have a PR landing that I think also fixes this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browsers implementations docker issue

3 participants