Skip to content

ParseFile save fails on parser-server after migration: Unable to encode an unsaved ParseFile #136

Closed
@smanikandan14

Description

@smanikandan14

I am using parse-android SDK 1.13.0. I am able to upload file to parse's backend.

But when i change my server endpoint to migrated end point, upload fails.

{
    "code": 130,
    "error": "Invalid file upload."
}

I added console logs in file.js on parse-server i found the request.body is empty.

Files.js processCreate req: [object Object] : {} : undefined

var processCreate = function(req, res, next) {
console.log(" Files.js processCreate req:"+req+" : "+ JSON.stringify(req.body)+" : "+req.body.length
if (!req.body || !req.body.length) {
    next(new Parse.Error(Parse.Error.FILE_SAVE_ERROR,
         'Invalid file upload.'));
    return;
  }

Exception message shown on client side.

iIllegalStateException: Unable to encode an unsaved ParseFile

Seems to be an issue on the parse-server side. The request body is found empty. I reported this issue on parse-android-sdk. Since the sdk could upload to parse hosted backend. Suspect is on the parse-server side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions