-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
File urls are missing when logging in a User via authData. #616
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
Comments
@nitrag, any chance you can specify the server version you are using? We had a bug similar to this one on one of the early versions, where files where no expanded user login, but it's fixed right now on the latest release. |
I also looked in node_modules to confirm: 2.1.2 for parse-server and 1.7.1 for JS SDK Thanks |
#332 is the one that should have fixed it, as you can see we also have a test there. |
Here is a quick test: fit("user login with files", (done) => {
"use strict";
let fileJSON = {__type: 'File', name: 'tfss-yolo.txt', url: 'http://files.parsetfss.com/test/tfss-yolo.txt'};
let file = Parse.File.fromJSON(fileJSON);
console.log(file);
Promise.resolve().then(() => {
return Parse.User.signUp("asdf", "zxcv", { file : file });
}).then(() => {
return Parse.User.logIn("asdf", "zxcv");
}).then((user) => {
let fileAgain = user.get('file');
console.log(fileAgain);
done();
}).catch(error => {
console.log(error);
fail(error);
done();
});
}); It's passing for me locally, no problem, so there might be something else here getting in the way.
|
i don't see a result in console after running user login...should that work?
I am guessing that should it have worked the should be url parameter for profilePicThumbnail? Also dumb question, how do I manually run tests? |
Manually run tests - |
Hmm../users? I'm using JS SDK 1.5.
|
Aha! Here is where it's coming from, thanks! |
Thanks @nlutsenko for the quick fix! Just to confirm, it's still OK to be logging in a user with Facebook through /users? This is the original method for JS SDK (Parse.FacebookUtils.logIn). |
Yup, that's the intended API for it. 😉 |
I have two ParseFiles in my Parse.User class. ProfilePic and CoverPhoto.
I've started migration over to Compose.io DBaaS. I've got Parse-Server up and running locally pointing to Compose. That's all working and I can login with a simple test user.
When logging in with a user who does NOT have any old files attached to _User (test user) the login is successful. However, when logging into a _User who still has these old files (on parse s3?) I get this error:
If I delete the coverPhoto key in the database the error goes away so I know it's the old files causing it.
I'm guessing fileKey is supposed to grabbing the file? And it's not? There's no failure in the server side. I have confirmed that the fileKey option is set correctly and and appId matches Parse.com.
Thanks
The text was updated successfully, but these errors were encountered: