-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
- You've met the prerequisites.
- You're running the latest version of Parse Server.
- You've searched through existing issues. Chances are that your issue has been reported or resolved before.
What is the issue?
I recreate an issue but it is related to #639 . Please do not close it yet and let me explain the problem 😄 First the issue is not a problem itself and having "anonymous": null is perfectly fine. So I think it makes sense to create an issue which cares about this possible bug (at least @flovilmart marked as bug on the other issue).
Environment Setup
VERBOSE=1
Steps to reproduce
That's the biggest issue, it happens only on mobile because it is related to the anonymous feature which has been thought for mobile only. However I succeed to make two flavours of my app (however it is closed source, so I hope we can solve the bug without needing my app yet, I can provide access for further investigations but not to the whole world 😆). One flavour is on the parse.com and the other is running the latest vanilla version of my server.
As you may expect the Parse.com is slower but works perfectly and the bug only concerns Parse-Server.
Logs/Trace
Let's try to debug it without the app; here are the curl and the response from Parse.com (working):
curl -H "X-Parse-OS-Version: 5.1.1" -H "X-Parse-App-Build-Version: 2600" -H "X-Parse-Client-Key: SpMJdbK3bjpSLsjObOqbrXK9anPgSPmUhNbRWOc1" -H "X-Parse-Client-Version: a1.13.0" -H "X-Parse-App-Display-Version: 0.2.69" -H "X-Parse-Installation-Id: 64043607-6efc-40f0-922a-28e2ff80ea8e" -H "User-Agent: Parse Android SDK 1.13.0 (jobninja.eu.jobninja.local.debug/2600) API Level 22" -H "X-Parse-Session-Token: r:0dGnBqRP4QqBd7WttLYBBBkKT" -H "X-Parse-Application-Id: 0XvfzNl5TNXfUvrGE0Z6nmTdYdYE7ob6adx6HFM0" -H "Content-Type: application/json" -H "Host: api.parse.com" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data-binary '{"username":"[email protected]","password":"jjhfhv","authData":{"anonymous":null},"objectId":"MxPu5cndJy"}' -X PUT --compressed https://api.parse.com/1/classes/_User/MxPu5cndJy
Response:
{
"updatedAt": "2016-03-22T19:59:32.828Z",
"username": "[email protected]"
}
User is updated, everything fine; then I try to login:
curl -H "X-Parse-Revocable-Session: 1" -H "X-Parse-OS-Version: 5.1.1" -H "X-Parse-App-Build-Version: 2600" -H "X-Parse-Client-Key: SpMJdbK3bjpSLsjObOqbrXK9anPgSPmUhNbRWOc1" -H "X-Parse-Client-Version: a1.13.0" -H "X-Parse-App-Display-Version: 0.2.69" -H "X-Parse-Installation-Id: 64043607-6efc-40f0-922a-28e2ff80ea8e" -H "User-Agent: Parse Android SDK 1.13.0 (jobninja.eu.jobninja.local.debug/2600) API Level 22" -H "X-Parse-Application-Id: 0XvfzNl5TNXfUvrGE0Z6nmTdYdYE7ob6adx6HFM0" -H "Content-Type: application/json" -H "Host: api.parse.com" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data-binary '{"username":"[email protected]","password":"jjhfhv","_method":"GET"}' --compressed https://api.parse.com/1/login
Response, working:
{
"createdAt": "2016-03-22T19:59:02.848Z",
"objectId": "MxPu5cndJy",
"sessionToken": "r:YiwU9Go4haDaxnYZ2tpGkjLIz",
"updatedAt": "2016-03-22T19:59:32.828Z",
"username": "[email protected]"
}
The Parse-server, not working:
curl -H "X-Parse-OS-Version: 5.1.1" -H "X-Parse-App-Build-Version: 2600" -H "X-Parse-Client-Key: ywXpuXNYXggXZGcuAPQd3IX7d0hzPwgl3yMkKdXt" -H "X-Parse-Client-Version: a1.13.0" -H "X-Parse-App-Display-Version: 0.2.69" -H "X-Parse-Installation-Id: 90a6ccc3-978b-487c-89d4-5212d21d2101" -H "User-Agent: Parse Android SDK 1.13.0 (jobninja.eu.jobninja.local.debug/2600) API Level 22" -H "X-Parse-Session-Token: r:03de9f0b75520d26313769207ffc8ad6" -H "X-Parse-Application-Id: 0B5jvlihE6yxQed1w9vRSRW0DRldy3fbwqaCjpyF" -H "Content-Type: application/json" -H "Host: www.jobninja.eu:1337" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data-binary '{"username":"[email protected]","password":"xjnxmx","authData":{"anonymous":null},"objectId":"94rmavUqMF"}' -X PUT --compressed http://www.jobninja.eu:1337/parse/classes/_User/94rmavUqMF
Response:
{
"updatedAt": "2016-03-22T19:38:55.346Z"
}
Login:
curl -H "X-Parse-Revocable-Session: 1" -H "X-Parse-OS-Version: 5.1.1" -H "X-Parse-App-Build-Version: 2600" -H "X-Parse-Client-Key: ywXpuXNYXggXZGcuAPQd3IX7d0hzPwgl3yMkKdXt" -H "X-Parse-Client-Version: a1.13.0" -H "X-Parse-App-Display-Version: 0.2.69" -H "X-Parse-Installation-Id: 756c0f48-f330-4ef8-9c56-738fb519f630" -H "User-Agent: Parse Android SDK 1.13.0 (jobninja.eu.jobninja.local.debug/2600) API Level 22" -H "X-Parse-Application-Id: 0B5jvlihE6yxQed1w9vRSRW0DRldy3fbwqaCjpyF" -H "Content-Type: application/json" -H "Host: www.jobninja.eu:1337" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data-binary '{"username":"[email protected]","password":"jxjcjc","_method":"GET"}' --compressed http://www.jobninja.eu:1337/parse/login
Response (of course I just call login when I returned from signup):
{
"code": 101,
"error": "Invalid username/password."
}
So I guess the transformation is not done properly in the server but it stills return a successful response.
Another way of seeing it is that the username is not updated in the parse dashboard.
Btw, I hope it can get fixed soon because we're waiting for this to go online 🎉 🎉 😆 🚀 🔥