Skip to content

LiveQuery stops working for client and class when subscribed with null condition #7609

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
4 tasks done
mtrezza opened this issue Oct 7, 2021 · 3 comments
Closed
4 tasks done
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@mtrezza
Copy link
Member

mtrezza commented Oct 7, 2021

New Issue Checklist

Issue Description

Originally reported by @vahidalizad:

There is bug in /src/LiveQuery/QueryTools.js:216 in the master branch with throws an error can't find __type of null because compareTo is null.

Only the null subscribed client does not get any events at all anymore for that class but the rest of the clients have no issues.
in my tests I realized q.notEqualTo('***', null); also have this problem, and clients with these conditions can't get events and the real issue apart from that is they don't get notified that the problem is compareTo parameter.

I think the q.notEqualTo('***', null); should work nicely and result in objects that are not null on that parameter but the error of Cannot read property '__type' of null is throwing on this condition as well.

Steps to reproduce

// client side
let q = new Parse.Query('User')
q.lessThan('createdAt', null)
q.subscribe()

Actual Outcome

Expected Outcome

Environment

Server

  • Parse Server version: 4.10.3

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): JS
  • SDK version: unknown

Logs

n/a

@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 7, 2021

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 severity:medium type:bug Impaired feature or lacking behavior that is likely assumed bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) labels Oct 7, 2021
@dplewis
Copy link
Member

dplewis commented Nov 14, 2024

@mtrezza Should be fixed via #8835

@mtrezza
Copy link
Member Author

mtrezza commented Nov 19, 2024

Yes, the description in #8834 seems to refer to the same issue.

@mtrezza mtrezza closed this as completed Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants