Repository navigation
Schema mismatch for _Session.expiresAt #220
Description
Activity
This symptom should be fixed in the latest version, 2.0.6, but if you had run an older version, your _SCHEMA record for _Session may have been committed with "number" as the type for the "expiresAt" column. In that case, you will need to edit the entry in your mongo database. If you need help with that, let us know.
@gfosco
On my local server shows this - [Error]: schema mismatch for _Session.expiresAt; expected date but got string (Code: 111, Version: 1.12.0)But on the heroku server with the same mongo database uri it's working as expected.
NOTE: I am using 2.0.6 on my local server just updated and on heroku I deployed the server by clicking on the deploy button on github repo of parse-server-example.
Please advice whats the issue.
ThanksYou're right, I ran this:
db.getCollection('_SCHEMA').update({_id: '_Session'}, {'$set': {expiresAt: 'date'}})
on a mongo shell and it appears to be working.
Hi, I changed my schema in and I'm still having this issue. I am using MongoLabs for my db provider. Any idea why this would still be happening?
The issue happens both from an iPhone app and from Javascript.
Thanks!If you've changed the schema, what is the error you're getting now?
I'm getting the same error and I'm not really sure why that would be.
This is what I get:schema mismatch for _Session.expiresAt; expected string but got date
This is what my schema looks like when I log in to mongo labs and look at the _SCHEMA:_Session document:
{
"id": "Session",
"metadata": {
"class_permissions": {
"get": {
"": true
},
"find": {
"": true
},
"update": {
"": true
},
"create": {
"": true
},
"delete": {
"": true
},
"addField": {
"_": true
},
"readUserFields": [],
"writeUserFields": []
}
},
"expiresAt": "string",
"createdWith": "object",
"user": "*_User",
"installationId": "string",
"restricted": "boolean",
"sessionToken": "string",
"updatedAt": "string",
"createdAt": "string",
"objectId": "string"
}You'll need to edit that entry and change the expiresAt entry from string to date.
That did it for me. I thought it was the other way around. Thanks.