Closed
Description
Trying to open a connection to a local MongoDB result on this:
Unhandled exception:
type '_StreamHandlerTransformer<List<int>, MongoReplyMessage>' is not a subtype of type 'StreamTransformer<Uint8List, dynamic>' in type cast
#0 _ConnectionManager._connect (package:mongo_dart/src/network/connection_manager.dart:23:5)
<asynchronous suspension>
#1 _ConnectionManager.open.<anonymous closure> (package:mongo_dart/src/network/connection_manager.dart:58:14)
#2 Future.forEach.<anonymous closure> (dart:async/future.dart:492:26)
#3 Future.doWhile.<anonymous closure> (dart:async/future.dart:534:26)
#4 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#5 _RootZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1353:26)
#6 Future.doWhile (dart:async/future.dart:549:18)
#7 Future.forEach (dart:async/future.dart:490:12)
#8 _ConnectionManager.open (package:mongo_dart/src/network/connection_manager.dart:56:19)
#9 Db.open.<anonymous closure> (package:mongo_dart/src/database/db.dart:253:33)
#10 new Future.sync (dart:async/future.dart:224:31)
#11 Db.open (package:mongo_dart/src/database/db.dart:240:16)
#12 seed (package:mongodb_seeder/mongodb_seeder.dart:8:12)
<asynchronous suspension>
#13 main (file:///home/gabry/IntelliJIdea%20Projects/mongodb_seeder/bin/main.dart:5:3)
#14 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
I'm using Dart v2.4.0
Db db = Db("mongodb://127.0.0.1:27017/wfdb");
await db.open();
this is the code i'm using as stated into the readme on pub.dev
Metadata
Metadata
Assignees
Labels
No labels