IOS Post request with Raw data

Hi,
We are using unity 2019.1.4
We have a problem with post “unitywebrequest” with image raw data.
This problem only appears on IOS devices. The problem is not reproduced on android devices, webGL and from editor.
In our game we dynamically make a texture, then we decode it into jpeg and send a request to the server via post request with raw data.

In the center is the texture that we generate dynamically on the device. Then we decode this texture in jpeg and then send them via post request. (texture rendered with separate camera via rendertexture)

But after converting to jpeg and sending it becomes like this.
Sometimes the picture ends up normal. It seems that the picture does not have time to decode normally in jpeg.
Has anyone encountered such a problem? Maybe problem with metal?


Any help?

We may be encountering the same problem.

We are finding that when sending Posts of >5-6k there’s a good chance the data send is garbled somewhat.

We’re currently preparing a defect to submit to Unity…

There is a known issue with upload. The fix is in the works.

3 Likes

I’m facing the same issue, has been driving me crazy over several days. Also, reproducible on iOS devices only. No matter how are you sending files - as multi-part form data files, or base64 encoded JSON values, PUT por POST requests - the result is always the same - some bytes are getting lost

Hi Aurimas-Cernius,

#1 - Great to hear!
#2 - Is there a defect # of something that we can track?
#3 - Do you know if they are targeting a fix for 2019.1.X, 2.X, etc?

Thanks a bunch!

Paul.

Oh, and if folks are interested, we’ve documented the defect and created a small test app to reproduce (and detect the issue).

It basically sends a large-ish request to a webhook that echos the data back. If the data doesn’t match, the issue has occurred. Unity 2018.X works just fine, 2019.X intermittently fails (not 100% of the time, but way very regularly).

Just adding my voice to people who have encountered this issue. An update or a time-frame on one would be greatly appreciated.

Thanks,
Omar

Would be nice to see this fixed. Seems pretty important if it’s effecting data transfer between backends and the games.

Here’s the link to the issue in the Unity Issue Tracker.

Go give it your +1!