Description
Issue Description
We have an enterprise app that we developed with a parse backend. it was used successfully until parse was shut down. we performed the migration and upgraded the app. it worked from jan to aug 2017. now when i attempt to do anything like editing a user object or read from it, we get an error message Cannot modify user. also the other thing we noticed is that the new user records that are created (we can create but we still get this error message) do not have a session?
here is an example user object, old one there is no problem in using it, whereas the new one there are issues.
{
"_id": "XtYHiJQBoJ",
"device_number": 14,
"_perishable_token": "4l3iFlvvFpaIDnmi6ZgKvFDse",
"job_number": 478,
"_updated_at": {
"$date": "2016-07-09T12:38:51.790Z"
},
"name": "Project1",
"_created_at": {
"$date": "2015-07-06T15:38:59.650Z"
},
"projectId": "old",
"userType": "company",
"user_email": "d@o.com",
"_hashed_password": "$2a$10$AaBLnu0sLCwbOr.j3jBPUexKlSnLsPr1.Q/mr.JG1kO5yFr2acufa",
"username": "1436197139475",
"_session_token": "M8JI0Jsohs1gGbJ8EqIiObSDC",
"serialNumber": "XtYHiJQBoJ"
}
{
"_id": "SeYVcHsqK5",
"username": "1510670135358",
"user_email": "d@ol.com",
"name": "New",
"projectId": "U00",
"userType": "company",
"device_number": 0,
"job_number": 0,
"_hashed_password": "$2a$10$HIfMTcT.lZIKIoc2Y.h.reJrOaBLB9FKScWi404qTRPUeQwvDcyKy",
"_wperm": [
"SeYVcHsqK5"
],
"_rperm": [
"",
"SeYVcHsqK5"
],
"_acl": {
"SeYVcHsqK5": {
"w": true,
"r": true
},
"": {
"r": true
}
},
"_created_at": {
"$date": "2017-11-14T14:35:35.398Z"
},
"_updated_at": {
"$date": "2017-11-14T14:35:35.398Z"
}
}
Steps to reproduce
we also noticed in heroku in the last 4 months, node was upgraded from "node": ">=4.3"
to "node": "6.11.x"
in our code we are using the following to look up code, when querying the serialnumber for the older record, we get results for the new record we get serial not found.
PFQuery *query = [PFQuery queryWithClassName:@"_User"];
[query whereKey:@"serialNumber" equalTo:code];
[query getFirstObjectInBackgroundWithBlock:^(PFObject *company, NSError *error) {
if (!company) {
[MBProgressHUD hideAllHUDsForView:self.view animated:NO];
[Utilities showAlertWithTitle:@"Serial number is incorrect"];
Expected Results
if queried, return a result or when the object is edited, no error is returned
Actual Outcome
Cannot modify user
Environment Setup
-
Server
- parse-server version 1.4.0
- Operating System: Linux
- Hardware: free tier
- Localhost or remote server? Heroku
-
Database
- mongod version: 3.4.7
- Storage engine: MMAPv1
- Hardware: shared
- Localhost or remote server? mLab
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.