Parse-SDK-JS
Parse-SDK-JS copied to clipboard
Query only works after any update on Dashboard
New Issue Checklist
- [x ] I am not disclosing a vulnerability.
- [ x] I am not just asking a question.
- [x ] I have searched through existing issues.
- [/x] I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
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
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.
Have you checked your class level permission in the dashboard?
Class level permission is public read / write.
In your Parse Server Configuration do you have allowClientClassCreation turned off?
@dplewis Yes I have it off.
Turning it on should fix your issue. See here
@dplewis but I want to read only from app side. Would that not enable classes to be editable and even created on client side?
Can you update to the latest version of Parse Server?
@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) ?
Depends on the changes from 5.XX to 6.XX may have some breaking changes.
@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 })
}