Error On Android Network.request

Hi,

Part of my app uploads some information into a mysql database on my webserver using http post method.  On ios this works fine, but on android I get an error stating

ERROR: Expected 1543 bytes received 1544

I’m not sure if this is on the end of my webserver or an issue with android and network request, but seems odd it doesn’t do this in the simulator or on ios, just android.

Anybody else had this issue?

Thanks

just done some further tests, and it seem that 1 byte more is being sent than the webserver expects.  Does network.request on android add a parity / error checking byte or something along those lines?

Thanks

Gary

Gary,

I just tried posting a string and posting a file via Android… and verified that our network APK is sending the same amount of bytes that the “event.bytesEstimated” is returning.  I even tried sending a very large binary file that was about 90 MB and the correct amount of bytes was transmitted.  At least as far as I can tell.

Note that you can retrieve the number of bytes that Corona thinks it needs to transfer via your network Lua listener via the “event.bytesEstimated” property.  This property is only made available if you enable your listener to receive “progress” events.

So, if you still think the issue is on our end, then would you mind sending us a small sample project that can reproduce this issue please?  You can do so by clicking the “Report a Bug” link at the top of this web page.  It may be that you’ve found an edge case that our current tests is not covering.

Hi,  I traced the issue down to me using a / in the string.  It cut the string off, so the full text wasn’t sent.  Not sure why it worked fine on ios though but not android.  I’ve just changed the formatting to not need it and its working ok now.

Thanks

Great! I’m glad it’s working for you!

just done some further tests, and it seem that 1 byte more is being sent than the webserver expects.  Does network.request on android add a parity / error checking byte or something along those lines?

Thanks

Gary

Gary,

I just tried posting a string and posting a file via Android… and verified that our network APK is sending the same amount of bytes that the “event.bytesEstimated” is returning.  I even tried sending a very large binary file that was about 90 MB and the correct amount of bytes was transmitted.  At least as far as I can tell.

Note that you can retrieve the number of bytes that Corona thinks it needs to transfer via your network Lua listener via the “event.bytesEstimated” property.  This property is only made available if you enable your listener to receive “progress” events.

So, if you still think the issue is on our end, then would you mind sending us a small sample project that can reproduce this issue please?  You can do so by clicking the “Report a Bug” link at the top of this web page.  It may be that you’ve found an edge case that our current tests is not covering.

Hi,  I traced the issue down to me using a / in the string.  It cut the string off, so the full text wasn’t sent.  Not sure why it worked fine on ios though but not android.  I’ve just changed the formatting to not need it and its working ok now.

Thanks

Great! I’m glad it’s working for you!