# HTTP Status 400 – Bad Request when uploading a blank form to ODK aggregate

**URL:** <https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483>\
**Category:** Support\
**Tags:** odk-aggregate\
**Created:** [March 12, 2019, 4:58am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483 "2019-03-12T04:58:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://forum.getodk.org/u/Yohan_Prasetia_Siswa)\
**Post date:** [March 12, 2019, 4:58am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/1 "2019-03-12T04:58:18Z")

</div>

**What is the problem? Please be detailed.**  
I got an HTTP Status 400 – Bad Request when uploading a form to ODK aggregate sandbox server ([https://sandbox.aggregate.opendatakit.org/](https://sandbox.aggregate.opendatakit.org/)).

I have tested the uploaded form using ODK validate v1.11.0. and it says that the Xform is valid.

Attached is the form  
[TestForm1.xml](https://getodk.b-cdn.net/uploads/default/original/2X/7/7fa0bc68cd96a137d9d52db56437666644b7561e.xml) (29.3 KB)

Here is the screenshot of the error on the sandbox server:

 ![image](https://getodk.b-cdn.net/uploads/default/original/2X/4/415784af0d4f7d59945737329d3d926f47fb51a2.png)

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [March 12, 2019, 5:02am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/2 "2019-03-12T05:02:46Z")

</div>

Can you share the XLS form?

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://forum.getodk.org/u/Yohan_Prasetia_Siswa)\
**Post date:** [March 12, 2019, 5:06am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/3 "2019-03-12T05:06:57Z")

</div>

Here is the xls form  
[TestForm1.xls](https://getodk.b-cdn.net/uploads/default/original/2X/4/4a9a968998225205b50cb70752a0cd1d46751df6.xls) (17.5 KB)

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [March 12, 2019, 5:13am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/4 "2019-03-12T05:13:06Z")

</div>

This looks like a form that was made in Kobo? Try removing the last `calculate` in the survey sheet and change the `version` in the settings sheet to a number like `2019031101` (basically today's date) and let's see if that works.

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://forum.getodk.org/u/Yohan_Prasetia_Siswa)\
**Post date:** [March 12, 2019, 6:08am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/5 "2019-03-12T06:08:55Z")

</div>

Hi Yanokwa,  
I'v tried removing the last calculate in the xml form.  
It is this one right :  
"  
bind calculate="concat('uuid:', uuid())" nodeset="/data/meta/instanceID" readonly="true()" type="string"/

"

Still got the error when uploading.

I tried to find "version" in the xml form but I can not find it.

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [March 13, 2019, 8:32pm UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/6 "2019-03-13T20:32:15Z")

</div>

I dont see anything unusual in your form, nor in the XML produced from it. Could you perhaps try loading an extremely _simple_ one-liner form - eg "enter name" - with _none_ of the metadata selected, and see if you can upload that.

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://forum.getodk.org/u/Yohan_Prasetia_Siswa)\
**Post date:** [March 14, 2019, 4:33am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/7 "2019-03-14T04:33:40Z")

</div>

Hi,

I've tried uploading a simple demo xml form to the sandbox server.  
It uploaded without problem

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [March 14, 2019, 4:53am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/8 "2019-03-14T04:53:26Z")

</div>

Good. It was worth eliminating something funky going on on the server-side (eg broken javaRosa version, ...).

So I might suggest adding (or removing) sections from your form, trying to upload them, and seeing when it breaks. Again, sorry, but I didnt see anything _overtly_ wrong. But at least this brute-force approach - a simple form works, a complex one doesn't - so somewhere in-between these two it'll break, and we be able to better narrow down the root of the problem. Make sense?

---

<div class="post-metadata">

**Author:** ![galewinston](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/g/c89c15/32.png) [@galewinston](https://forum.getodk.org/u/galewinston)\
**Post date:** [February 26, 2020, 5:00am UTC](https://forum.getodk.org/t/http-status-400-bad-request-when-uploading-a-blank-form-to-odk-aggregate/18483/9 "2020-02-26T05:00:50Z")

</div>

The 400 Bad Request error is an HTTP status code indicates that the request you sent to the webserver was malformed , in other words, the data stream sent by the client to the server didn't follow the rules. It means that the request itself has somehow incorrect or corrupted and the server couldn't understand it. There are a number of different causes for a [400: Bad Request](http://net-informations.com/q/mis/400.html) Error . It might be a malformed request syntax, invalid request message framing, or deceptive request routing . In most cases, the problem is on the website itself, and there's not much you can do about that.
