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.

Cursor session id (none) is not the same as the operation context's - release 5.0.15 broken

See original GitHub issue

bug with the latest mongoose (guess the underyling problem lies in mongodb-core though).

What is the current behavior? After upgrading to 5.0.15 no queries are running anymore:

Unhandled rejection MongoError: Cursor session id (none) is not the same as the operation context's session id (f6a28f6f-7dfa-424d-8691-fd40b12733ee - 0rbp3hXFaGQzW/eEz2QZrZ7et36CzL3bnxgnuRX9rEo=)
    at /home/simon/Dev/Web/hokify-server/node_modules/mongodb-core/lib/connection/pool.js:598:61
    at authenticateStragglers (/home/simon/Dev/Web/hokify-server/node_modules/mongodb-core/lib/connection/pool.js:516:16)
    at Connection.messageHandler (/home/simon/Dev/Web/hokify-server/node_modules/mongodb-core/lib/connection/pool.js:552:5)
    at emitMessageHandler (/home/simon/Dev/Web/hokify-server/node_modules/mongodb-core/lib/connection/connection.js:309:10)
    at Socket.<anonymous> (/home/simon/Dev/Web/hokify-server/node_modules/mongodb-core/lib/connection/connection.js:452:17)
    at Socket.emit (events.js:159:13)
    at addChunk (_stream_readable.js:265:12)
    at readableAddChunk (_stream_readable.js:252:11)
    at Socket.Readable.push (_stream_readable.js:209:10)

If the current behavior is a bug, please provide the steps to reproduce. Just upgrade it, didn’t change anything else.

What is the expected behavior? Work the same way like it does with 5.0.14. Downgrading to .14 solves all problems instantely.

Please mention your node.js, mongoose and MongoDB version. node v9.3.0 mongoose 5.0.15 mongodb 3.6.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vkarpov15commented, Apr 24, 2018

As a workaround, try passing the skipSessions option to the failing query.

MyModel.find({}, null, { skipSessions: true });

The MongoDB driver implicitly creates sessions if you’re connected to MongoDB 3.6 running WT, that option will turn off that behavior. Should help with this issue.

0reactions
simllllcommented, May 8, 2018

New mongodb-core got released today, as soon as mongoose upgrades to 5.0.18 tthe issues should be done/gone!

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

[NODE-1420] Cursor session id (none) is not the same as ...
Only one collection and especially one query is failin: Guess it has either todo with the content or with the length of the...
Read more >
MongoDB Node.js Driver 4.0.0: Cursor session id issues in ...
MongoServerError: Cursor session id ([session hash])is not the same as the operation context's session id (none).
Read more >
I got an error fetching data in production mode (Cursor ...
Hello I only started using mongodb about a month ago so I'm not sure if this ... is not the same as the...
Read more >
PyModbus Documentation
Pymodbus is a full Modbus protocol implementation using a synchronous or asynchronous (using asyncio) core. Supported modbus communication ...
Read more >
crash bug fix and enhancement update
[Orabug: 27093288] [2.0.27-1] - New upstream release 2.0.27 [2.0.23-3] ... entry cache is not cleaned up if an operation is aborted - Resolves:...
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