-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
Issue Description
get error when using live query with query.fields
but this work on 2.8.4
Steps to reproduce
this is OK
{
"op": "subscribe",
"requestId": 1,
"query": {
"className": "Player",
"where": {"name": "test"}
},
"sessionToken": "" // Optional
}
this get error
{
"op": "subscribe",
"requestId": 1,
"query": {
"className": "Player",
"where": {"name": "test"},
"fields": ["name"] // Optional
},
"sessionToken": "" // Optional
}
Expected Results
{"op":"create","clientId":"xxx","requestId":10,"object":xxxxxxx,"original":null}
Actual Outcome
(node:1468) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'className' of null
at Client._toJSONWithFields (/rbd/pnpm-volume/3de49c66-6120-4e8e-822d-0dc5af59b3dd/node_modules/.registry.npmjs.org/parse-server/3.5.0/node_modules/parse-server/lib/LiveQuery/Client.js:95:50)
at Client.pushCreate (/rbd/pnpm-volume/3de49c66-6120-4e8e-822d-0dc5af59b3dd/node_modules/.registry.npmjs.org/parse-server/3.5.0/node_modules/parse-server/lib/LiveQuery/Client.js:79:39)
at _matchesCLP.then.then (/rbd/pnpm-volume/3de49c66-6120-4e8e-822d-0dc5af59b3dd/node_modules/.registry.npmjs.org/parse-server/3.5.0/node_modules/parse-server/lib/LiveQuery/ParseLiveQueryServer.js:293:33)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1468) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 3.0.0-3.5.0
- Operating System: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
-
Database
- MongoDB version: [FILL THIS OUT]
- Storage engine: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
Logs/Trace
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed