Page 1 of 1

WebGL error? (SOLVED)

Posted: Mon Sep 16, 2019 9:53 am
by krolldk

I'm using Easysave with cloud. I now have an issue, where downloading a file from the cloud works fine in editor, when the editors build target is windows. When I switch the build target to WebGL, and make no other changes, the download doesn't work.

Debugging with Visual Studio, I found the following:

In E3Cloud.cs line 375:
if(!HandleError(webRequest, false))

when I look at the WebRequest object, I get different results if buildtarget is set for WebGL, v.s. if buildtarget is set for Windows standalone:
WebGL build target:
webRequest.downloadedBytes = 0
webrequest.uploadedBytes = 153

Windows build target:
webrequest.downloadedBytes = 107
webrequest.uploadedBytes = 64

In both cases, the responseCode is 200 (meaning the webrequest was a succes), but for some reason, in webGL buildtarget, the webrequest uploads more, and downloads nothing. Apart from the above, I have found no difference.

If I *build* for WebGL, the file download also does not work. Color me baffled.

Re: WebGL error?

Posted: Mon Sep 16, 2019 10:57 am
by krolldk
OK followup:

I am pretty sure this only affects me, and for messed up reasons :-)
It turned out that E3Cloud.GetUser(name,pass) had different return values from webGL build target to win build target, because I had a compiler flag DISABLE_HASHING defined only on windows buildtarget. (Remember ? I had that issue with not wanting the usernames to be obfuscated on the DB?) I have now set the compiler flag on both build targets, and it now works in editor at least.

I'm building for webgl as I write this. Will keep you posted.

Re: WebGL error?

Posted: Mon Sep 16, 2019 11:37 am
by krolldk
yeah. that was it.

TL: DR; My bad. No action required.

Re: WebGL error? (SOLVED)

Posted: Mon Sep 16, 2019 3:37 pm
by Joel
Glad you managed to find the solution to your problem. Let me know if you run into any other issues :)

All the best,