Name of Failure:
asynchronous.test_encryption.TestAutomaticDecryptionKeys.test_03_invalid_keyid incorrect regex error
test_encryption.TestAutomaticDecryptionKeys.test_03_invalid_keyid incorrect regex error
Link to task:
Context of when and why the failure occurred:
Stack trace:
[2025/03/11 11:57:22.754] pymongo/helpers_shared.py:250: OperationFailure [2025/03/11 11:57:22.754] The above exception was the direct cause of the following exception: [2025/03/11 11:57:22.754] Traceback (most recent call last): [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/encryption.py", line 764, in create_encrypted_collection [2025/03/11 11:57:22.754] await database.create_collection(name=name, **kwargs), [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/_csot.py", line 109, in csot_wrapper [2025/03/11 11:57:22.754] return await func(self, *args, **kwargs) [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/database.py", line 631, in create_collection [2025/03/11 11:57:22.754] await coll._create(kwargs, s) [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/collection.py", line 692, in _create [2025/03/11 11:57:22.754] await self._create_helper( [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/collection.py", line 663, in _create_helper [2025/03/11 11:57:22.754] await self._command( [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/collection.py", line 620, in _command [2025/03/11 11:57:22.754] return await conn.command( [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/helpers.py", line 47, in inner [2025/03/11 11:57:22.754] return await func(*args, **kwargs) [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/pool.py", line 534, in command [2025/03/11 11:57:22.754] return await command( [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/asynchronous/network.py", line 217, in command [2025/03/11 11:57:22.754] helpers_shared._check_command_response( [2025/03/11 11:57:22.754] File "/data/mci/bdc95a1868ac5c7719481b8341d6ebdb/src/pymongo/helpers_shared.py", line 250, in _check_command_response [2025/03/11 11:57:22.754] raise OperationFailure(errmsg, code, response, max_wire_version) [2025/03/11 11:57:22.754] pymongo.errors.OperationFailure: BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData', full error: {'ok': 0.0, 'errmsg': "BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData'", 'code': 14, 'codeName': 'TypeMismatch', '$clusterTime': {'clusterTime': Timestamp(1741719251, 141), 'signature': {'hash': b'\x81\x9aC\xf196{2\xb3\xfbRc\x98IY(D\x07\xd6m', 'keyId': 7480626208246333466}}, 'operationTime': Timestamp(1741719251, 141)} [2025/03/11 11:57:22.754] The above exception was the direct cause of the following exception: [2025/03/11 11:57:22.754] pymongo.errors.EncryptedCollectionError: BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData', full error: {'ok': 0.0, 'errmsg': "BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData'", 'code': 14, 'codeName': 'TypeMismatch', '$clusterTime': {'clusterTime': Timestamp(1741719251, 141), 'signature': {'hash': b'\x81\x9aC\xf196{2\xb3\xfbRc\x98IY(D\x07\xd6m', 'keyId': 7480626208246333466}}, 'operationTime': Timestamp(1741719251, 141)} [2025/03/11 11:57:22.754] During handling of the above exception, another exception occurred: [2025/03/11 11:57:22.754] self = <test.asynchronous.test_encryption.TestAutomaticDecryptionKeys testMethod=test_03_invalid_keyid> [2025/03/11 11:57:22.754] async def test_03_invalid_keyid(self): [2025/03/11 11:57:22.754] > with self.assertRaisesRegex( [2025/03/11 11:57:22.754] EncryptedCollectionError, [2025/03/11 11:57:22.754] "create.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData", [2025/03/11 11:57:22.754] ): [2025/03/11 11:57:22.754] E AssertionError: "create.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData" does not match "BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData', full error: {'ok': 0.0, 'errmsg': "BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData'", 'code': 14, 'codeName': 'TypeMismatch', '$clusterTime': {'clusterTime': Timestamp(1741719251, 141), 'signature': {'hash': b'\x81\x9aC\xf196{2\xb3\xfbRc\x98IY(D\x07\xd6m', 'keyId': 7480626208246333466}}, 'operationTime': Timestamp(1741719251, 141)}" [2025/03/11 11:57:22.754] test/asynchronous/test_encryption.py:2985: AssertionError
- duplicates
-
SERVER-102101 TypeMismatch error on creating encrypted field for collection contains incorrect command name
-
- Needs Scheduling
-
- is caused by
-
SERVER-100936 Mongos must return WCE for create collection
-
- Closed
-