mongodb-js / connect-mongodb-session

Lightweight MongoDB-backed session store for Connect and Express
Apache License 2.0
176 stars 35 forks source link

Error setting Session when used with mongoDB server 5.0.0 #95

Closed lvnilesh closed 3 years ago

lvnilesh commented 3 years ago
Error: Error setting OUutEUfGnAvkNPLnYzZsqdnZZGLJxS-c to Session {
  cookie: {
    path: '/',
    _expires: null,
    originalMaxAge: null,
    httpOnly: true,
    sameSite: 'none',
    secure: true
  }
}: connection 1 to 10.x.x.x:27017 closed
    at /usr/src/app/node_modules/connect-mongodb-session/index.js:229:21
    at /usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/utils.js:695:9
    at executeCallback (/usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/operations/execute_operation.js:65:7)
    at /usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/operations/update_one.js:33:23
    at handleCallback (/usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/utils.js:109:55)
    at /usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/operations/common_functions.js:380:21
    at handler (/usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/core/sdam/topology.js:956:16)
    at /usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/cmap/connection_pool.js:348:13
    at Object.handleOperationResult [as cb] (/usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/core/sdam/server.js:565:5)
    at Connection.handleIssue (/usr/src/app/node_modules/connect-mongodb-session/node_modules/mongodb/lib/cmap/connection.js:129:12)
vkarpov15 commented 3 years ago

Upgrade to connect-mongodb-session@3.x for MongoDB 5.0 support. v2.x of this package uses an incompatible version of the MongoDB node driver.

lvnilesh commented 3 years ago

Thank you.