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

Error downloading binary for ARM chip #505

Closed
aaronfay opened this issue Jul 13, 2021 · 2 comments
Closed

Error downloading binary for ARM chip #505

aaronfay opened this issue Jul 13, 2021 · 2 comments
Labels
bug working as intended Its Working as Expected

Comments

@aaronfay
Copy link

Versions

  • NodeJS: 12.20.1
  • mongodb-memory-server-*: 6.9.6
  • mongodb(the binary version): 4.4.3
  • mongoose: 5.12.13
  • system: MacOS (Big Sur on M1)

package: mongo-memory-server

What is the Problem?

Unable to download ARM binary when running tests using the package

Output

Starting the instance failed, please enable debug for more infomation
  1) "before all" hook in "{root}"

  0 passing (425ms)
  1 failing

  1) "before all" hook in "{root}":
     Error: Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination doesn't exist
  Used Url: "https://fastdl.mongodb.org/osx/mongodb-osx-ssl-arm64-4.0.14.tgz"
Try to use different version 'new MongoMemoryServer({ binary: { version: 'X.Y.Z' } })'
List of available versions can be found here:
  https://www.mongodb.org/dl/linux for Linux
  https://www.mongodb.org/dl/osx for OSX
  https://www.mongodb.org/dl/win32 for Windows
      at ClientRequest.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts:341:17)
      at ClientRequest.EventEmitter.emit (domain.js:483:12)
      at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:601:27)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:122:17)
      at TLSSocket.socketOnData (_http_client.js:474:22)
      at TLSSocket.EventEmitter.emit (domain.js:483:12)
      at addChunk (_stream_readable.js:297:12)
      at readableAddChunk (_stream_readable.js:272:9)
      at TLSSocket.Readable.push (_stream_readable.js:213:10)
      at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

Do you know why it happenes?

There is a 403 from the mirror, not sure if this is the cause or not.

@aaronfay aaronfay added the bug label Jul 13, 2021
@ghost
Copy link

ghost commented Jul 14, 2021

Had this same problem; following the docs/guides/supported-systems.md, readily solved by updating my .zshrc:

export MONGOMS_ARCH=x64

@hasezoey hasezoey added the working as intended Its Working as Expected label Jul 14, 2021
@hasezoey
Copy link
Member

hasezoey commented Jul 14, 2021

OSX ARM is not supported by default in 6.x, but since 7.x it is automatically translated to use what @jeffrey-dugas-neo said (to use x64, because mongodb does not provide any native builds yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug working as intended Its Working as Expected
Projects
None yet
Development

No branches or pull requests

2 participants