-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
"cannot modify user" and request.user undefined on 2.2.5 & 2.2.6 #1404
Comments
We have lots of passing test cases that cover these features. Can you post some code that reliably reproduces your issue? Ideally as a test case we can add to our test suite. |
@drew-gross Thanks for the comment. I'm new to the programing so still figuring out how to write a test case. That's why we picked Parse in the first place. Anyways, after digging more into this, we found that when the iOS app first launches, the first couple functions (about 3 to 5) are being called with the correct request.user, but subsequent calls (same and different functions) within the same session will experience the error related to the undefined request.user. Here's an example function we have that runs and returns fine when the app initially launches, but start returning "you are not a user" error just a couple seconds after the app launches, within the same session.
At this point, we are not sure if it's a client issue or not. But if it is, I think we should have experienced this before 2.2.5 as nothing else was changed except for upgrading the server version. We will dig more into this, but I hope the info above would help you find the possible issue on the server side. |
It's very difficult to debug sporadic issues like that. Have you checked the requests being sent by the iOS app to make sure the request contents are the same? |
I logged the
2.2.4
2.2.5
|
Run parver server locally with You can test a parse sever locally with iOS using something like ngrok. |
@tanmays Here's the log. I noticed the second call in 2.2.5 has a different
|
Given that the server is responding with the exact same thing in both versions, I think this must be a client error. It's possible that a performance improvement in Parse Server exposed a race condition in your client that was previously hidden due to a longer response time or something like that, and thats why 2.2.4 appears to work. It might be a bug in iOS SDK, but since the client is in fact sending an invalid session, it can't be a bug in the server. |
Just some update: new users created post server migration don't have this issue. The users who had been migrated from the hosted parse are having this issue. So we ended up wiping the whole user db. |
@refre5h did you had revocable sessions enabled? seems that the INCORRECT token is a non revocable session token. |
@flovilmart the ios client does not explicitly set this enabled, i.e. it doesn't |
Yeah, that's a good idea as parse-server don't support legacy sessions |
I have this bug too. Absolutely the most annoying parse bug ever. Persnickity; there isn't even method to the madness. I can't save a username and password once logged in without getting a modification error. And yet I can alter ever other field at will. After setting the username and password--I do this AFTER loggining in-- I get: "error: Error Domain=Parse Code=206 "cannot modify user xxxxxx". It's really hard for me to 'program' by anticipating race condition bugs in the SDK...Not really sure what to do... The reason I want to set the username and password is so I can implement an instantaneous cached login upon launch. I don't want the user to have to press the LOGIN WITH FACEBOOK button every time to app boots up. If you have suggestions please tell me. Thank you |
Environment Setup
parse-server 2.2.4 + heroku + mlab
parse-server 2.2.5 + heroku + mlab
parse-server 2.2.6 + heroku + mlab
The issues
After updating to 2.2.5 / 2.2.6, 2 new errors occurred. Reverting back to 2.2.4 solves them. We also didn't have these problems in earlier parse-server versions.
Issue 1:
When writing to the _User object fIqh5VlbUy (logged in as that same user fIqh5VlbUy), get this error
cannot modify user fIqh5VlbUy
. Note: other users are also getting the error, not just fIqh5VlbUy.Issue 2:
We have cloud functions that have these lines of codes:
All these functions are returning the not a user error.
console.log(request.user)
givesundefined
.Steps to reproduce
Update from parse-server from 2.2.4 to 2.2.5.
The text was updated successfully, but these errors were encountered: