Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NodeJS] [@testcontainers/mysql] No longer starts on MacOS #823

Open
bokjo opened this issue Aug 23, 2024 · 1 comment
Open

[NodeJS] [@testcontainers/mysql] No longer starts on MacOS #823

bokjo opened this issue Aug 23, 2024 · 1 comment
Labels
triage Investigation required

Comments

@bokjo
Copy link

bokjo commented Aug 23, 2024

Expected Behaviour

MySQL container should start and successfully connect to the Docker Desktop container
...

Actual Behaviour
starting the container throws an error:

 Error: (HTTP code 404) no such container - No such container: 62b3884112f3e4196bfd61a98b41c58fe984b1ba506f3ef812d62c4487d4b5cf 
          at /Users/bojanche/[REDACTED]/node_modules/docker-modem/lib/modem.js:343:17
          at IncomingMessage.<anonymous> (/Users/bojanche/[REDACTED]/node_modules/docker-modem/lib/modem.js:370:9)
          at IncomingMessage.emit (node:events:532:35)
          at endReadableNT (node:internal/streams/readable:1696:12)
          at processTicksAndRejections (node:internal/process/task_queues:90:21) {
        reason: 'no such container',
        statusCode: 404,
        json: null
      }

...

Testcontainer Logs
Cannot be fetched, the container in Docker attempts to start for a split second but it is gone
...

Steps to Reproduce
Container start code:

const mySqlContainer = await new MySqlContainer(
      process.env.MYSQL_TEST_CONTAINER_IMAGE ? process.env.MYSQL_TEST_CONTAINER_IMAGE : "mysql:5.7",
    )
      .withUsername("user")
      .withUserPassword("userpw")
      .withRootPassword("rootpw")
      .withDatabase(dbName || "cart")
      .withCommand(["--sql-mode=NO_ENGINE_SUBSTITUTION"])     
      .withExposedPorts(3306)
      .start();

Environment Information

  • Operating System: MacOS Sonoma 14.6.1 (was the same on 14.4.1) [Intel]
  • Docker Version: 4.33.0 (160616) (Engine: 27.1.1)
  • Node version: v22.7.0 ( same outcome on v20.17.0 LTS)
  • Testcontainers version: v10.11.0 ( same outcome on v10.7.2)

p.s btw it is fine on Linux ( GitLab CI runner)!

@cristianrgreco
Copy link
Collaborator

cristianrgreco commented Aug 28, 2024

You'll need to provide more info. The error says that the container doesn't exist, add a log consumer to the container or add a breakpoint and look at the container logs to see why it is exiting. The MySQL container runs as part of the build and doesn't have an issue, so it must be environment specific.

@cristianrgreco cristianrgreco added the triage Investigation required label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Investigation required
Projects
None yet
Development

No branches or pull requests

2 participants