-
-
Notifications
You must be signed in to change notification settings - Fork 206
liveQuery dosn't work. #177
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
Comments
@zenz QueryBuilder<ParseObject> query =
QueryBuilder<ParseObject>(ParseObject('TestAPI'))
..whereEqualTo('intNumber', 1);
await liveQuery.subscribe(query); Livequery needs to receive a QueryBuilder which is the query you want to monitor |
@zenz
This should fix your issue. |
@phillwiggins Thanks but it dosn't work. here's my code.
and keyLiveQueryUrl = "wss://myhost:myport/mypath" Parse Server :3.4.0 |
Which version of the library are you using?
Judging by your comment and your code, the variable liveQueryUrl is null.
Obviously, this should be checked so that it doesn't throw a null pointer
but in the mean time, that seems to be the obvious issue.
…On Tue, 28 May 2019 at 15:21, Zenz ***@***.***> wrote:
@phillwiggins <https://github.com/phillwiggins> Thanks but it dosn't work.
here's my code.
Parse().initialize(keyParseApplicationId, keyParseServerUrl,
liveQueryUrl: keyLiveQueryUrl, debug: true);
QueryBuilder<ParseObject> query =
QueryBuilder<ParseObject>(ParseObject('Diet_Plans'));
LiveQuery liveQuery = LiveQuery();
await liveQuery.subscribe(query);
liveQuery.on(LiveQueryEvent.update, (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'));
});
and keyLiveQueryUrl = "wss://myhost:myport/mypath"
and I can confirm LiveQuery Server working properly.
Parse Server :3.4.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#177>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB4CPXQ4HWYEFUPKY4YNNKDPXU5XRANCNFSM4HQCXVAQ>
.
--
Kind Regards
Phill Wiggins
[email protected]
|
What is not working? Is the error message displayed? |
dev_dependencies: It seems that Parse().initialize not working well with liveQueryUrl parameter. So LiveQuery liveQuery = LiveQuery(); makes _client.data.liveQueryURL equals to null. |
@RodrigoSMarques first thing first. It's not an issue about LiveQuery Server configuration. it's an issue about Parse.Init process. |
My code works for me. Internally it switches from https to wss or http to ws Parse().initialize("xxxxxxxxDmPTmRjfoSwpTPPmGsPUMKYxxxxx",
"https://api.XXXXXXXXXXXXX.com/1",
clientKey: "XXXi3GejX3SIxpDgSbKHHV8uHUUP3QGiPPTlxxxx",
autoSendSessionId: true,
debug: false,
liveQueryUrl: "https://api.XXXXXXXXXXXXX.com/1"); |
Enable debug mode e put the execution log. |
Sorry, it's my fault! |
But as a suggestion, should we add a initialized state in Parse object so that we cannot re-initialize it again? |
It dosn't work.
While I use :
LiveQuery liveQuery = LiveQuery();
await liveQuery.subscribe(query);
It will bring me this error:
NoSuchMethodError (NoSuchMethodError: The method 'contains' was called on null.
in the parse_live_query.dart file, it seems the object was not exist.
Originally posted by @zenz in #165 (comment)
The text was updated successfully, but these errors were encountered: