JSON publisher issue

I am running aggregate version 1.4.4 on GAE. I am trying to stream data for a form from Aggregate to a webserver but I am getting an empty post - array(0). I have tried everything, but post is always empty for some strange reason.

On the same web server, I am fetching JSON data successfully for 20 other forms from Aggreagte, the only difference is that the Aggregate version in 1.3.3. I did check the release notes and realized the that publisher changes between the two version, however, the JSON data is still being sent as POST.

PS: I tried the form on version 1.4.4 with Aggergate version 1.3.3 and the JSON export now works! However, I can't downgrade to Aggreagte 1.3.3 as changing the GAE application ID is out of question.

Any help fixing the JSON publishing on v1.4.4? Thanks.

Are there any errors reported in your 1.4.4 server's error logs?

Note that the Simple JSON publisher was changed between 1.3.4 and 1.4.1

If your server is handling submissions from 1.3.4 but not from 1.4.4, then
you probably need to update how your server is parsing the entity body that
ODK Aggregate is sending, as it did change between those two releases.

You also may need to choose to upload existing data and stream new data
when setting up your publisher -- otherwise a streaming-only publisher
would emit a single empty publishing request then sit idle waiting for a
new submission to arrive (and then a few seconds after it arrives, it would
attempt to publish that one submission to the JSON server). This might
explain the behavior you are seeing.

Mitch

··· On Fri, Jan 9, 2015 at 11:19 PM, Mandy wrote:

I am running aggregate version 1.4.4 on GAE. I am trying to stream data
for a form from Aggregate to a webserver but I am getting an empty post -
array(0). I have tried everything, but post is always empty for some
strange reason.

On the same web server, I am fetching JSON data successfully for 20 other
forms from Aggreagte, the only difference is that the Aggregate version in
1.3.3. I did check the release notes and realized the that publisher
changes between the two version, however, the JSON data is still being sent
as POST.

PS: I tried the form on version 1.4.4 with Aggergate version 1.3.3 and the
JSON export now works! However, I can't downgrade to Aggreagte 1.3.3 as
changing the GAE application ID is out of question.

Any help fixing the JSON publishing on v1.4.4? Thanks.

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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks, Mitch, for your response. I checked for server's error log and there was nothing to indicate a problem. In fact, I can verify from my server that I am receiving the post from aggregate server but it is empty. I also checked for app-engine app logs and found nothing. I, in fact, checked the same on three different web servers - one shared, one VPS and one dedicated, but with the same results. On all three servers, I could receive post from Aggregate 1.3.2 but an empty post from 1.4.4.

I also checked the ODK Post Receiver, and while it receives the post from GAE installed version, it gets the same empty post when hosted on external web servers. Is there a possibility that GAE is somehow not posting anything to an external IP? But then, since it does on 1.3.4, it makes me think otherwise.

I know things have changed between 1.3.4 and 1.4.1 with regards to JSON publishing, but since the data is still being sent as POST, I assume I should at least receive it as an array on my server in whatever format it now comes in.

Yes, I always publish existing records+stream. I get an empty array for each existing record, so if I have 10 records for a form, I see 10 array(0) in the POST that I receive.

Thanks.

··· On Tuesday, January 13, 2015 at 2:52:38 AM UTC+5:30, Mitch wrote: > Are there any errors reported in your 1.4.4 server's error logs? > > > Note that the Simple JSON publisher was changed between 1.3.4 and 1.4.1 > > > If your server is handling submissions from 1.3.4 but not from 1.4.4, then you probably need to update how your server is parsing the entity body that ODK Aggregate is sending, as it did change between those two releases. > > > You also may need to choose to upload existing data and stream new data when setting up your publisher -- otherwise a streaming-only publisher would emit a single empty publishing request then sit idle waiting for a new submission to arrive (and then a few seconds after it arrives, it would attempt to publish that one submission to the JSON server). This might explain the behavior you are seeing. > > > Mitch > > > > > > On Fri, Jan 9, 2015 at 11:19 PM, Mandy wrote: > I am running aggregate version 1.4.4 on GAE. I am trying to stream data for a form from Aggregate to a webserver but I am getting an empty post - array(0). I have tried everything, but post is always empty for some strange reason. > > > > On the same web server, I am fetching JSON data successfully for 20 other forms from Aggreagte, the only difference is that the Aggregate version in 1.3.3. I did check the release notes and realized the that publisher changes between the two version, however, the JSON data is still being sent as POST. > > > > PS: I tried the form on version 1.4.4 with Aggergate version 1.3.3 and the JSON export now works! However, I can't downgrade to Aggreagte 1.3.3 as changing the GAE application ID is out of question. > > > > Any help fixing the JSON publishing on v1.4.4? Thanks. > > > > -- > > You received this message because you are subscribed to the Google Groups "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com

I was able to finally fix this. I have been using PHP var_dump function to get the contents of post earlier, but I had to instead use the file_get_contents('php://input') function. It di pose another set of problems as this particular function returns the post data as string. I had to change my code significantly to make it work fully, but it did work, finally.

··· On Tuesday, January 13, 2015 at 9:55:27 AM UTC+5:30, Mandy wrote: > Thanks, Mitch, for your response. I checked for server's error log and there was nothing to indicate a problem. In fact, I can verify from my server that I am receiving the post from aggregate server but it is empty. I also checked for app-engine app logs and found nothing. I, in fact, checked the same on three different web servers - one shared, one VPS and one dedicated, but with the same results. On all three servers, I could receive post from Aggregate 1.3.2 but an empty post from 1.4.4. > > I also checked the ODK Post Receiver, and while it receives the post from GAE installed version, it gets the same empty post when hosted on external web servers. Is there a possibility that GAE is somehow not posting anything to an external IP? But then, since it does on 1.3.4, it makes me think otherwise. > > I know things have changed between 1.3.4 and 1.4.1 with regards to JSON publishing, but since the data is still being sent as POST, I assume I should at least receive it as an array on my server in whatever format it now comes in. > > Yes, I always publish existing records+stream. I get an empty array for each existing record, so if I have 10 records for a form, I see 10 array(0) in the POST that I receive. > > Thanks. > > On Tuesday, January 13, 2015 at 2:52:38 AM UTC+5:30, Mitch wrote: > > Are there any errors reported in your 1.4.4 server's error logs? > > > > > > Note that the Simple JSON publisher was changed between 1.3.4 and 1.4.1 > > > > > > If your server is handling submissions from 1.3.4 but not from 1.4.4, then you probably need to update how your server is parsing the entity body that ODK Aggregate is sending, as it did change between those two releases. > > > > > > You also may need to choose to upload existing data and stream new data when setting up your publisher -- otherwise a streaming-only publisher would emit a single empty publishing request then sit idle waiting for a new submission to arrive (and then a few seconds after it arrives, it would attempt to publish that one submission to the JSON server). This might explain the behavior you are seeing. > > > > > > Mitch > > > > > > > > > > > > On Fri, Jan 9, 2015 at 11:19 PM, Mandy wrote: > > I am running aggregate version 1.4.4 on GAE. I am trying to stream data for a form from Aggregate to a webserver but I am getting an empty post - array(0). I have tried everything, but post is always empty for some strange reason. > > > > > > > > On the same web server, I am fetching JSON data successfully for 20 other forms from Aggreagte, the only difference is that the Aggregate version in 1.3.3. I did check the release notes and realized the that publisher changes between the two version, however, the JSON data is still being sent as POST. > > > > > > > > PS: I tried the form on version 1.4.4 with Aggergate version 1.3.3 and the JSON export now works! However, I can't downgrade to Aggreagte 1.3.3 as changing the GAE application ID is out of question. > > > > > > > > Any help fixing the JSON publishing on v1.4.4? Thanks. > > > > > > > > -- > > > > You received this message because you are subscribed to the Google Groups "ODK Developers" group. > > > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > -- > > > > Mitch Sundt > > Software Engineer > > University of Washington > > mitche...@gmail.com

Good. Glad to hear it. Testing using requestbin.in shows that everything is
working fine with this functionality, at least w.r.t. the server.

··· On Tue, Jan 13, 2015 at 10:13 AM, Mandy wrote:

I was able to finally fix this. I have been using PHP var_dump function to
get the contents of post earlier, but I had to instead use the
file_get_contents('php://input') function. It di pose another set of
problems as this particular function returns the post data as string. I had
to change my code significantly to make it work fully, but it did work,
finally.

On Tuesday, January 13, 2015 at 9:55:27 AM UTC+5:30, Mandy wrote:

Thanks, Mitch, for your response. I checked for server's error log and
there was nothing to indicate a problem. In fact, I can verify from my
server that I am receiving the post from aggregate server but it is empty.
I also checked for app-engine app logs and found nothing. I, in fact,
checked the same on three different web servers - one shared, one VPS and
one dedicated, but with the same results. On all three servers, I could
receive post from Aggregate 1.3.2 but an empty post from 1.4.4.

I also checked the ODK Post Receiver, and while it receives the post
from GAE installed version, it gets the same empty post when hosted on
external web servers. Is there a possibility that GAE is somehow not
posting anything to an external IP? But then, since it does on 1.3.4, it
makes me think otherwise.

I know things have changed between 1.3.4 and 1.4.1 with regards to JSON
publishing, but since the data is still being sent as POST, I assume I
should at least receive it as an array on my server in whatever format it
now comes in.

Yes, I always publish existing records+stream. I get an empty array for
each existing record, so if I have 10 records for a form, I see 10 array(0)
in the POST that I receive.

Thanks.

On Tuesday, January 13, 2015 at 2:52:38 AM UTC+5:30, Mitch wrote:

Are there any errors reported in your 1.4.4 server's error logs?

Note that the Simple JSON publisher was changed between 1.3.4 and 1.4.1

If your server is handling submissions from 1.3.4 but not from 1.4.4,
then you probably need to update how your server is parsing the entity body
that ODK Aggregate is sending, as it did change between those two releases.

You also may need to choose to upload existing data and stream new
data when setting up your publisher -- otherwise a streaming-only publisher
would emit a single empty publishing request then sit idle waiting for a
new submission to arrive (and then a few seconds after it arrives, it would
attempt to publish that one submission to the JSON server). This might
explain the behavior you are seeing.

Mitch

On Fri, Jan 9, 2015 at 11:19 PM, Mandy bas...@gmail.com wrote:
I am running aggregate version 1.4.4 on GAE. I am trying to stream
data for a form from Aggregate to a webserver but I am getting an empty
post - array(0). I have tried everything, but post is always empty for some
strange reason.

On the same web server, I am fetching JSON data successfully for 20
other forms from Aggreagte, the only difference is that the Aggregate
version in 1.3.3. I did check the release notes and realized the that
publisher changes between the two version, however, the JSON data is still
being sent as POST.

PS: I tried the form on version 1.4.4 with Aggergate version 1.3.3 and
the JSON export now works! However, I can't downgrade to Aggreagte 1.3.3 as
changing the GAE application ID is out of question.

Any help fixing the JSON publishing on v1.4.4? Thanks.

--

You received this message because you are subscribed to the Google
Groups "ODK Developers" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.

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

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

A post was merged into an existing topic: Simple Json Publisher Stop Publishing Suddenly