Skip to content

MongoMemoryServer errors when running the integration test from the plugin template #12170

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

Open
atlasgong opened this issue Apr 21, 2025 · 0 comments
Assignees

Comments

@atlasgong
Copy link

Describe the Bug

On a fresh Ubuntu 24.10 install:
Running the default integration test provided by the plugin template returns the error

Test Suites: 1 failed, 1 total
Tests:       3 failed, 3 total
Snapshots:   0 total
Time:        1.054 s, estimated 10 s
Ran all test suites.
  console.warn
    Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:
     UnexpectedCloseError: Instance closed unexpectedly with code "null" and signal "SIGILL"
    The Process Exited with SIGILL, which mean illegal instruction, which is commonly thrown in mongodb 5.0+ when not having AVX available on the CPU
        at MongoInstance.closeHandler (/home/atlas/ashds/node_modules/.pnpm/mongodb-memory-server-core@10.1.4/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:581:52)
        at ChildProcess.emit (node:events:518:28)
        at maybeClose (node:internal/child_process:1101:16)
        at Socket.<anonymous> (node:internal/child_process:456:11)
        at Socket.emit (node:events:518:28)
        at Pipe.<anonymous> (node:net:351:12)

      at node_modules/.pnpm/mongodb-memory-server-core@10.1.4/node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:359:17
      at MongoMemoryServer.start (node_modules/.pnpm/mongodb-memory-server-core@10.1.4/node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:350:5)
          at async Promise.all (index 0)

 ELIFECYCLE  Test failed. See above for more details.

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/tree/main/templates/plugin

Reproduction Steps

  1. Run pnpx create-payload-app@latest -t plugin
  2. Enter project name, press enter, wait for success message
  3. Unrelated but thedotenv dev dependency is missing so you must run pnpm add -D dotenv. (A PR is already created for this fix(deps): add missing dotenv dev dependency for plugin template #12168),
  4. Run pnpm test
  5. Note the error

Which area(s) are affected? (Select all that apply)

area: templates

Environment Info

Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.8.1
Relevant Packages:
  payload: 3.29.0
  next: 15.3.0
  @payloadcms/db-mongodb: 3.29.0
  @payloadcms/db-postgres: 3.29.0
  @payloadcms/graphql: 3.29.0
  @payloadcms/next/utilities: 3.29.0
  @payloadcms/richtext-lexical: 3.29.0
  @payloadcms/translations: 3.29.0
  @payloadcms/ui/shared: 3.29.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #104 SMP Mon Mar 17 06:15:48 UTC 2025
  Available memory (MB): 12009
  Available CPU cores: 10
@atlasgong atlasgong added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Apr 21, 2025
@github-actions github-actions bot removed the validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. label Apr 21, 2025
@r1tsuu r1tsuu self-assigned this Apr 22, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Apr 22, 2025
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

No branches or pull requests

2 participants