question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting with autoEncryption causes repeated connection and disconnection.

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? When connecting with autoEncryption in options to use FLE, mongoose connects and disconnects repeatedly.

If the current behavior is a bug, please provide the steps to reproduce. Connect to a mongo 4.4.3 instance with the autoEncryption option set, something such as

{ useUnifiedTopology: true, useNewUrlParser: true, autoIndex: false, useCreateIndex: true, autoEncryption: { keyVaultNamespace, kmsProviders, schemaMap, }, }

This exact setup worked with mongo 4.2 just fine.

What is the expected behavior? Previously when connecting to mongo version 4.2 everything worked as expected, it would connect and not lose the connection.

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that “latest” is not a version. Node 13.5, Mongoose 5.11.14, mongodb driver 3.6.3, mongodb 4.4.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
cor1commented, Feb 23, 2021

@vkarpov15 It appears that my app still functions correctly and when I look at the logs to the mongocryptd the connection is maintained. however in the event handlers

mongoose.connection.on('connected', () => console.log(`Connected`));
mongoose.connection.on('disconnected', () => console.log('Disconnected'));

the logs are thrown repeatedly. Are you able to get consistent results with these event handlers? Im not super worried now that it appears it doesnt actually drop the connection.

0reactions
IslandRhythmscommented, Mar 22, 2021

@vkarpov15 seems to be an issue with the drivers. I think we can close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kr00k might be reason behind disconnecting... connecting...
Say you connect via very popular WPA2 protocol. There happens a 4 way handshake between your device and wifi router, to exchange the...
Read more >
node.js - mongodb update schema for client side encryption field
The encryption schema is a connection option, not a document validator: ... add the autoEncryption parameter to the mogoose.connect command.
Read more >
AsyncIOMotorClient – Connection to MongoDB — Motor 1.2.5 ...
Create a new connection to a single MongoDB instance at host:port. ... DEPRECATED: Get a list of the names of all databases on...
Read more >
Issues connecting Android phones to UniFI - Ubiquiti Community
The access points seem to be running fine, and have been able to connect Windows ... Config Info: WPA personal - WPA Mode...
Read more >
7 Reasons Your VPN Keeps Disconnecting (And How to Fix It)
There could be issues with your broadband connection, WiFi network, or the router you're using to connect to it. If you have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found