-
-
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
Schema mismatch for _Session.createdWith #32
Comments
I get the same error. |
Subscribing: Same here |
Same here with iOs SDK. |
Will take a look at this. |
[Error]: schema mismatch for _Session.createdWith; expected map but got object (Code: 111, Version: 1.12.0) |
Same thing here. iOS SDK |
I'm getting the same error using the JS SDK I noticed in mongoDB in _Schema it is expecting a map when it should be an object. Must have happened in the migration tool. I changed it to object and got passed this problem. Now it seems to be complaining about expiresAt being a number when it expected a date. Update: What worked for me in your migrated MongoDB in _SCHEMA:_session, change createdWith value to object and expiresAt value to string then in parse-server/transform.js after line 44 ad a case for expiredAt to transform it to a iso date format for the database:
finally in parse-server/users.js prior to line 58 I created an expireDate and added a year to it:
finally line 70 I change:
to:
|
I've just deployed the parse server for my app in development, and when trying to login or create a new user account (iOS SDK), I'm getting the same error. |
Can you open the _SCHEMA collection in your mongo installation, and paste the value for the _Session object? |
@gfosco this was mine right out of the migrate tool before I made the changes I posted above.
|
Merged #87 which should address all of this. Will tag a new release. 2.0.2 |
Hi Fosco, |
@vection take a look at @poseidonsw first comment. There may be a bug in the migration tool, and in the _Session schema you need to change:
from a |
Caught that in #87 just now (should allow it to stay as "map" in the schema)... can you try the current master? This doesn't change anything with 'expiresAt', still need more info on the best way to fix that if still a problem. |
Yes, I already tested it with the current master (2.0.2). |
@gfosco I can clean up my change for expiresAt and send it as a PR. It sets the expiresAt a year in advance similar to what parse.com api does. You do still need to change it in the _SCHEMA:_Session from date to string, but that would make it consistent with the other dates in the _SCHEMA collection |
I'm sorry, I don't understand. Was it solved on 2.0.2? I'm having also the same problem |
Should be in 2.0.3 On Saturday, January 30, 2016, jpv123 notifications@github.com wrote:
|
Till now it's same thing, please fix .. [Error]: schema mismatch for _Session.expiresAt; expected date but got string (Code: 111, Version: 1.12.0) |
@hafizapp to fix that, open your schema in your mongodb, and find the |
Yeah, that will fix it, but we do need to add something in parse-server to On Sun, Jan 31, 2016 at 12:52 AM, Natan Rolnik notifications@github.com
|
@gfosco should we wait for the fix or can we change the expiresAt from |
@natanrolnik Thanks, It fixed. but it would be more helpful if we get the answer of @fraxool question. |
@hafizapp definitely |
I did change to 2.0.3 and changed expiresAt from date to string It seems to work, but the js sdk gives me the following error: File parse-1.6.7.min.js:9164 |
I'm getting issues with expiredAt. Is it still valid for me to change my schema, to convert expiresAt from Date type (iso) to String? |
Sure, but I'd recommend you try that on a dev DB before doing it in your prod DB. Can you also open a new issue describing how you got into this situation? (Was this a migrated DB, or a new one? Does your app use revocable sessions? etc.) |
When I am trying to login using the local parse-server and migrated mongoDB (on MongoLab), I am getting the following:
{"code":111,"error":"schema mismatch for _Session.createdWith; expected map but got object"}
please advice.
The text was updated successfully, but these errors were encountered: