Skip to content

Cannot read .indexOf undefined on matchesKeyConstraints when attribute missing #7416

Open
@jdposthuma

Description

@jdposthuma

New Issue Checklist

Issue Description

When an object is missing an expected attribute, an unhandled error occurs.

Steps to reproduce

To be honest, I'm not sure how objects are getting malformed.

This issue is causing a crash my LiveQueryServer that listens for live queries using ParseServer.createLiveQueryServer.

Actual Outcome

Because it's outside of the context of an Express.js request, the entire node process crashes.

Expected Outcome

I'm expecting it not to crash

Failing Test Case / Pull Request

  • 🤩 I submitted a PR with a fix and a test case.
  • 🧐 I submitted a PR with a failing test case.

Environment

Server

  • Parse Server version: 4.5.0
  • Operating system: Debian
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS

Database

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

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
  • SDK version: n/a

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions