Skip to content

Error when trying to run tests #867

@Blacedraco

Description

@Blacedraco

Versions

  • NodeJS: 20.12.2
  • mongodb-memory-server-*: 6.0.4
  • mongodb(the binary version): 6.0.4
  • mongodb(the js package): 0.0.0
  • mongoose: ^8.2.4
  • system: Windows,

package: mongo-memory-server

What is your question?

If i try to run tests i get the following error Message:

Determining test suites to run...Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:
 UnexpectedCloseError: Instance closed unexpectedly with code "3221225781" and signal "null"
Exit Code is large, commonly meaning that vc_redist is not installed, the latest vc_redist can be found at https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
    at MongoInstance.closeHandler (C:...\node_modules\mongodb-memory-server-core\lib\util\MongoInstance.js:302:58)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)
Error: Instance closed unexpectedly with code "3221225781" and signal "null"
Exit Code is large, commonly meaning that vc_redist is not installed, the latest vc_redist can be found at https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
    at MongoInstance.closeHandler (C:...\node_modules\mongodb-memory-server-core\lib\util\MongoInstance.js:302:58)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)

and if i try to use a specific version with the following command,

"test": " set MONGOMS_VERSION=6.0.4 && jest --runInBand",

i get the message:

Error: Download failed for url "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.4%20.zip", Details:
Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination doesn't exist
Try to use different version 'new MongoMemoryServer({ binary: { version: 'X.Y.Z' } })'
List of available versions can be found here: https://www.mongodb.com/download-center/community/releases/archive
    at RedirectableRequest.<anonymous> (C:\...\node_modules\mongodb-memory-server-core\lib\util\MongoBinaryDownload.js:272:32)
    at RedirectableRequest.emit (node:events:518:28)
    at RedirectableRequest._processResponse (C:\...\node_modules\follow-redirects\index.js:398:10)
    at RedirectableRequest._onNativeResponse (C:\...\node_modules\follow-redirects\index.js:91:12)
    at Object.onceWrapper (node:events:633:26)
    at ClientRequest.emit (node:events:518:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:698:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:540:22)
    at TLSSocket.emit (node:events:518:28)

Neither me nor my professor have any idea how to fix it, but already tried reinstalling everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions