Closed balasubramanian1612s closed 3 years ago
I/flutter (29224): null I/flutter (29224): {ok: 0, errmsg: getLastError not supported for new-style commands in atlas free tier., code: 8000, codeName: AtlasError}
Two print statements results like this.
Just now tried creating one new mongo account. Still, I get the same ERROR. Pls, help.
The first null
you receive is because db.open does not return any value.
The error seems related to the fact that Atlas requires the OP_MSG
methods.
Try usinginsertOne
instead of insert.
Please, note that eJson
is not supported in mongo_dart
(use the ObjectId
class instead of {"\$oid": "55cba2476c522cafdb053ade"}
)
Thank you, it worked.
Same URL works fine in my NodeJS app.
Thanks for reply.