Description
*** error info ***
I/flutter (12537): LiveQuery: : ConnectMessage: {op: connect, applicationId: myAppId, masterKey: 123456, sessionToken: null}
I/flutter (12537): LiveQuery: : SubscribeMessage: {op: subscribe, requestId: 1, query: {className: Diet_Plans, where: {objectId: 2pNUgv1CKA}}, sessionToken: null}
I/flutter (12537): LiveQuery: : Listen: {"op":"error","error":"Invalid type: null (expected string)","code":1,"reconnect":true}
*** server log info***
2019-06-15T16:11:53.624Z - Connect message error Invalid type: null (expected string) 2019-06-15T16:11:53.623Z - Connect message error Invalid type: null (expected string) 2019-06-15T16:11:50.911Z - Can not find client undefined on disconnect 2019-06-15T16:11:35.270Z - Connect message error Invalid type: null (expected string) 2019-06-15T16:11:35.268Z - Connect message error Invalid type: null (expected string) 2019-06-15T16:11:32.126Z - Can not find client undefined on disconnect 2019-06-15T16:11:32.125Z - Client disconnect: undefined
code
`Future initData() async {
// Initialize parse
Parse().initialize(
keyParseApplicationId,
keyParseServerUrl,
masterKey: keyParseMasterKey,
debug: true,
liveQueryUrl: keyParseLiveServerUrl,
);
final ParseResponse response = await Parse().healthCheck();
if (response.success) {
await _listen();
}
}`
`Future _listen() async {
QueryBuilder query = QueryBuilder(DietPlan())
..whereEqualTo('objectId', '2pNUgv1CKA');
LiveQuery liveQuery = LiveQuery();
// print("=====query: $query");
await liveQuery.subscribe(query);
liveQuery.on(LiveQueryEvent.update, (dynamic value) {
print('*** UPDATE ***: ${DateTime.now().toString()}\n $value');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
// print((value as ParseObject).get('objectId'));
// print((value as ParseObject).get('updatedAt'));
// print((value as ParseObject).get('createdAt'));
print("data:" + (value as ParseObject).toJson().toString());
// _result.add(value);
});
}`