Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks done
yog27ray opened this issue Mar 10, 2023 · 5 comments · Fixed by #8474
Open
4 tasks done

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

yog27ray opened this issue Mar 10, 2023 · 5 comments · Fixed by #8474
Labels
state:released-5.x.x Released as LTS version type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@yog27ray
Copy link
Contributor

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
@parse-github-assistant
Copy link

parse-github-assistant bot commented Mar 10, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@dblythy
Copy link
Member

dblythy commented Mar 10, 2023

This might be related to #8386. It would help if you could provide some of the code used to trigger this error (such as Cloud triggers as well), or open a PR with a failing test 😊

@yog27ray
Copy link
Contributor Author

@dblythy I have created a PR with a failing test case.

@mtrezza mtrezza changed the title Error "Tried to create an ACL with an invalid permission type." while updating parse server from "5.2.8" to "5.4.2" Error "Tried to create an ACL with an invalid permission type." Mar 10, 2023
@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Mar 10, 2023
@mtrezza mtrezza linked a pull request Mar 10, 2023 that will close this issue
4 tasks
@mtrezza
Copy link
Member

mtrezza commented Mar 10, 2023

@yog27ray Thanks for confirming that this issue only occurs in 5.x and not in 6.x. Fixing this is up to the community as we only fix security vulnerabilities in LTS versions. If this is not picked up by the community we recommend to upgrade to 6.x.

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.4.3

@parseplatformorg parseplatformorg added the state:released-5.x.x Released as LTS version label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-5.x.x Released as LTS version type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
4 participants