Skip to content
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

LiveQuery connection interrupts frequently #8047

Closed
4 tasks done
LMBernardo opened this issue Jun 16, 2022 · 1 comment · Fixed by #8048
Closed
4 tasks done

LiveQuery connection interrupts frequently #8047

LMBernardo opened this issue Jun 16, 2022 · 1 comment · Fixed by #8048
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@LMBernardo
Copy link
Contributor

Issue Description

PR #8012 doesn't set the waitingForPong flag correctly on the 'pong' event, leading to the websocket connection being closed approximately every 10 seconds as it effectively misses the 'pong'. If LiveQuery auto-reconnect is enabled, this results in a loop of repeatedly connecting and disconnecting from the LiveQuery server.

Steps to reproduce

  1. Run parse-server as of 72fac8a with LiveQuery set up.
  2. Connect to LiveQuery with a client
  3. Observe the connection dropping repeatedly

Actual Outcome

LiveQuery connection is not stable.

Expected Outcome

LiveQuery connection is stable.

Server

  • Parse Server version: 5.3.0-alpha.16
  • Operating system: Windows
  • Local or remote host: Local

Database

  • System: MongoDB
  • Database version: 5.0.9
  • Local or remote host: MongoDB Atlas

Client

  • SDK: Flutter (Web)
  • SDK version: 3.1.2

Logs

ReSubScription:{}
LiveQuery Connected!
Creating heartbeat timer...
The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9107?uri=http://127.0.0.1:56951/is
LiveQuery Disconnected!
ReSubScription:{1: Instance of 'Subscription<ParseObject>', 2: Instance of 'Subscription<ParseObject>'}
LiveQuery Connected!
Creating heartbeat timer...
LiveQuery Disconnected!
ReSubScription:{1: Instance of 'Subscription<ParseObject>', 2: Instance of 'Subscription<ParseObject>'}
LiveQuery Connected!
Creating heartbeat timer...
LiveQuery Disconnected!
ReSubScription:{1: Instance of 'Subscription<ParseObject>', 2: Instance of 'Subscription<ParseObject>'}
LiveQuery Connected!
Creating heartbeat timer...
LiveQuery Disconnected!
ReSubScription:{1: Instance of 'Subscription<ParseObject>', 2: Instance of 'Subscription<ParseObject>'}
LiveQuery Connected!
Creating heartbeat timer...
LiveQuery Disconnected!
ReSubScription:{1: Instance of 'Subscription<ParseObject>', 2: Instance of 'Subscription<ParseObject>'}
LiveQuery Connected!
...
info: Create new client: 7647f64b-4bc5-4c7a-a9b1-70cb9d2a6b5a
info: Client disconnect: 7647f64b-4bc5-4c7a-a9b1-70cb9d2a6b5a
info: Create new client: 2fe6fd4b-6fbd-4775-94e4-441e6c727a03
info: Client disconnect: 2fe6fd4b-6fbd-4775-94e4-441e6c727a03
info: Create new client: 4156afbd-c95a-42f7-beac-90d5cadbd7e4
info: Client disconnect: 4156afbd-c95a-42f7-beac-90d5cadbd7e4
info: Create new client: 70f87120-62e0-4da2-a76b-9fe36ccae72b
info: Client disconnect: 70f87120-62e0-4da2-a76b-9fe36ccae72b
info: Create new client: e4b78065-ef96-4bb1-bdb2-58fbc118d6eb
info: Create new client: b65caa02-f0bd-4937-ab12-799f0dd8e445
info: Client disconnect: e4b78065-ef96-4bb1-bdb2-58fbc118d6eb
info: Create new client: a12ee413-7171-4ef3-810d-e9e756079e09
info: Client disconnect: b65caa02-f0bd-4937-ab12-799f0dd8e445
info: Create new client: cac18dc6-0771-4825-b051-71fd7cc69b0c
info: Client disconnect: a12ee413-7171-4ef3-810d-e9e756079e09
info: Create new client: 89532f91-1037-4a8a-9080-d4a301d94596
info: Client disconnect: cac18dc6-0771-4825-b051-71fd7cc69b0c
info: Create new client: eb136b72-4f7e-4578-af82-a89f9c273852

...

WireShark

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jun 16, 2022

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@mtrezza mtrezza changed the title PR #8012 breaks LiveQuery LiveQuery connection interrupts frequently Jun 16, 2022
@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jun 16, 2022
@mtrezza mtrezza linked a pull request Jun 16, 2022 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants