All mongodb drivers < 6.0.0 seems broken, and 6.0.0 is unusbale due to memory leaking

A few days ago, i update from mongodb@4.11.0 to mongodb@6.0.0
I started seeing massive memory leaks so decided to downgrade to mongodb@5.8.1
But after doing that, i cannot connect to mongodb atlas anymore, but get an error
payload.split is not a function
inside lib/cmap/auth/scram.js at

I could quickly see, the error was at
payload.split(‘,’);
You cannot use split on a Buffer, so I assume it was supposed to be
payload.toString().split(‘,’);

I need to build this in docker, so just hiot fiing the .js file locally is not a solution, so I simply downgraded to mongodb@4.17.1
I still get the same error with mongodb@4.17.1

Getting desperate so I downgraded to the original version mongodb@4.11.0
and i STILL get the error

So my best guess is some package mongodb depend on, has been updated and it’s breaking the mongodb
driver …
Is there a status on when this is fixed ?

Tried deleting package-lock.json and node_modules then it started working.
So something in my package-lock.json must have been messed up … Pheeww …

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.