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

websocket broken connection not handled in live query server #8010

Closed
4 tasks done
pash2048 opened this issue May 21, 2022 · 3 comments · Fixed by #8012
Closed
4 tasks done

websocket broken connection not handled in live query server #8010

pash2048 opened this issue May 21, 2022 · 3 comments · Fixed by #8012
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@pash2048
Copy link
Contributor

pash2048 commented May 21, 2022

New Issue Checklist

Issue Description

Parse live query not check broken WebSocket connection and close them and 'websocketTimeout' in 'LiveQueryServerOptions' not have any effect, we need to handle and close broken connection

Steps to reproduce

Start a live query server and then connect to those, for example, if we lose our connection(torn off WIFI or ...) we don't get any event with Parse.Cloud.onLiveQueryEvent and connection still open

Actual Outcome

if we unplug the ethernet cable or turn off mobile data or WIFI nothing happens and the parse server doesn't get it

Expected Outcome

Close connection after websocketTimeout then trigger an event onLiveQueryEvent

Environment

Server

  • Parse Server version: 5.2.1
  • Operating system: ubuntu-desktop 18.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local and Parspack cloud provider

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.4.14
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
  • SDK version: 3.4.2
@parse-github-assistant
Copy link

parse-github-assistant bot commented May 21, 2022

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed and removed type:bug Impaired feature or lacking behavior that is likely assumed labels May 21, 2022
@pash2048 pash2048 reopened this May 24, 2022
@pash2048
Copy link
Contributor Author

pash2048 commented May 24, 2022

Dear @mtrezza, I fix it and want to contribute but problem is that I don't have any idea about how can create a test to check it.
can you help me, please?

@mtrezza
Copy link
Member

mtrezza commented May 24, 2022

@pash2048 Sure! I suggest you create a pull request and link it to this issue, so we can take a look.

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