Hi All,
I’d greatly appreciate some help. I’m having difficulty connecting my development meteor instance to a remote mongodb atlas server. I am running version 1.8.1 as have just updated because I also couldn’t get it to work on version 1.5.1
The issue only arises when I try to set the MONGO_URL parameter (app loads fine when connecting to local minimongo instance)
I have no problem connecting via mongodb compass from the same machine so theoretically its nothing to do with whitelisting etc.
I’m using a batch file in windows and here is the contents (this has been copied from atlas’s “connect your application”>“connection string only”
SET MONGO_URL="mongodb+srv://[myusername]:[mypassword]@cluster0-u8ed4.gcp.mongodb.net/test?retryWrites=true^&w=majority"
meteor
The error I am getting is as follows:
TypeError: Cannot read property 'split' of null
W20191024-21:32:14.879(13)? (STDERR) at parseSrvConnectionString (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb-core\lib\uri_parser.js:40:23)
W20191024-21:32:14.880(13)? (STDERR) at parseConnectionString (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb-core\lib\uri_parser.js:421:12)
W20191024-21:32:14.881(13)? (STDERR) at connect (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb\lib\operations\mongo_client_ops.js:188:3)
W20191024-21:32:14.882(13)? (STDERR) at connectOp (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb\lib\operations\mongo_client_ops.js:292:3)
W20191024-21:32:14.884(13)? (STDERR) at executeOperation (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb\lib\utils.js:420:24)
W20191024-21:32:14.885(13)? (STDERR) at MongoClient.connect (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb\lib\mongo_client.js:168:10)
W20191024-21:32:14.885(13)? (STDERR) at Function.MongoClient.connect (C:\Users\Alex\AppData\Local\.meteor\packages\npm-mongo\3.1.2\npm\node_modules\mongodb\lib\mongo_client.js:372:22)
W20191024-21:32:14.886(13)? (STDERR) at new MongoConnection (packages/mongo/mongo_driver.js:177:11)
W20191024-21:32:14.887(13)? (STDERR) at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
W20191024-21:32:14.888(13)? (STDERR) at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
W20191024-21:32:14.889(13)? (STDERR) at Object.defaultRemoteCollectionDriver (packages\underscore.js:784:19)
W20191024-21:32:14.890(13)? (STDERR) at new Collection (packages/mongo/collection.js:97:40)
W20191024-21:32:14.890(13)? (STDERR) at new AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
W20191024-21:32:14.891(13)? (STDERR) at new AccountsServer (packages/accounts-base/accounts_server.js:23:5)
W20191024-21:32:14.892(13)? (STDERR) at server_main.js (packages/accounts-base/server_main.js:7:12)
W20191024-21:32:14.895(13)? (STDERR) at fileEvaluate (packages\modules-runtime.js:336:7)
Can someone tell me what I am doing wrong?