Repository navigation
invalid key name: _noBody #448
Description
Activity
Can you check in your mongo database, do many of your LockRecord objects have a _noBody key on them?
- changed the title
[-]fail in SaveAsync() in doNet sdk[/-][+]invalid key name: _noBody[/+]on Feb 16, 2016 Hi,
I just check the LockRecord table, no _noBody key was found~
they looks like this...{ "_id": "0OynPm0hnK", "attacker_id": "65lnd0hqMy", "defender_id": "zp2B6QvNuD", "lock_count": 3, "_created_at": { "$date": "2015-12-30T09:56:18.225Z" }, "_updated_at": { "$date": "2015-12-30T10:01:47.704Z" } }For your information, this database is migrated from my existing Parse's DB. using the 'migrate' button...
after migration, i found lot of strange Collection such as _dummy, _Index, _EventDimension....this problem is the first-time happened to me (after self-host), and I am new to mongodb)
I really dun know what is the reason~Also, the SaveAsync() fail issues happened on ParseUser as well, when I try to update a _User field from the client code.
Thanks.
Ok, looks like the dot net SDK sets this field and we're choking on it... https://github.com/ParsePlatform/Parse-SDK-dotNET/search?utf8=%E2%9C%93&q=_noBody
Valid bug, will work on a PR.
- addedtype:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
on Feb 16, 2016 Hi,
I just updated the parse-server to v2.1.0,
and I run a test on [Unity] the SaveAsync()... I got the same _noBody result.
do i miss something? or other package I need to update as well...?I confirmed that the parse-server is v2.1.0.
and node is v4.3Thanks a lot.
No, 2.1.0 was supposed to supposed to fix this issue. We'll take a look. If you want to help, you could submit a PR that includes a failing test case :)
Hi, gross,
I do want to help, can I submit a PR with code snippet in c# ? because I am developing on Unity c# .
currently, I am quite sure that this is ONLY happened in Unity ( Not in VS dotNet project)
:)
Currently our test setup is only JavaScript, sorry :( the Unity SDK is the only one uses the
_noBodykey so it would be the only one that fails. If you don't want to write JavaScript, another way to help would be to capture a failing network request as aCURLcommand (or similar) and post that here. Unfortunately I don't know how to do that in Unity, but I searched for some tools, it seems like this one might help: http://www.telerik.com/fiddlerIf the previous fix didn't work (removing _noBody from the request.body,) it's possible that this option is being passed as the request.query string... If you add some a console.log statement to print these out and make a few requests, you might be able to pinpoint the issue.
HI,
I try to remove the _noBody, and confirmed it is Ok ( I just make several create, update , query request to the server...)var parsed = Json.Parse(t.Result) as IDictionary<string, object>; // Inject the method parsed["_method"] = httpRequest.Method; //parsed["_noBody"] = noBody; // fix _noBody bug.....( #448 ) bytes = UTF8Encoding.UTF8.GetBytes(Json.Encode(parsed));https://github.com/ParsePlatform/Parse-SDK-dotNET/search?utf8=%E2%9C%93&q=_noBody
I will keep checking for any side-effect of removing the _noBody key.
Hope this help some other Unity developer.
@gfosco this is actually for non POST methods: https://github.com/ParsePlatform/Parse-SDK-dotNET/blob/f577ee38a0d55a199a473065b18acad084e4b083/ParseCommon/Internal/HttpClient/Unity/HttpClient.Unity.cs#L43
if (!httpRequest.Method.Equals("POST") || httpRequest.Data == null) {Yes, I found that 'update' & 'delete' object will use PUT methods....
and this will inject a '_noBody' in the request.Assuming that #512 corrected things in 2.1.3. Please re-open if not.
Hi,
I create an ParseObject in client side,
then, try to update the record using below code.
..
the saveAsync() failed....
when I print out the exception msg, it said "invalid key name: _noBody"
this error happen after I host the server myself, it is not happened before~
Can someone give me some hints? Thanks a lot.