parse-community / parse-community/parse-server

Error "Tried to create an ACL with an invalid permission type."

Open
#8,473 5 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #8474 by @yog27ray — merged
state:released-5.x.x type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.