-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Thanks for this tool!
I am porting our current pipeline to DDEV where we have Nightwatch tests executed on the host. We use ubuntu-24.04 in our GHA and I was surprised that tests fail because Chrome opened by Nightwatch complains about certificate errors, then I found this in the logs:
Created a new local CA 💥
The local CA is now installed in the system trust store! ⚡️
ERROR: no Firefox and/or Chrome/Chromium security databases found
The local CA is already installed in Java's trust store! 👍
Environment
- GitHub Actions runner: ubuntu-24.04
- DDEV version: 1.24.7
- Testing framework: Nightwatch (running on host, not in container)
- Browser: Chrome/Chromium
Steps to reproduce
- Set up DDEV project in GitHub Actions with ubuntu-24.04
- Run Nightwatch tests from host against DDEV site
- Observe SSL certificate errors in browser
- Check GHA logs for mkcert installation errors
Expected behavior
SSL certificates should be properly installed and trusted by browsers
Actual behavior
mkcert reports "ERROR: no Firefox and/or Chrome/Chromium security databases found"
Proposed solution
The action could detect when browser security databases are missing and initialize them before running mkcert -install. This could be implemented as:
- Detection step: Check if browser databases exist
- Initialization step: Start browsers briefly to create databases if missing
- Installation step: Run mkcert installation
Example implementation in the action:
# Initialize browser security databases if they don't exist
if ! find ~/.mozilla -name "cert9.db" 2>/dev/null | grep -q .; then
timeout 10s firefox --headless --no-sandbox || true
fi
if ! find ~/.pki -name "cert9.db" 2>/dev/null | grep -q .; then
timeout 10s google-chrome --headless --no-sandbox --disable-gpu || true
fi
# Now install certificates
mkcert -install
Alternatively, the action could provide an option to skip SSL certificate installation entirely for testing scenarios where it's not needed.
Impact
This affects teams using:
- GitHub Actions with ubuntu-24.04 (likely increasing as it becomes the default)
- End-to-end testing frameworks that run on the host (Nightwatch, Playwright, Cypress)
- SSL-enabled DDEV sites (which is the default)
The current workaround requires teams to either disable SSL verification in their tests or manually initialize browsers in their workflows, adding complexity and reducing the "just works" experience that DDEV aims to provide.
Current workaround
For now, teams can work around this by adding these steps to their workflow before DDEV setup:
- name: Initialize browser databases
run: |
# Start Firefox briefly to initialize its security database
timeout 10s firefox --headless || true
# Start Chrome briefly to initialize its security database
timeout 10s google-chrome --headless --no-sandbox || true
- name: Reinstall mkcert certificates
run: |
mkcert -install
Assuming that others could also run into this issue, I would suggest fixing certificate installation in this action somehow so it would just work ™️.