-
-
Notifications
You must be signed in to change notification settings - Fork 878
"Can't upload a file that doesn't exist locally." when saving PFObject with no PFFile #766
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
This sounds very strange, as error 151 is thrown only in 2 places, either when you are trying to download a file that was never saved to the server or when a file download was cancelled on saving an object. |
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
|
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
I've got the Parse server running locally and I'm getting the same issue: Error saving Error Domain=Parse Code=151 "Can't upload a file that doesn't exist locally." UserInfo={error=Can't upload a file that doesn't exist locally., NSLocalizedDescription=Can't upload a file that doesn't exist locally., code=151} |
I'm getting the same issue after migrating to Parse Server (Heroku/MongoLab) as well. |
Also having the same issue after migration to Parse Server. Was working just fine before. |
I have the same issue after migrating to Parse Server (Heroku with MongoLab addOn), this happen when I try to save the user profile with: When I try to save another object I have this error: All ACL perms seems to be ok, and was working fine before migration |
I ran into this problem after migration.... To fix the problem, find all the columns that use PFFile. For me, it was happening due to profile images, so I saved the images locally; then, used
After that, problem was gone. |
@toboklee Can you elaborate more about how did you solve this problem, what do you mean by retrieve the files manually in the database ( I have the same issue) |
@toboklee But I can't fix this issue with your method. Here is my code. I received same message, Looking for hearing from you. Thanks |
I'm getting this issue when I save an object that has a pointer to a PFUser. If I save everything but the pointer, the object saves. But once I add [LKFActivity setObject:[PFUser currentUser] forKey:@"activityUser" ] then I get the error message: Can't upload a file that doesn't exist locally. (Code: 151, Version: 1.12.0). I just realized that if I delete the current user's profile picture, then I don't get the error message. Thus, I think my issue is exactly the same as what you all are facing, but I'm still not clear how to fix it? |
Actually, my development is on migration parse server.(Heroku) Here is my original code. Before migration, this code works very well. I don't know why this issue occurs. Also I am working on XCode 7.2/iOS 9.2 |
I am working on migration parse. So I could migrate Parse DB to MongoDB using MongoLab. add cloud code(for mandrill-api and twilio) in main.js.(this works very well) On iOS development side, when the user logs in, app don't progress any PFObject. if I am going to change user's profile(string, boolean, image and so on), I get error message If I am going to download the user's photo, I get error message. Also I found a strange issue. But If I upload user's photo, connection error occurs. What's matter? I hope you can help me. Thanks |
Hmm... |
Any one tried turning failIndexKeyTooLong to False? I can't do it, because I have a freeplan in mongolab |
@otto1020 |
I just upgraded to parse-server 2.0.8 and am still seeing this issue. Has anyone found a good solution to this yet? |
Nope |
If it helps anyone that is still looking into this issue, here is a screenshot of the call stack and error details when I'm getting this: This happens consistently when I'm trying to upload to parse-server hosted on Heroku with a MongoLabs database. I've seen it when creating a new object in a class and uploading an image to one of the fields and also seen it when creating an object that has an image field that I'm not setting on creation. This seems to be a widespread issue when calling saveInBackgroundWithBlock on new objects. |
This issue occurs even with the 'save()' method, not just the saveInBackground() methods...so annoying. >:( No idea what to do |
I have this problem too, and now I can't update any user info because of it. Everything worked fine before moving over to the server. |
I still have this issue. Parse Server on Heroku/Mongolab. It is possible to fix the issue temporarily by deleting the image files manually through the database. Then I can also add new files through my apps interface and everything works like a charm again. Any ideas? |
Glad to know I'm not the only one having this issue. It's stopped me from moving forward with my transition onto Heroku/Mongolab for the time being. I even went through the process of deleting all of the data in the classes which were getting this issue and that seemed to solve it for a bit until I later uploaded files again to those classes and it would come back and not go away. It seems this is an issue with classes that have at least one optional PFFile column in them. The code may be expecting a file but not getting one. I've identified that the only place this error can be called is in PFFileController.m at line 216:
I believe that should be called when a value for a PFFile is present, but it is still being called for me when no file is uploaded for a field so it's getting to this point erroneously. @nlutsenko - I know this isn't a set of reproducible steps (I'll work on that) but do you have any ideas here? It seems this a problem for multiple people now. |
I think Parse is coming out with a file migrator tool to move files from their S3 bucket to your own, so I'm hoping this is a GridStore problem. This also is stopping me from continuing development on my Parse Server, as the app cannot function until this is fixed. I've found that if you upload a new file on Parse Server to Gridstore, it will only be visible to other clients checking from the server, which isn't great for legacy users. Longterm plan is to store everything in S3, but this needs to get fixed first for that to work. |
I set up my parse server to store files on my own S3 bucket instead of gridstore and am still having this issue so I'm not sure that is going to fix it. |
Thanks for letting me know, I haven't used the S3 adapter yet but hoped it would fix it, guess not. Not sure how to fix this now... |
I'm now seeing this happening on my device only and not in simulator with the same code and similar input. Not sure what the main variables are that might make a difference there. Any ideas? |
Hey everyone, we found few places where this was happening in Parse-Server. All of this means that the fix is going to come out very soon (likely this week) and after you upgrade your Parse Server - it will be ultimately fixed. |
Awesome! |
Hey guys, Parse-Server 2.1.3 is out, and includes fixes for this issue. |
@nlutsenko It works thank you so much! A small problem though is that when uploading new files to Mongolab's Gridstore, older clients not connected to the new Parse Server cannot access them. They are displayed as I haven't tried the S3 adapter yet but am planning on switching to it, would that solve the problem? Thanks. |
I know this is a really dumb question, but could you explain how to update to Parse Server 2.1.3 or direct me to an explanation? I have MongoLabs and Heroku set up, but I don't know how updating works. Also a tutorial on the S3 adapter would be really helpful if one exists! |
run: 'npm update' from your root directory to update your libraries. Make sure you don't have a hardcoded version set up in package.json. Here is the manual for S3 adapter: https://github.com/ParsePlatform/parse-server/wiki/Storing-Files-in-AWS-S3 |
@nlutsenko I've updated Parse Server to 2.1.4 but still seeing this error when saving a PFFile Any suggestions? |
@ryderjack initially updating didn't work for me either until I created a new project with the server from scratch (instead of just updating via npm). |
I think that you have to update some come in your index.js file var api = new ParseServer({ I had to add this two lines fileKey: 'optionalFileKey', |
Sorry for my delay - thanks @michaelbina for the help! (From CommunityLabsLoca) |
I had the same issue today with localdatastore. only remove and new Install of the app was the solution. |
Hi @Skyb0rg Were you able to get a fix for this issue. |
Saving ANY PFObject currently gives Error 151, irrespective of whether that PFObject has a PFFile, unsaved or not. I think this is generally linked to the Localdatastore and is a development on the issue I posted here: #763
The text was updated successfully, but these errors were encountered: