Skip to content

Not connecting with Firestore MongoDB compatibility URI #397

@ramrajajith

Description

@ramrajajith

Environment:
Flutter version: 3.38.0
mongo_dart: ^0.10.5

Error:
MongoDart Error: Connection string must specify loadBalanced=true

Code:

void main() async {
  try {
    final db = await Db.create(
        '$firebaseMongoUri?loadBalanced=true&tls=true&authMechanism=SCRAM-SHA-256&retryWrites=false');
    await db.open();
    print('Connected to MongoDB');
  } catch (e) {
    print('Error connecting to MongoDB: $e');
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions