question

aronkey avatar image
aronkey asked

WebGL Files SimplePutCall missing response

Hello

We're experiencing problems with new entity system. Uploading files from editor and standalone builds works fine (Unity + latest PlayFabSDK and PlayFab Editor Extensions). Every step was made according to https://api.playfab.com/docs/tutorials/entities/getting-started-entities . Unfortunately, WebGL doesn't return callback after calling PlayFabHttp.SimplePutCall(). Downloading files with PlayFabHttp.SimpleGetCall() works as intended on WebGL. TitleID is E8DE.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Can you provide the code snippets showing how you're using the calls?

9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

aronkey avatar image aronkey commented ·

Su,re I've just made a simple class to reproduce the problem. We never receive any callback from mentioned above method, nor error nor success. It only happens with webGL build.

snippet

0 Likes 0 ·
brendan avatar image brendan aronkey commented ·

Which SDK and which version of that SDK are you using? Also, if you put in breakpoints on the call and each return function, what specifically do you see in your execution?

0 Likes 0 ·
aronkey avatar image aronkey brendan commented ·

SDK https://api.playfab.com/sdks/unity used version is latest available 2.41.180529. After some debugging (putting break points is unfortunately not an option for final webGL build) it turned out that that inside your SDK in file PlayFabWWW.cs in SimpleCallCoroutine after calling:

var putRequest = UnityWebRequest.Put(fullUrl, payload);
putRequest.SendWebRequest();

and checking with:

while (putRequest.uploadProgress < 1 && putRequest.downloadProgress < 1)
                {
                    yield return 1;
                }

putRequest.uploadProgress is always 0, also putRequest.error is always null or empty. Unity version is 2017.3.1p1. My guess is that unity's web request is the problem here.sentput.png

0 Likes 0 ·
sentput.png (54.6 KiB)
Show more comments
aronkey avatar image aronkey commented ·

Unfortunately doing this won't change anything. As I said, there is some kind of a bug in Unity. In this case when building with WebGL target platform Unity(2017.3) won't update field UnityWebRequest.uploadProgress, used with put request. So changing logical operator won't work. The only flag that works for us is UnityWebRequest.isDone . Bug is related to WebGL only as far as I know (didn't test iOS) so some #if UNITY_WEBGL should be put somewhere there.

0 Likes 0 ·
brendan avatar image brendan aronkey commented ·

Hm - thanks. If you have a suggested fix, can you submit that as a pull request on the SDK?

0 Likes 0 ·
aronkey avatar image aronkey brendan commented ·

Sure, if I find a moment during weekend I'll gladly help

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.