Skip to content

Uncaught internal server error. bad value in untransformObject undefined #665

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

Closed
dhavalyours opened this issue Feb 26, 2016 · 7 comments
Closed
Labels
type:question Support or code-level question

Comments

@dhavalyours
Copy link

Hi,

I have 6 tables in parse. After migration GET curl command is not working on one of the tables.
curl -v -s GET
-H "X-Parse-Application-Id: 123"
-H "X-Parse-REST-API-Key: 123"
http://enterpriseparse.chatflyapp.com/parse/classes/ABC

Curl Response :

  • Rebuilt URL to: GET/
  • Could not resolve host: GET
  • Closing connection 0
  • Trying 54.170.194.194...
  • Connected to localhost port 1337 (Why?? #1)

    GET /parse/classes/ABC HTTP/1.1
    Host: localhost
    User-Agent: curl/7.43.0
    Accept: /
    X-Parse-Application-Id:ABC
    X-Parse-REST-API-Key: ABC

    < HTTP/1.1 500 Internal Server Error
    < X-Powered-By: Express
    < Access-Control-Allow-Origin: *
    < Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
    < Access-Control-Allow-Headers: X-Parse-REST-API-Key, X-Parse-Javascript-Key, X-Parse-Application-Id, X-Parse-Client-Version, X-Parse-Session-Token, X-Requested-With, X-Parse-Revocable-Session, Content-Type
    < Content-Type: application/json
    < Content-Length: 45
    < ETag: "1759988501"
    < Date: Fri, 26 Feb 2016 00:53:22 GMT
    < Connection: keep-alive
    <
  • Connection Why?? #1 to host localhost left intact

At the server end I get following error :

Uncaught internal server error. bad value in untransformObject undefined

Also i was wondering whether this bug is related to #165

I am using 2.1.3 version of parse server.

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

We need to figure out what was the bad value... so if you can find the object in class ABC and provide it here, or maybe it will be obvious when looking at it... In transform.js this error can be thrown if it thinks it received an undefined value, a symbol, or a function.

If you have only a few ABC objects, you can do GET queries on the object id URL to get single objects until you find one which fails... The details of that object would be useful in tracking down the error.

@dhavalyours
Copy link
Author

Hi,

Below are the example objects which are passing and failing

Failing Objects
{
"_id" : "XXXX",
"chatflyUserId" : "XXX",
"appId" : NumberLong("143222257992738511"),
"_created_at" : ISODate("2015-05-21T15:39:49.678Z"),
"_updated_at" : ISODate("2015-09-22T09:52:09.434Z"),
"appStringId" : "XXXX"
}

{
"_id" : "yyyy",
"appId" : NumberLong("143153390003853950"),
"chatflyUserId" : "yyyy",
"_created_at" : ISODate("2015-05-25T14:01:40.570Z"),
"_updated_at" : ISODate("2015-09-22T09:47:52.377Z"),
"appStringId" : "yyyy"
}

{
"_id" : "aaa",
"appId" : NumberLong("aaa"),
"chatflyUserId" : "aaa",
"_created_at" : ISODate("2015-07-01T13:41:41.158Z"),
"_updated_at" : ISODate("2015-09-22T09:12:34.254Z"),
"appStringId" : "aaa"
}

Passing Objects :

{
"_id" : "zzzz",
"_created_at" : ISODate("2015-11-04T12:14:09.242Z"),
"_updated_at" : ISODate("2015-11-04T12:18:19.261Z"),
"appStringId" : "zzz",
"profilePicture" : "tfss-25af6a2b-f097-4ef8-827e-88e8742ea340-file",
"featured" : false,
"published" : true,
"screenName" : "XXX XXXÀÉÈÌÎÓÒÙùòóîìèéà50793",
"description" : "Short xxxx"
}

These objects are working at parse endpoint.

Hope it helps

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

Were these objects created through the parse api? api.parse.com or parse-server? In the _SCHEMA collection, what is the schema type for the 'appId' column in this class?...

@dhavalyours
Copy link
Author

Hi,

  1. These objects were created through parse api before parse migration happened.
  2. In the parse.com website dashboard, the datatype if appId column is Number
  3. I used following command on the table.
    db.MyClass.find( {_id: "abc"} ).pretty();

{
"_id" : "xyz",
"appId" : NumberLong("abc"),
"chatflyUserId" : "aaa",
"_created_at" : ISODate("2015-07-01T13:41:41.158Z"),
"_updated_at" : ISODate("2015-09-22T09:12:34.254Z"),
"appStringId" : "12345"
}

  1. Following is result of db['system.indexes'].find() from which have appId in them mongolab.
    {
    "v": 1,
    "key": {
    "_id": 1,
    "appId": 1
    },
    "name": "_id_1_appId_1",
    "ns": "dbName.TableName",
    "background": true
    }

{
"v": 1,
"key": {
"_created_at": -1,
"appId": 1
},
"name": "created_at-1_appId_1",
"ns": "dbName.TableName",
"background": true
}

{
"v": 1,
"key": {
"_id": 1,
"_created_at": -1,
"appId": 1
},
"name": "id_1__created_at-1_appId_1",
"ns": "dbName.TableName",
"background": true
}

{
"v": 1,
"key": {
"_id": 1,
"appId": -1
},
"name": "id_1_appId-1",
"ns": "dbName.TableName",
"background": true
}

  1. Also following is the result of db.TableName.stats() of the table.

{
"serverUsed": "XYZ",
"ns": "dbName.tableName",
"count": 267,
"size": 93392,
"avgObjSize": 349,
"numExtents": 3,
"storageSize": 172032,
"lastExtentSize": 131072,
"paddingFactor": 1,
"paddingFactorNote": "paddingFactor is unused and unmaintained in 3.0. It remains hard coded to 1.0 for compatibility only.",
"userFlags": 1,
"capped": false,
"nindexes": 14,
"indexDetails": {},
"totalIndexSize": 277984,
"indexSizes": {
"id": 8176,
"created_at-1": 8176,
"created_at-1_appId_1": 24528,
"created_at-1_chatflyUserId_1": 8176,
"created_at-1_featured_image_1": 24528,
"created_at-1_screenName_1": 24528,
"id_1__created_at-1_appId_1": 24528,
"id_1_appId-1": 24528,
"_id_1_appId_1": 24528,
"_id_1_chatflyUserId_1": 24528,
"_id_1_featured_image_1": 24528,
"id_1_screenName-1": 24528,
"appStringId_1": 24528,
"tags_1": 8176
},
"ok": 1
}

@gfosco
Copy link
Contributor

gfosco commented Mar 21, 2016

Sorry I didn't get back to you... Pretty unclear from these logs where the issue is. It has been a while. Please re-open this or open a new issue if you're still having trouble. Thanks.

@gfosco gfosco closed this as completed Mar 21, 2016
@zleman1593
Copy link

@dhavalyours I am having a similar issue and still trying to figure out how to fix it. What version of mongoDB were you using when this occurred? I am using 3.2.X and I just realized parse server doesn't recommend that version. Did you identify the cause?

@zleman1593
Copy link

I noticed that the objects that failed for me failed when interpreting the NumberLong BSON. It appears the same happens for you. I wonder if it is a WiredTiger issue.

@mtrezza mtrezza added type:question Support or code-level question and removed 🔧 troubleshooting labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants