Sync fails from Android with ODK to locally installed HQ

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

··· ========== [24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174 [24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22 2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission. Response is: Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

Hi Josh,

I'm taking this to the commcare-developers list (which you should join if
you haven't). Just to confirm - you are running CommCare ODK and not normal
ODK, right? How are you running your server?

thanks,
Cory

··· On Tue, May 27, 2014 at 9:18 AM, Josh Young wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from herehttp://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as install.sh) that
does the dependency setup and then I made some minor changes to the
localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also
attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that fails
(both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still fails.
If there is a tag or branch that is known to be stable I can use that, I'm
only on master because I couldn't figure out which other branch would be
appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org seems to
work w/o issue, so I'm pretty sure its some server setting that I'm missing.

Thanks,
~Josh

localsettings.py (11 KB)

install.sh (11.5 KB)

··· On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote: > > Hi Josh, > > I'm taking this to the commcare-developers list (which you should join if > you haven't). Just to confirm - you are running CommCare ODK and not normal > ODK, right? How are you running your server? > > thanks, > Cory > > > > > On Tue, May 27, 2014 at 9:18 AM, Josh Young <jyo...@vecna.com wrote: > >> I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ). >> >> >> When I try to syn forms from my Android device using the ODK I get an error in the logs of my server: >> ========== >> [24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174 >> [24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22 >> 2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission. >> Response is: >> Content-Type: text/html; charset=utf-8 >> >> If you use multipart/form-data, please name your file xml_submission_file. >> You may also do a normal (non-multipart) post with the xml submission as the request body instead. >> >> See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc >> ========== >> >> How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data? >> >> I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone. >> >> Installed HQ is from a build from master as of early last week. >> ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014. >> The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated. >> >> Thanks! >> ~Josh >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And just to
confirm - you are able to sync the user account down to the phone, just not
submit data?

Are you including image attachments with your forms or are your forms very
long? One possible issue is that the phones use chunked encoding to submit
data, which is likely not compatible with runserver. This should really
only be an issue if your forms are quite large though. In our production
setup we use apache to proxy the chunked encoding in front of gunicorn, but
that said, i've submitted data to my development instance on runserver
quite recently with no problems.

Could you also go to: http://192.168.1.13:9000
/couchlog/view/65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more
information there?

Cory

··· On Tue, May 27, 2014 at 7:28 PM, Josh Young wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from herehttp://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as install.sh) that
does the dependency setup and then I made some minor changes to the
localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also
attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that fails
(both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still
fails. If there is a tag or branch that is known to be stable I can use
that, I'm only on master because I couldn't figure out which other branch
would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org seems to
work w/o issue, so I'm pretty sure its some server setting that I'm missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should join if
you haven't). Just to confirm - you are running CommCare ODK and not normal
ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue - namely,
being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the request is
chunked data (screenshot attached). The questionnaire data itself is very
small, but it looks like my environment variables are being included in the
request, plus I don't see any questionnaire data in the request.

Any help or suggestions would be appreciated!

-Al

··· On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote: > > Hi Josh, > > It doesn't sound like a code issue - more like a setup one. And just to > confirm - you are able to sync the user account down to the phone, just not > submit data? > > Are you including image attachments with your forms or are your forms very > long? One possible issue is that the phones use chunked encoding to submit > data, which is likely not compatible with runserver. This should really > only be an issue if your forms are quite large though. In our production > setup we use apache to proxy the chunked encoding in front of gunicorn, but > that said, i've submitted data to my development instance on runserver > quite recently with no problems. > > Could you also go to: http://192.168.1.13:900*0* > /couchlog/view/65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more > information there? > > Cory > > > On Tue, May 27, 2014 at 7:28 PM, Josh Young <jyo...@vecna.com wrote: > >> Thanks Cory, I've now joined the CommCare Developers group :). >> >> For the ODK, I've downloaded the CommCare ODK from here(Dimagi's build server) and I've tried it from Google Play (v2). >> >> For the server I modified an existing script (attached as install.sh) >> that does the dependency setup and then I made some minor changes to the >> localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also >> attached). >> To run it I run the commands: >> ./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000 >> >> The ODK is able to download the app and run it, it is the sync that fails >> (both log syncing and form syncing). >> >> I've tested this after rebasing master today (5/27/14) and it still >> fails. If there is a tag or branch that is known to be stable I can use >> that, I'm only on master because I couldn't figure out which other branch >> would be appropriate. >> >> Let me know if there is anything else that would be useful. >> >> Using the google play's CommCare ODK against www.commcarehq.org seems to >> work w/o issue, so I'm pretty sure its some server setting that I'm missing. >> >> Thanks, >> ~Josh >> >> >> On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote: >> >>> Hi Josh, >>> >>> I'm taking this to the commcare-developers list (which you should join >>> if you haven't). Just to confirm - you are running CommCare ODK and not >>> normal ODK, right? How are you running your server? >>> >>> thanks, >>> Cory >>> >>> >>> >>> >>> On Tue, May 27, 2014 at 9:18 AM, Josh Young wrote: >>> >>>> I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ). >>>> >>>> >>>> >>>> >>>> >>>> When I try to syn forms from my Android device using the ODK I get an error in the logs of my server: >>>> ========== >>>> [24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174 >>>> [24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22 >>>> 2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission. >>>> Response is: >>>> Content-Type: text/html; charset=utf-8 >>>> >>>> If you use multipart/form-data, please name your file xml_submission_file. >>>> You may also do a normal (non-multipart) post with the xml submission as the request body instead. >>>> >>>> See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc >>>> ========== >>>> >>>> How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data? >>>> >>>> I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone. >>>> >>>> Installed HQ is from a build from master as of early last week. >>>> ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014. >>>> The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated. >>>> >>>> Thanks! >>>> ~Josh >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "commcare-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-user...@googlegroups.com. >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CommCare Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-developers+unsubscribe@googlegroups.com . >> >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Al,

I'll see if I can reproduce this locally and get back to you.

cheers,
Cory

··· On Wed, May 28, 2014 at 2:04 PM, Al Ramsey wrote:

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue - namely,
being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the request is
chunked data (screenshot attached). The questionnaire data itself is very
small, but it looks like my environment variables are being included in the
request, plus I don't see any questionnaire data in the request.

Any help or suggestions would be appreciated!

-Al

On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote:

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And just to
confirm - you are able to sync the user account down to the phone, just not
submit data?

Are you including image attachments with your forms or are your forms
very long? One possible issue is that the phones use chunked encoding to
submit data, which is likely not compatible with runserver. This should
really only be an issue if your forms are quite large though. In our
production setup we use apache to proxy the chunked encoding in front of
gunicorn, but that said, i've submitted data to my development instance on
runserver quite recently with no problems.

Could you also go to: http://192.168.1.13:9000/couchlog/view/
65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more information
there?

Cory

On Tue, May 27, 2014 at 7:28 PM, Josh Young jyo...@vecna.com wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from herehttp://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as install.sh)
that does the dependency setup and then I made some minor changes to the
localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also
attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that
fails (both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still
fails. If there is a tag or branch that is known to be stable I can use
that, I'm only on master because I couldn't figure out which other branch
would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org seems
to work w/o issue, so I'm pretty sure its some server setting that I'm
missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should join
if you haven't). Just to confirm - you are running CommCare ODK and not
normal ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

Just wanted to follow up that I've gotten as far as reproducing this, but
haven't yet figured out the root cause. Am continuing to look into it.

Cory

··· On Wed, May 28, 2014 at 8:54 PM, Cory Zue wrote:

Hi Al,

I'll see if I can reproduce this locally and get back to you.

cheers,
Cory

On Wed, May 28, 2014 at 2:04 PM, Al Ramsey aramsey.vecna@gmail.com wrote:

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue - namely,
being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the request is
chunked data (screenshot attached). The questionnaire data itself is very
small, but it looks like my environment variables are being included in the
request, plus I don't see any questionnaire data in the request.

Any help or suggestions would be appreciated!

-Al

On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote:

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And just to
confirm - you are able to sync the user account down to the phone, just not
submit data?

Are you including image attachments with your forms or are your forms
very long? One possible issue is that the phones use chunked encoding to
submit data, which is likely not compatible with runserver. This should
really only be an issue if your forms are quite large though. In our
production setup we use apache to proxy the chunked encoding in front of
gunicorn, but that said, i've submitted data to my development instance on
runserver quite recently with no problems.

Could you also go to: http://192.168.1.13:9000/couchlog/view/
65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more information
there?

Cory

On Tue, May 27, 2014 at 7:28 PM, Josh Young jyo...@vecna.com wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from here
http://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk
(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as install.sh)
that does the dependency setup and then I made some minor changes to the
localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also
attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that
fails (both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still
fails. If there is a tag or branch that is known to be stable I can use
that, I'm only on master because I couldn't figure out which other branch
would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org seems
to work w/o issue, so I'm pretty sure its some server setting that I'm
missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should join
if you haven't). Just to confirm - you are running CommCare ODK and not
normal ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey again,

I'm having trouble with this one. I ran against several old builds of both
the server and mobile and wasn't able to reproduce it - which is quite
strange since I am sure that it worked for me as recently as April.

I'll continue to dig, but may not be able to provide an answer very soon.

As a potential workaround you could setup a local Apache proxy in front of
your django workers and use mod_proxy to deal with the chunked request
(which would mirror our production setup and should work).

Cory

··· On Thu, May 29, 2014 at 3:25 PM, Cory Zue wrote:

Hey,

Just wanted to follow up that I've gotten as far as reproducing this, but
haven't yet figured out the root cause. Am continuing to look into it.

Cory

On Wed, May 28, 2014 at 8:54 PM, Cory Zue czue@dimagi.com wrote:

Hi Al,

I'll see if I can reproduce this locally and get back to you.

cheers,
Cory

On Wed, May 28, 2014 at 2:04 PM, Al Ramsey aramsey.vecna@gmail.com wrote:

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue -
namely, being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the request
is chunked data (screenshot attached). The questionnaire data itself is
very small, but it looks like my environment variables are being included
in the request, plus I don't see any questionnaire data in the request.

Any help or suggestions would be appreciated!

-Al

On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote:

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And just to
confirm - you are able to sync the user account down to the phone, just not
submit data?

Are you including image attachments with your forms or are your forms
very long? One possible issue is that the phones use chunked encoding to
submit data, which is likely not compatible with runserver. This should
really only be an issue if your forms are quite large though. In our
production setup we use apache to proxy the chunked encoding in front of
gunicorn, but that said, i've submitted data to my development instance on
runserver quite recently with no problems.

Could you also go to: http://192.168.1.13:9000/couchlog/view/
65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more information
there?

Cory

On Tue, May 27, 2014 at 7:28 PM, Josh Young jyo...@vecna.com wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from here
http://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk
(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as install.sh)
that does the dependency setup and then I made some minor changes to the
localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also
attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that
fails (both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still
fails. If there is a tag or branch that is known to be stable I can use
that, I'm only on master because I couldn't figure out which other branch
would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org seems
to work w/o issue, so I'm pretty sure its some server setting that I'm
missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should
join if you haven't). Just to confirm - you are running CommCare ODK and
not normal ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks for looking into this Cory. I'll work on setting up an Apache proxy.

-Al

··· On Thursday, May 29, 2014 7:32:35 PM UTC-4, Cory Zue wrote: > > Hey again, > > I'm having trouble with this one. I ran against several old builds of both > the server and mobile and wasn't able to reproduce it - which is quite > strange since I am sure that it worked for me as recently as April. > > I'll continue to dig, but may not be able to provide an answer very soon. > > As a potential workaround you could setup a local Apache proxy in front of > your django workers and use mod_proxy to deal with the chunked request > (which would mirror our production setup and should work). > > Cory > > > > > On Thu, May 29, 2014 at 3:25 PM, Cory Zue <cz...@dimagi.com > wrote: > >> Hey, >> >> Just wanted to follow up that I've gotten as far as reproducing this, but >> haven't yet figured out the root cause. Am continuing to look into it. >> >> Cory >> >> >> On Wed, May 28, 2014 at 8:54 PM, Cory Zue <cz...@dimagi.com wrote: >> >>> Hi Al, >>> >>> I'll see if I can reproduce this locally and get back to you. >>> >>> cheers, >>> Cory >>> >>> >>> >>> On Wed, May 28, 2014 at 2:04 PM, Al Ramsey <aramse...@gmail.com > wrote: >>> >>>> Hello Cory, >>>> >>>> I'm a colleague of Josh and am also experiencing the same issue - >>>> namely, being able to deploy to an Android phone and to sign in to collect >>>> questionnaire data, but unable to sync back to the server. >>>> >>>> I've looked at the couchlog as you recommended, and indeed the request >>>> is chunked data (screenshot attached). The questionnaire data itself is >>>> very small, but it looks like my environment variables are being included >>>> in the request, plus I don't see any questionnaire data in the request. >>>> >>>> Any help or suggestions would be appreciated! >>>> >>>> -Al >>>> >>>> >>>> >>>> On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote: >>>> >>>>> Hi Josh, >>>>> >>>>> It doesn't sound like a code issue - more like a setup one. And just >>>>> to confirm - you are able to sync the user account down to the phone, just >>>>> not submit data? >>>>> >>>>> Are you including image attachments with your forms or are your forms >>>>> very long? One possible issue is that the phones use chunked encoding to >>>>> submit data, which is likely not compatible with runserver. This should >>>>> really only be an issue if your forms are quite large though. In our >>>>> production setup we use apache to proxy the chunked encoding in front of >>>>> gunicorn, but that said, i've submitted data to my development instance on >>>>> runserver quite recently with no problems. >>>>> >>>>> Could you also go to: http://192.168.1.13:900*0*/couchlog/view/ >>>>> 65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more information >>>>> there? >>>>> >>>>> Cory >>>>> >>>>> >>>>> On Tue, May 27, 2014 at 7:28 PM, Josh Young wrote: >>>>> >>>>>> Thanks Cory, I've now joined the CommCare Developers group :). >>>>>> >>>>>> For the ODK, I've downloaded the CommCare ODK from here >>>>>> >>>>>> (Dimagi's build server) and I've tried it from Google Play (v2). >>>>>> >>>>>> For the server I modified an existing script (attached as install.sh) >>>>>> that does the dependency setup and then I made some minor changes to the >>>>>> localsettings.py (commented out JAR_SIGN and modified BASE_ADDRESS, also >>>>>> attached). >>>>>> To run it I run the commands: >>>>>> ./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000 >>>>>> >>>>>> The ODK is able to download the app and run it, it is the sync that >>>>>> fails (both log syncing and form syncing). >>>>>> >>>>>> I've tested this after rebasing master today (5/27/14) and it still >>>>>> fails. If there is a tag or branch that is known to be stable I can use >>>>>> that, I'm only on master because I couldn't figure out which other branch >>>>>> would be appropriate. >>>>>> >>>>>> Let me know if there is anything else that would be useful. >>>>>> >>>>>> Using the google play's CommCare ODK against www.commcarehq.org >>>>>> seems to work w/o issue, so I'm pretty sure its some server setting that >>>>>> I'm missing. >>>>>> >>>>>> Thanks, >>>>>> ~Josh >>>>>> >>>>>> >>>>>> On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote: >>>>>> >>>>>>> Hi Josh, >>>>>>> >>>>>>> I'm taking this to the commcare-developers list (which you should >>>>>>> join if you haven't). Just to confirm - you are running CommCare ODK and >>>>>>> not normal ODK, right? How are you running your server? >>>>>>> >>>>>>> thanks, >>>>>>> Cory >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, May 27, 2014 at 9:18 AM, Josh Young wrote: >>>>>>> >>>>>>>> I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ). >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> When I try to syn forms from my Android device using the ODK I get an error in the logs of my server: >>>>>>>> ========== >>>>>>>> [24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174 >>>>>>>> [24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22 >>>>>>>> 2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission. >>>>>>>> Response is: >>>>>>>> Content-Type: text/html; charset=utf-8 >>>>>>>> >>>>>>>> If you use multipart/form-data, please name your file xml_submission_file. >>>>>>>> You may also do a normal (non-multipart) post with the xml submission as the request body instead. >>>>>>>> >>>>>>>> See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc >>>>>>>> ========== >>>>>>>> >>>>>>>> How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data? >>>>>>>> >>>>>>>> I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone. >>>>>>>> >>>>>>>> Installed HQ is from a build from master as of early last week. >>>>>>>> ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014. >>>>>>>> The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated. >>>>>>>> >>>>>>>> Thanks! >>>>>>>> ~Josh >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "commcare-users" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to commcare-user...@googlegroups.com. >>>>>>>> >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>> >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "CommCare Developers" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to commcare-developers+unsubscribe@googlegroups.com. >>>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "CommCare Developers" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-developers+unsubscribe@googlegroups.com >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> >

Hi Cory,

I'm a colleague of both Josh and Al, just wanted to check back into this
issue to see if you had any clearer idea of what's going on. Or on the flip
side, is there a known stable version we could test out rather than basing
off of the master code? Any help would be greatly appreciated!

Thanks,
Aaron

··· On Friday, May 30, 2014 10:26:52 AM UTC-4, Al Ramsey wrote: > > Thanks for looking into this Cory. I'll work on setting up an Apache > proxy. > > -Al > > > On Thursday, May 29, 2014 7:32:35 PM UTC-4, Cory Zue wrote: >> >> Hey again, >> >> I'm having trouble with this one. I ran against several old builds of >> both the server and mobile and wasn't able to reproduce it - which is quite >> strange since I am sure that it worked for me as recently as April. >> >> I'll continue to dig, but may not be able to provide an answer very soon. >> >> As a potential workaround you could setup a local Apache proxy in front >> of your django workers and use mod_proxy to deal with the chunked request >> (which would mirror our production setup and should work). >> >> Cory >> >> >> >> >> On Thu, May 29, 2014 at 3:25 PM, Cory Zue wrote: >> >>> Hey, >>> >>> Just wanted to follow up that I've gotten as far as reproducing this, >>> but haven't yet figured out the root cause. Am continuing to look into it. >>> >>> Cory >>> >>> >>> On Wed, May 28, 2014 at 8:54 PM, Cory Zue wrote: >>> >>>> Hi Al, >>>> >>>> I'll see if I can reproduce this locally and get back to you. >>>> >>>> cheers, >>>> Cory >>>> >>>> >>>> >>>> On Wed, May 28, 2014 at 2:04 PM, Al Ramsey wrote: >>>> >>>>> Hello Cory, >>>>> >>>>> I'm a colleague of Josh and am also experiencing the same issue - >>>>> namely, being able to deploy to an Android phone and to sign in to collect >>>>> questionnaire data, but unable to sync back to the server. >>>>> >>>>> I've looked at the couchlog as you recommended, and indeed the request >>>>> is chunked data (screenshot attached). The questionnaire data itself is >>>>> very small, but it looks like my environment variables are being included >>>>> in the request, plus I don't see any questionnaire data in the request. >>>>> >>>>> Any help or suggestions would be appreciated! >>>>> >>>>> -Al >>>>> >>>>> >>>>> >>>>> On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote: >>>>> >>>>>> Hi Josh, >>>>>> >>>>>> It doesn't sound like a code issue - more like a setup one. And just >>>>>> to confirm - you are able to sync the user account down to the phone, just >>>>>> not submit data? >>>>>> >>>>>> Are you including image attachments with your forms or are your forms >>>>>> very long? One possible issue is that the phones use chunked encoding to >>>>>> submit data, which is likely not compatible with runserver. This should >>>>>> really only be an issue if your forms are quite large though. In our >>>>>> production setup we use apache to proxy the chunked encoding in front of >>>>>> gunicorn, but that said, i've submitted data to my development instance on >>>>>> runserver quite recently with no problems. >>>>>> >>>>>> Could you also go to: http://192.168.1.13:900*0*/couchlog/view/ >>>>>> 65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more >>>>>> information there? >>>>>> >>>>>> Cory >>>>>> >>>>>> >>>>>> On Tue, May 27, 2014 at 7:28 PM, Josh Young wrote: >>>>>> >>>>>>> Thanks Cory, I've now joined the CommCare Developers group :). >>>>>>> >>>>>>> For the ODK, I've downloaded the CommCare ODK from here >>>>>>> >>>>>>> (Dimagi's build server) and I've tried it from Google Play (v2). >>>>>>> >>>>>>> For the server I modified an existing script (attached as >>>>>>> install.sh) that does the dependency setup and then I made some minor >>>>>>> changes to the localsettings.py (commented out JAR_SIGN and modified >>>>>>> BASE_ADDRESS, also attached). >>>>>>> To run it I run the commands: >>>>>>> ./manage.py run_ptop --all & ./manage.py runserver 192.168.1.13:9000 >>>>>>> >>>>>>> The ODK is able to download the app and run it, it is the sync that >>>>>>> fails (both log syncing and form syncing). >>>>>>> >>>>>>> I've tested this after rebasing master today (5/27/14) and it still >>>>>>> fails. If there is a tag or branch that is known to be stable I can use >>>>>>> that, I'm only on master because I couldn't figure out which other branch >>>>>>> would be appropriate. >>>>>>> >>>>>>> Let me know if there is anything else that would be useful. >>>>>>> >>>>>>> Using the google play's CommCare ODK against www.commcarehq.org >>>>>>> seems to work w/o issue, so I'm pretty sure its some server setting that >>>>>>> I'm missing. >>>>>>> >>>>>>> Thanks, >>>>>>> ~Josh >>>>>>> >>>>>>> >>>>>>> On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote: >>>>>>> >>>>>>>> Hi Josh, >>>>>>>> >>>>>>>> I'm taking this to the commcare-developers list (which you should >>>>>>>> join if you haven't). Just to confirm - you are running CommCare ODK and >>>>>>>> not normal ODK, right? How are you running your server? >>>>>>>> >>>>>>>> thanks, >>>>>>>> Cory >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, May 27, 2014 at 9:18 AM, Josh Young wrote: >>>>>>>> >>>>>>>>> I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ). >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> When I try to syn forms from my Android device using the ODK I get an error in the logs of my server: >>>>>>>>> ========== >>>>>>>>> [24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174 >>>>>>>>> [24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22 >>>>>>>>> 2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission. >>>>>>>>> Response is: >>>>>>>>> Content-Type: text/html; charset=utf-8 >>>>>>>>> >>>>>>>>> If you use multipart/form-data, please name your file xml_submission_file. >>>>>>>>> You may also do a normal (non-multipart) post with the xml submission as the request body instead. >>>>>>>>> >>>>>>>>> See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc >>>>>>>>> ========== >>>>>>>>> >>>>>>>>> How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data? >>>>>>>>> >>>>>>>>> I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone. >>>>>>>>> >>>>>>>>> Installed HQ is from a build from master as of early last week. >>>>>>>>> ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014. >>>>>>>>> The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated. >>>>>>>>> >>>>>>>>> Thanks! >>>>>>>>> ~Josh >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "commcare-users" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to commcare-user...@googlegroups.com. >>>>>>>>> >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>> >>>>>>> --- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "CommCare Developers" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to commcare-developers+unsubscribe@googlegroups.com. >>>>>>> >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "CommCare Developers" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to commcare-developers+unsubscribe@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>> >>

Hi Aaron,

That's the really strange thing. I am positive that this worked 2 months
ago because I was doing extensive local testing, but I tested on mobile and
server builds from that period and they no longer work together. Which
points to either (1) me being crazy or (2) a really strange dependency like
the android OS being an issue.

Unfortunately no one else on our team has had a chance to look closer into
this yet, but it is also a priority for us to get it working again.

When was the last time anyone on this list successfully submitted a form
from a phone to their local instance? If anyone still has a working
environment that could be a good starting point.

Cory

··· On Tue, Jun 3, 2014 at 2:44 PM, Aaron Gale wrote:

Hi Cory,

I'm a colleague of both Josh and Al, just wanted to check back into this
issue to see if you had any clearer idea of what's going on. Or on the flip
side, is there a known stable version we could test out rather than basing
off of the master code? Any help would be greatly appreciated!

Thanks,
Aaron

On Friday, May 30, 2014 10:26:52 AM UTC-4, Al Ramsey wrote:

Thanks for looking into this Cory. I'll work on setting up an Apache
proxy.

-Al

On Thursday, May 29, 2014 7:32:35 PM UTC-4, Cory Zue wrote:

Hey again,

I'm having trouble with this one. I ran against several old builds of
both the server and mobile and wasn't able to reproduce it - which is quite
strange since I am sure that it worked for me as recently as April.

I'll continue to dig, but may not be able to provide an answer very soon.

As a potential workaround you could setup a local Apache proxy in front
of your django workers and use mod_proxy to deal with the chunked request
(which would mirror our production setup and should work).

Cory

On Thu, May 29, 2014 at 3:25 PM, Cory Zue cz...@dimagi.com wrote:

Hey,

Just wanted to follow up that I've gotten as far as reproducing this,
but haven't yet figured out the root cause. Am continuing to look into it.

Cory

On Wed, May 28, 2014 at 8:54 PM, Cory Zue cz...@dimagi.com wrote:

Hi Al,

I'll see if I can reproduce this locally and get back to you.

cheers,
Cory

On Wed, May 28, 2014 at 2:04 PM, Al Ramsey aramse...@gmail.com wrote:

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue -
namely, being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the
request is chunked data (screenshot attached). The questionnaire data
itself is very small, but it looks like my environment variables are being
included in the request, plus I don't see any questionnaire data in the
request.

Any help or suggestions would be appreciated!

-Al

On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote:

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And just
to confirm - you are able to sync the user account down to the phone, just
not submit data?

Are you including image attachments with your forms or are your
forms very long? One possible issue is that the phones use chunked encoding
to submit data, which is likely not compatible with runserver. This should
really only be an issue if your forms are quite large though. In our
production setup we use apache to proxy the chunked encoding in front of
gunicorn, but that said, i've submitted data to my development instance on
runserver quite recently with no problems.

Could you also go to: http://192.168.1.13:9000/couchlog/view/
65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more
information there?

Cory

On Tue, May 27, 2014 at 7:28 PM, Josh Young jyo...@vecna.com wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from here
http://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk
(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as
install.sh) that does the dependency setup and then I made some minor
changes to the localsettings.py (commented out JAR_SIGN and modified
BASE_ADDRESS, also attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver
192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync that
fails (both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it still
fails. If there is a tag or branch that is known to be stable I can use
that, I'm only on master because I couldn't figure out which other branch
would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org
seems to work w/o issue, so I'm pretty sure its some server setting that
I'm missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should
join if you haven't). Just to confirm - you are running CommCare ODK and
not normal ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the
Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Aaron and Josh,

Just to follow up on this - we have looked into this issue extensively and
confirmed that there does seem to be an issue with chunked encoding, and it
does not seem to be solvable without using a proxy.

The good news is that we added a sample apache config to the repository,
and have been able to get things up and running quite quickly using this:
https://github.com/dimagi/commcare-hq/blob/master/apache/local_apache.conf

The file has comments about the other modules you have to enable in order
to get it working.

Good luck!

Cory

··· On Tue, Jun 3, 2014 at 2:50 PM, Cory Zue wrote:

Hi Aaron,

That's the really strange thing. I am positive that this worked 2 months
ago because I was doing extensive local testing, but I tested on mobile and
server builds from that period and they no longer work together. Which
points to either (1) me being crazy or (2) a really strange dependency like
the android OS being an issue.

Unfortunately no one else on our team has had a chance to look closer into
this yet, but it is also a priority for us to get it working again.

When was the last time anyone on this list successfully submitted a form
from a phone to their local instance? If anyone still has a working
environment that could be a good starting point.

Cory

On Tue, Jun 3, 2014 at 2:44 PM, Aaron Gale aaronbgale@gmail.com wrote:

Hi Cory,

I'm a colleague of both Josh and Al, just wanted to check back into this
issue to see if you had any clearer idea of what's going on. Or on the flip
side, is there a known stable version we could test out rather than basing
off of the master code? Any help would be greatly appreciated!

Thanks,
Aaron

On Friday, May 30, 2014 10:26:52 AM UTC-4, Al Ramsey wrote:

Thanks for looking into this Cory. I'll work on setting up an Apache
proxy.

-Al

On Thursday, May 29, 2014 7:32:35 PM UTC-4, Cory Zue wrote:

Hey again,

I'm having trouble with this one. I ran against several old builds of
both the server and mobile and wasn't able to reproduce it - which is quite
strange since I am sure that it worked for me as recently as April.

I'll continue to dig, but may not be able to provide an answer very
soon.

As a potential workaround you could setup a local Apache proxy in front
of your django workers and use mod_proxy to deal with the chunked request
(which would mirror our production setup and should work).

Cory

On Thu, May 29, 2014 at 3:25 PM, Cory Zue cz...@dimagi.com wrote:

Hey,

Just wanted to follow up that I've gotten as far as reproducing this,
but haven't yet figured out the root cause. Am continuing to look into it.

Cory

On Wed, May 28, 2014 at 8:54 PM, Cory Zue cz...@dimagi.com wrote:

Hi Al,

I'll see if I can reproduce this locally and get back to you.

cheers,
Cory

On Wed, May 28, 2014 at 2:04 PM, Al Ramsey aramse...@gmail.com wrote:

Hello Cory,

I'm a colleague of Josh and am also experiencing the same issue -
namely, being able to deploy to an Android phone and to sign in to collect
questionnaire data, but unable to sync back to the server.

I've looked at the couchlog as you recommended, and indeed the
request is chunked data (screenshot attached). The questionnaire data
itself is very small, but it looks like my environment variables are being
included in the request, plus I don't see any questionnaire data in the
request.

Any help or suggestions would be appreciated!

-Al

On Wednesday, May 28, 2014 12:09:40 PM UTC-4, Cory Zue wrote:

Hi Josh,

It doesn't sound like a code issue - more like a setup one. And
just to confirm - you are able to sync the user account down to the phone,
just not submit data?

Are you including image attachments with your forms or are your
forms very long? One possible issue is that the phones use chunked encoding
to submit data, which is likely not compatible with runserver. This should
really only be an issue if your forms are quite large though. In our
production setup we use apache to proxy the chunked encoding in front of
gunicorn, but that said, i've submitted data to my development instance on
runserver quite recently with no problems.

Could you also go to: http://192.168.1.13:9000/couchlog/view/
65ca95d2010a2a590cfaeac821b9c4dc/ and see if there's more
information there?

Cory

On Tue, May 27, 2014 at 7:28 PM, Josh Young jyo...@vecna.com wrote:

Thanks Cory, I've now joined the CommCare Developers group :).

For the ODK, I've downloaded the CommCare ODK from here
http://build.dimagi.com:250/repository/download/bt94/14112:id/commcare-odk.apk
(Dimagi's build server) and I've tried it from Google Play (v2).

For the server I modified an existing script (attached as
install.sh) that does the dependency setup and then I made some minor
changes to the localsettings.py (commented out JAR_SIGN and modified
BASE_ADDRESS, also attached).
To run it I run the commands:
./manage.py run_ptop --all & ./manage.py runserver
192.168.1.13:9000

The ODK is able to download the app and run it, it is the sync
that fails (both log syncing and form syncing).

I've tested this after rebasing master today (5/27/14) and it
still fails. If there is a tag or branch that is known to be stable I can
use that, I'm only on master because I couldn't figure out which other
branch would be appropriate.

Let me know if there is anything else that would be useful.

Using the google play's CommCare ODK against www.commcarehq.org
seems to work w/o issue, so I'm pretty sure its some server setting that
I'm missing.

Thanks,
~Josh

On Tuesday, May 27, 2014 1:59:38 PM UTC-4, Cory Zue wrote:

Hi Josh,

I'm taking this to the commcare-developers list (which you should
join if you haven't). Just to confirm - you are running CommCare ODK and
not normal ODK, right? How are you running your server?

thanks,
Cory

On Tue, May 27, 2014 at 9:18 AM, Josh Young jyo...@vecna.com wrote:

I have a locally installed version of HQ (on a linux desktop) from the latest master as of early last week and the phone is using a manually installed ODK that matches 2.12.0 (the same app version that I loaded into HQ).

When I try to syn forms from my Android device using the ODK I get an error in the logs of my server:

[24/May/2014 03:24:38] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 400 174
[24/May/2014 03:24:39] "POST /a/clinipak/receiver/secure/65ca95d2010a2a590cfaeac821445254/ HTTP/1.1" 401 22
2014-05-24 03:24:39,744 ERROR Status code 400 for a form submission.
Response is:
Content-Type: text/html; charset=utf-8

If you use multipart/form-data, please name your file xml_submission_file.
You may also do a normal (non-multipart) post with the xml submission as the request body instead.

See couchlog db for more info: 65ca95d2010a2a590cfaeac821b9c4dc

How do I update the ODK on the phone to use the xml_submission_file field or to use non-multipart data?

I downloaded the latest 2.12.0 build for both the local HQ server and the ODK running on the phone.

Installed HQ is from a build from master as of early last week.
ODK is downloaded from the build site: "2.12"(30706) Built on May-21-2014.
The goal is to get a version of ODK installed that will talk to a locally install HQ, so any help or experience with that would be appreciated.

Thanks!
~Josh

--
You received this message because you are subscribed to the
Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.