Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
When saving a new Parse.Object that is saved with a new Parse.File, the following error occurs.
TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)
Likely it's from _getId()
not being implemented for the ParseFile
class? Since _getId()
is called here when saving unsaved children.
Parse-SDK-JS/src/unsavedChildren.js
Line 37 in 8115e95
Steps to reproduce
// a File object
const file : File;
const parseFile = new Parse.File('myFileName', file);
const parseObject = new Parse.Object({ prop1: "hello", file: parseFile });
parseObject.save();
Actual Outcome
TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)
Expected Outcome
No errors
Environment
Node.js v16.13.1
Server
- Parse Server version:
^5.4.0
- Operating system:
Mac OS Monterey 12.5.1, Ubuntu 22.04
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local network served Node.JS
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
6.0.2
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local network served
Client
- Parse JS SDK version:
3.5.1
Logs
TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)