Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-576

Include the reason crypt_shared failed to load in error message

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Proposal

      Include the error from mcr_dll_open when crypt_shared fails to load and an override path is set. Include the error from mcr_dll_open to this error.

      Background & Motivation

      Motivated by a discussion with kenneth.white@mongodb.com. A common mistake is using crypt_shared library built for the wrong architecture. The error returned by the driver does not indicate the cause of the error. Example:

      A crypt_shared override path was specified [/Users/kevin.albertson/bin/mongo_crypt_shared_v1-macos-x86_64-enterprise-6.0.5/lib/mongo_crypt_v1.dylib], but we failed to open a dynamic library at that location

      libmongocrypt logs the error from mcr_dll_open:

      dlopen(/Users/kevin.albertson/bin/mongo_crypt_shared_v1-macos-x86_64-enterprise-6.0.5/lib/mongo_crypt_v1.dylib, 0x0005): tried: '/Users/kevin.albertson/code/libmongocrypt/.install/lib//mongo_crypt_v1.dylib' (no such file), '/Users/kevin.albertson/bin/mongo_crypt_shared_v1-macos-x86_64-enterprise-6.0.5/lib/mongo_crypt_v1.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

      Not all drivers surface libmongocrypt logs. See Do drivers expose libmongocrypt logs?.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: