Skip to content
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

Query only works after any update on Dashboard #1995

Open
andresteves opened this issue Aug 22, 2023 · 11 comments
Open

Query only works after any update on Dashboard #1995

andresteves opened this issue Aug 22, 2023 · 11 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@andresteves
Copy link

New Issue Checklist

Issue Description

So I have setup my Parse Server(5.2.0) and Dashboard(4.1.0) and I am using the JS SDK latest version to build a React Native app with Parse integration but queries respond with ParseError: 119 This user is not allowed to access non-existent class: Task. But Task class exists and if I update any field then the query works fine. Any ideas?

Steps to reproduce

Basic query responds with ParseError: 119 This user is not allowed to access non-existent class: Task. Task class exists

Actual Outcome

ParseError: 119 This user is not allowed to access non-existent class: Task.

Expected Outcome

Class Tasks values

Environment

Server

  • Parse Server version: 5.2.0
  • Operating system: Debian GNU/Linux 10 (buster)
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): remote server

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: db version v5.0.6
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): remote server

Client

  • Parse JS SDK version: 4.1.0

Logs

@parse-github-assistant
Copy link

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.

@dplewis
Copy link
Member

dplewis commented Aug 22, 2023

Have you checked your class level permission in the dashboard?

@andresteves
Copy link
Author

Class level permission is public read / write.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Aug 23, 2023
@dplewis
Copy link
Member

dplewis commented Aug 23, 2023

In your Parse Server Configuration do you have allowClientClassCreation turned off?

@andresteves
Copy link
Author

@dplewis Yes I have it off.

@dplewis
Copy link
Member

dplewis commented Aug 23, 2023

Turning it on should fix your issue. See here

@andresteves
Copy link
Author

@dplewis but I want to read only from app side. Would that not enable classes to be editable and even created on client side?

@dplewis
Copy link
Member

dplewis commented Aug 23, 2023

Can you update to the latest version of Parse Server?

@andre-sonect
Copy link

@dplewis I know this might be a dumb question but is there any problem on updating the version directly (meaning do I need to do a backup or anything) ?

@dplewis
Copy link
Member

dplewis commented Aug 25, 2023

Depends on the changes from 5.XX to 6.XX may have some breaking changes.

@andre-sonect
Copy link

andre-sonect commented Oct 7, 2023

@dplewis does parse-server sleeps for some reason because I am trying the same now on a backoffice and it does login fine but then when trying to fetch a pointer inside _User class, it returns undefined.

try {
		await Parse.User.logOut();
		var usr = await Parse.User.logIn(req.body.email, req.body.password);
		usr = Parse.User.current();
		var query = new Parse.Query('Client');
		var client = await query.get(usr.get('clientId').id);     <-------- get('client').id returns undefined ----
		var flags = client.get('flags');
		
		if (flags.includes('****')) {
			res.redirect('/contents/welcome')
		}  else {
			res.redirect('/app/about')
		}
	} catch (error) {
		res.render('index', { error: 'Invalid username/password: ' + error })
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

4 participants