parse-community / parse-community/parse-server
Error "Tried to create an ACL with an invalid permission type."
A pull request for this has already been merged.
- #8474 by @yog27ray — merged
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
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 version of Parse Server.
Issue Description
I am updating the parse server from "5.2.8" to "5.4.2", and getting the below error
TypeError: Tried to create an ACL with an invalid permission type.
at new ParseACL (/project/node_modules/parse/lib/node/ParseACL.js:70:21)
at ParseRole._handleSaveResponse (/project/node_modules/parse/lib/node/ParseObject.js:614:25)
at /project/node_modules/parse/lib/node/ParseObject.js:3183:22
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Whenever I got the above error the arg1 parameter in the ParseACL.js constructor is called with the below value.
{ __op: 'Delete' }
I noticed when starting from the fresh empty database. I need to start the server multiple times to start the server as before starting the server it creates some roles. Every attempt create a few more entries in the Role table, Once all roles are created Server starts.
I also tried resetting acl in before save of Role request.object.setACL(new Parse.ACL()); but still end up with same error.
Server
- Parse Server version:
5.4.2 - Operating system: Ubuntu
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Docker
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
4.2.3 - 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace locations in parse/lib/node/ParseACL.js and parse/lib/node/ParseObject.js, then review the merged pull request #8474 for the issue's resolution. Reproduce the startup sequence with an empty MongoDB database and verify that role creation completes without passing { __op: 'Delete' } as an ACL permission type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, mongodb, node.js
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100