Skip to content
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

Schema mismatch for _Session.expiresAt #220

Closed
blackxored opened this issue Feb 3, 2016 · 8 comments
Closed

Schema mismatch for _Session.expiresAt #220

blackxored opened this issue Feb 3, 2016 · 8 comments

Comments

@blackxored
Copy link

error: ParseError {
  code: 111,
  message: 'schema mismatch for _Session.expiresAt; expected number but got date' 
}
@gfosco
Copy link
Contributor

gfosco commented Feb 3, 2016

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.

@hafizapp
Copy link

hafizapp commented Feb 3, 2016

@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.
Thanks

@blackxored
Copy link
Author

You're right, I ran this:

db.getCollection('_SCHEMA').update({_id: '_Session'}, {'$set': {expiresAt: 'date'}})

on a mongo shell and it appears to be working.

@chuckurbis
Copy link

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!

@gfosco
Copy link
Contributor

gfosco commented Feb 4, 2016

If you've changed the schema, what is the error you're getting now?

@chuckurbis
Copy link

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"
}

@gfosco
Copy link
Contributor

gfosco commented Feb 4, 2016

You'll need to edit that entry and change the expiresAt entry from string to date.

@chuckurbis
Copy link

That did it for me. I thought it was the other way around. Thanks.

@gfosco gfosco closed this as completed Feb 16, 2016
BernhardHarrer pushed a commit to BernhardHarrer/parse-server that referenced this issue Feb 22, 2017
…rse-server-2.2.12

Upgrade to parse server 2.2.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants