WebGL error? (SOLVED)

Discussion and help for Easy Save 3
Post Reply
krolldk
Posts: 25
Joined: Sun Jun 02, 2019 11:15 am

WebGL error? (SOLVED)

Post by krolldk »

Hi

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.
Last edited by krolldk on Mon Sep 16, 2019 11:37 am, edited 1 time in total.
krolldk
Posts: 25
Joined: Sun Jun 02, 2019 11:15 am

Re: WebGL error?

Post 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.
krolldk
Posts: 25
Joined: Sun Jun 02, 2019 11:15 am

Re: WebGL error?

Post by krolldk »

yeah. that was it.

TL: DR; My bad. No action required.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: WebGL error? (SOLVED)

Post 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,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply