Open unpin opened 7 months ago
Can you give more backstory? what db cluster is this? Atlas?
Do you have non base64 decodable chars in your string?
Sure! I'm trying to connect to a free tier Atlas cluster and this is what my connection string basically looks like:
const DATABASE_URL = "mongodb+srv://admin:123456@cluster/db?authMechanism=SCRAM-SHA-1"
Username and password contain only Base64 chars. Connection establishes without any problems when using mongo@v0.32.0 or earlier, but fails when using mongo@v0.33.0.
I think it's related to #406
I have this for 0.33
AError connecting to MongoDB Error: MongoError: "Connection failed: Failed to decode base64"
at MongoClient.connect (https://deno.land/x/mongo@v0.33.0/src/client.ts:63:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async getDb (file:///home/daniel/pro/matrix-aggregator-scraper/src/storage/mongo.ts:17:5)
at async file:///home/daniel/pro/matrix-aggregator-scraper/db.ts:4:14
error: Uncaught (in promise) Error: MongoError: "Connection failed: Failed to decode base64"
throw new MongoDriverError(`Connection failed: ${e.message || e}`);
^
at MongoClient.connect (https://deno.land/x/mongo@v0.33.0/src/client.ts:63:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async getDb (file:///home/daniel/pro/matrix-aggregator-scraper/src/storage/mongo.ts:17:5)
at async file:///home/daniel/pro/matrix-aggregator-scraper/db.ts:4:14
After upgrading to mongo@v0.33.0, the connection consistently fails with the error "Connection failed: Failed to decode base64", occurring both locally and on Deno Deploy. I had to downgrade to mongo@v0.32.0 for now.