Dedimania forum

Feel free to express yourself on your favorite dedicated related tool.

You are not logged in.

#1 2019-01-02 15:10:33

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Bad requests when sending records

Hi all

I am using ManiaControl, and for some maps, Dedimania doesn't process the request (a multicall to dedimania.SetChallengeTimes and dedimania.WarningsAndTTR2). It just sends back a Error 400: Bad Request message without any further information. I have no clue what is going on; but I am pretty sure that the issue comes from the request itself and not the map, since another controller managed to save a dedi on this map.

So, the main question is, what can cause an Error 400 to occur?

For anyone interested, I saved one of these bad requests in an XML file (it is too big to post here...)

Offline

#2 2019-01-26 09:30:51

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Re: Bad requests when sending records

After some investigation on the maps on which the issue happens, I believe this happens for maps that are identical except their names (essentially, a map that has been saved under a different name in the editor, with no further changes).  Can you take a look at what has happened for the following maps?

Original map
=> YxQDoC0568WZb8UfFu_61YIgVD4
3 records so far, but now our controller (ManiaControl) doesn't find any dedi record and doesn't store new records either (EDIT : it actually does, I just didn't wait long enough XD)

Map renamed
=> yfvy12VeQGM87WrmGwG7tPKDY8c
Records were sent to dedi but were not stored as far as I can tell

Last edited by tm2:ranig (2019-01-26 12:46:50)

Offline

#3 2019-01-26 18:37:22

Xymph
xymph
Moderator
Registered: 2009-05-26
Posts: 1971
Website

Offline

#4 2019-01-28 18:38:34

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Re: Bad requests when sending records

Yes, for some reason they didn't show records the first time they were played but now they do... Very weird. The issue remain in a fair number of maps though, so the question remains open:

So, the main question is, what can cause an Error 400 to occur?

Offline

#5 2019-01-29 08:49:45

Xymph
xymph
Moderator
Registered: 2009-05-26
Posts: 1971
Website

Re: Bad requests when sending records

Tha ManiaControl forum would be a better place for that.

Offline

#6 2019-01-29 11:05:27

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Re: Bad requests when sending records

xymph wrote:

Tha ManiaControl forum would be a better place for that.

While I am convinced that the culprit at the end of the day is ManiaControl, the error happens on Dedimania side. I had saved the XML code of such a wrong request, and the XML request of a good request, and nothing really stood out in the wrong XML code as far as I could see (unfortunately I deleted these files, but I can probably make new ones). All blocks seemed to have the proper information. I have no problem trying to fix the ManiaControl code (at least I can try), but if I don't know what causes that issue to occur I can't really do anything.

I have already ruled out the following possibilities:
- Incorrect map Uid
- CP time sent in the wrong order
- CP time duplicated
- use of embedded items

There is only that much information that we get can get from the error log that we get back (even though I have to say that maybe ManiaControl doesn't get the full picture, I will double check).

EDIT: I have regenerated a wrong request XML file if you want to have a look.

Last edited by tm2:ranig (2019-01-29 11:46:45)

Offline

#7 2019-01-29 15:43:15

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Re: Bad requests when sending records

I have been looking at this map in particular =>     tTKy9KVfvWmzADGZPj2Vrn34fsi 
On which I recorded a record using UASECO instead of ManiaControl

When ManiaControl sends GetChallengeRecords, the "Records" array returned by Dedimania contains 1 item
When ManiaControl sends SetChallengeTime with an empty "Times" array (no new record), the "Records" Array returned by Dedimania contains 0 items

Is that an expected behavior?

Also, when ManiaControl sends SetChallengeTime with one or more new records, the request is simply not precessed

Offline

#8 2019-01-29 17:32:22

Xymph
xymph
Moderator
Registered: 2009-05-26
Posts: 1971
Website

Re: Bad requests when sending records

Sorry but I have no time nor interest in supporting TM(2) controllers or the API side of Dedimania anymore. Too many other projects on my plate. smile

Offline

#9 2019-01-29 19:48:11

>>NRT>> Ranig
tm2:ranig
New member
Registered: 2018-07-02
Posts: 6

Re: Bad requests when sending records

Alright, thx for the help wink

Offline

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson