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

Improve error if path to libmongocrypt is passed instead of crypt_shared

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      Passing the path to the libmongocrypt library (.dll/.so/.dylib) instead of crypt_shared results in an error, but does not help identify the issue.

      Here is an example:

      auto_encryption_opts = AutoEncryptionOpts(
          kms_providers, key_vault_namespace,
          # `crypt_shared_lib_path` should be the path to crypt shared (mongo_crypt_v1.dylib), not libmongocrypt!
          crypt_shared_lib_path="/Users/kevin.albertson/code/c-bootstrap/install/libmongocrypt-1.12.0/lib/libmongocrypt.dylib"
      )
      
      # Raises error:
      # A crypt_shared override path was specified [/Users/kevin.albertson/code/c-bootstrap/install/libmongocrypt-1.12.0/lib/libmongocrypt.dylib], but we failed to open a dynamic library at that location. Load error: [(null)]
      client = MongoClient(auto_encryption_opts=auto_encryption_opts)
      

      If attempting to load fails, consider trying to load a known libmongocrypt symbol. Then return an error like "Passed path to libmongocrypt, but need path to crypt_shared".

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

              Created:
              Updated: