Hi dear community,
I need some help. I’m trying to connect to an Atlas Serverless database from Nodejs. It just won’t work. Tried and triple checked everything I found. mongosh connect works, so user/passwd must be right, and ip whitelisting must work too. Did http://portquiz.net:27017.
I followed https://www.mongodb.com/developer/how-to/atlas-serverless-quick-start/ to the letter, yet the insertOne fails with “MongoDriverError: MongoClient must be connected to perform this operation”.
Help please! <3
Cheers,
inki
2 Likes
Hi Inki,
Thank you for pointing this out. We are working on a fix for the Node.js driver and hope to have this complete in the next couple of days. We’ll update here when the updated driver is released.
For now, the python and java drivers, and mongosh should all be compatible.
Thanks,
Jesse
1 Like
Sky_Team
(Sky Team)
6
Also how about php driver for connect ?
1 Like
Hi @Sky_Team, currently the PHP driver is not yet supported. Here is a list of supported drivers: https://docs.atlas.mongodb.com/reference/serverless-instance-limitations/#minimum-driver-versions-for-serverless-instances
We are working hard to add more support very soon!
2 Likes
KILAB_Cloud
(Alessandro Aneggi)
8
Hello @codeSTACKr,
sorry but i am quite confused. In the link that you post is wrote that NodeJS is not supported, but then I found this:
And I tried to connect with Mongoose and it give me an error:
MongoDB disconnected!
Error in MongoDb connection: MongoParseError: Text record must only set `authSource` or `replicaSet`
(node:9708) UnhandledPromiseRejectionWarning: MongoParseError: Text record must only set `authSource` or `replicaSet`
at QueryReqWrap.callback (T:\Lavori_Software\k-core\node_modules\mongodb\lib\core\uri_parser.js:111:13)
at QueryReqWrap.onresolve [as oncomplete] (dns.js:205:10)
(node:9708) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9708) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Please can you clarify the situation? Is it supported or not NodeJS/Mongoose? If not, do you have an idea bout when it could be supported?
Thanks a lot
The Node.js drivers have been updated and are now working on Atlas serverless instances! 
Please be sure to use v4.1.0 or higher.
2 Likes
KILAB_Cloud
(Alessandro Aneggi)
10
Thanks. But I still have the same problem, and I used this software with Free instance of Mongo and it work perfectly. Can you help me to find why it doesn’t work? Thanks
Hi @KILAB_Cloud,
I’m not sure which driver version mongoose is using, but you will need to be sure to use mongodb v4.1.0 or higher to work with serverless instances.
KILAB_Cloud
(Alessandro Aneggi)
13
Thanks actualy mongoose use version 3.6.10:
default-microservice-anager@1.0.0 T:\Lavori_Software\k-core
-- mongoose@5.13.5 – mongodb@3.6.10
So I have o wait until Mongoose update to version 4.1.0 (soon I hope)
Thanks for the help
1 Like
codeSTACKr
(Jesse Hall)
15
Hi @Sky_Team, currently the PHP driver is not yet supported. Here is a list of supported drivers: https://docs.atlas.mongodb.com/reference/serverless-instance-limitations/#minimum-driver-versions-for-serverless-instances
We are working hard to add more support very soon!
2 Likes
@codeSTACKr Hi! According to the link you posted the Node Js is supported now? In the “Connect” tab in the console, it is shown as unsupported so far. What is the status of Node Js support now?
codeSTACKr
(Jesse Hall)
17
Hi @workreactor, Node.js v4.1.0+ is now supported. I will look into the “connect” tab documentation. Thank you for pointing that out!
2 Likes
Hi
I am using mongoose - v5.11.16 . And I am still getting the error
MongoParseError: Text record must only set authSource or replicaSet .
Can you help here
Thanks
Preveen
codeSTACKr
(Jesse Hall)
20
Hi @Knowledge_Store,
What MongoDB driver are you using? v4.1.0 or greater is required.
Thank you,
Jesse
Looks like Mongoose is using 3.6.10 MongoDB Driver. Any plan to support 3.6.10 in Atlas Serverless in the neat future
KILAB_Cloud
(Alessandro Aneggi)
22
Hello, next release of mongoose 6.0 now in RC1 will use Mongodb 4.1.0
we have just to wait a bit 
1 Like
Ok, thank you ! for the quick response
1 Like
I had the same issue and ended up here. I’ve tested and can confirm that mongoose 6.0.0 rc-1 works with Atlas Serverless.
npm i mongoose@6.0.0-rc1
Thanks @Jesse_Hal for your support on this.
2 Likes
codeSTACKr
(Jesse Hall)
25
Thank you for the update @Michael_Antoniades! That is very helpful 