Skip to content

Crash on db open #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Zeruel92 opened this issue Aug 19, 2019 · 1 comment
Closed

Crash on db open #155

Zeruel92 opened this issue Aug 19, 2019 · 1 comment

Comments

@Zeruel92
Copy link

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

@thosakwe
Copy link
Contributor

thosakwe commented Sep 17, 2019

Resolved, see the discussions at #159, #160, and #162. https://pub.dev/packages/mongo_dart/versions/0.3.6

LMK if the error persists after you run pub upgrade mongo_dart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants