Closed kaisellgren closed 11 years ago
JsonExt does not support all Bson types. Notable not supported are BsonRegexp and BsonCode. Lately I tried to bring bson library to all platform - vm, dartium and (with some workarounds) dart2js, Last (github) version of objectory got rid of JsonExt and use bson for network communication. That may solve this issue and https://github.com/vadimtsushko/objectory/issues/18 also
Feel free to try it.
I've just published new version of objectory with bson based client/server communications
I tried it, this is what I get now:
IsolateUnhandledException: exception while handling message: null
The null object does not have a getter 'codeUnits'.
NoSuchMethodError : method not found: 'codeUnits'
Receiver: null
Arguments: []
original stack trace:
#0 _throwDelayed.<anonymous closure> (dart:async:1133:5)
#1 _asyncRunCallback._asyncRunCallback (dart:async:34:17)
#2 _asyncRunCallback._asyncRunCallback (dart:async:44:9)
#3 Timer.run.<anonymous closure> (dart:async:2251:21)
#4 Timer.run.<anonymous closure> (dart:async:2259:13)
#5 Timer.Timer.<anonymous closure> (dart:async-patch:15:15)
#6 _Timer._createTimerHandler._handleTimeout (dart:io:6730:28)
#7 _Timer._createTimerHandler._handleTimeout (dart:io:6738:7)
#8 _Timer._createTimerHandler.<anonymous closure> (dart:io:6746:23)
#9 _ReceivePortImpl._handleMessage (dart:isolate-patch:81:92)
It's not getting caught anywhere, so it goes to IsolateUnhandledException. Too bad we can't see the exact place where it throws... can you repro?
It happens as simply as:
objectory.findOne($Group.match('name', 'test')).then(print);
Latest Objectory and SDK: 0.5.1.0_r22072
Fixed related bug in bson. Added test testMatch - passes successfully on all platforms
This code:
$Group.match('name', 'Test');
Fails on the server:
I'm using: