Skip to content

ParseLiveListWidget doesn't work #623

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
yp19 opened this issue May 8, 2021 · 12 comments
Closed

ParseLiveListWidget doesn't work #623

yp19 opened this issue May 8, 2021 · 12 comments

Comments

@yp19
Copy link

yp19 commented May 8, 2021

I am using following server and client versions
"parse-server": "^4.5.0" (server)
parse_server_sdk_flutter: ^3.0.0 (client)

Flutter log contains following lines (mostly)

I/flutter ( 8004): LiveQuery: : Socket opened
I/flutter ( 8004): LiveQuery: : ConnectMessage: {op: connect, applicationId: appid, sessionToken: r:token}
I/flutter ( 8004): LiveQuery: : Done
I/flutter ( 8004): LiveQueryReconnectingController: Retrytimer set to 10000ms
I/flutter ( 8004): LiveQueryReconnectingController: LiveQueryClientEvent.DISCONNECTED

Server log contains following lines (mostly)

info: Client disconnect: undefined
error: Can not find client undefined on disconnect

Flutter parse init:

await Parse().initialize(
    keyParseApplicationId,
    keyParseServerUrl,
    debug: true,
    liveQueryUrl: keyLiveQueryUrl,
    coreStore: await CoreStoreSharedPrefsImp.getInstance(),
    autoSendSessionId: true,
  );

Note: The LiveQuery is working with Javascript code.

@yp19
Copy link
Author

yp19 commented May 8, 2021

@RodrigoSMarques Could you help with this. Thanks in advance.

@RodrigoSMarques
Copy link
Contributor

It is not a problem in LiveQuery because I am using it in two projects without errors.

Is the problem using ParseLiveListWidget?

I don't know what this widget does.

@fischerscode do you know what it can be?

@pastordee
Copy link
Contributor

pastordee commented May 12, 2021

It can’t be ParseLiveListWidget I’m using it and it works well for me.

I’m using
"parse-server": "^4.5.0" (server)
parse_server_sdk_flutter: nullsafety (client)

@fischerscode
Copy link
Contributor

@yp19
Please 'inspect' your web app and have a look at the network traffic (instructions for chrome). Your problem might be caused by CORS.

@yp19 @pastordee
Please note that there is a live query bug in version 4.5.0. There might appear problems if you have multiple live queries running at once. I recommend using a custom version of 4.5.0 that contains the fix that was merged to master in 7341. If you want a simple solution, you could use the version I use. It has been running as a the back end for a beta app for almost a month now.

@pastordee
Copy link
Contributor

@yp19

Please 'inspect' your web app and have a look at the network traffic (instructions for chrome). Your problem might be caused by CORS.

@yp19 @pastordee

Please note that there is a live query bug in version 4.5.0. There might appear problems if you have multiple live queries running at once. I recommend using a custom version of 4.5.0 that contains the fix that was merged to master in 7341. If you want a simple solution, you could use the version I use. It has been running as a the back end for a beta app for almost a month now.

Okay thanks will check it out tonight

@yp19
Copy link
Author

yp19 commented May 14, 2021

@fischerscode Thanks for the reply.

I tried your suggestion with flutter web. I have enabled CORs. It is working fine with flutter web.

But it is not working with flutter android, getting the same log repeatedly in adb log:

I/flutter (18510): LiveQueryReconnectingController: LiveQueryClientEvent.DISCONNECTED
I/flutter (18510): LiveQuery: : close
I/flutter (18510): LiveQuery: : Socket opened
I/flutter (18510): LiveQuery: : ConnectMessage: {op: connect, applicationId: appId, sessionToken: r:token}
I/flutter (18510): LiveQuery: : Done
I/flutter (18510): LiveQueryReconnectingController: Retrytimer set to 10000ms
I/flutter (18510): LiveQueryReconnectingController: LiveQueryClientEvent.DISCONNECTED

Any other ideas?

@fischerscode
Copy link
Contributor

@yp19
I assume it's not working when build with --release.
In this case, I think it is most likely you missed this step.

@yp19
Copy link
Author

yp19 commented May 14, 2021

@fischerscode
I was not using the --release flag.

Without that permission set, the server was receiving connections, I able to see the log on server, I have posted the server log entries in the description.

But I have added the permission now. It's still has the same problem.

I am using firebase auth, it is working fine and also it able to load the initial list of items with a query. Only the LiveQuery is not working. Something to do with the Websocket connection.

@yp19
Copy link
Author

yp19 commented May 14, 2021

@fischerscode
I have tested with --release flag as well. Seeing the same log.

I see the server is working from flutter web and regular javascript client.

Any ideas?

@yp19
Copy link
Author

yp19 commented May 20, 2021

@fischerscode Friendly ping

@fischerscode
Copy link
Contributor

@yp19
Sorry, I think my GitHub notification did not work for a while.

Does the same problem appear on mobile?

Stuff, I would try:

  • specify a client key
  • make a minimal test project
  • run a parse-server locally (rules out internet problems)

@RodrigoSMarques
Copy link
Contributor

Closing. No activity in the last 15 days.
If necessary open again.

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

4 participants