question

brendan avatar image
brendan asked

I get the same error codes all the time

amjadyahya
started a topic on Wed, 22 April 2015 at 9:37 AM

I'm using PlayFab AS3 SDK and I get same error code with different api calls, be it login or register or linkwithfacebook, I always get this:

error.HttpCode: 0
error.HttpStatus: null
error.Error: 2
error.ErrorMessage: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://5490.playfabapi.com/Client/RegisterPlayFabUser" errorID=2032]
error.ErrorDetails: null

As you can see above I get an error code of 0 for "RegisterPlayFabUser".

Is it a bug in AS3 SDK?

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

Best Answer
Brendan Vanous said on Wed, 06 May 2015 at 12:05 AM

Sorry to hear that - from some of the follow-up posts I ran across, I was hoping that the update would bring this within reach. With XP no longer supported, I suppose I shouldn't be too surprised, but it's still irritating. We'll make sure to update our SDK documentation to note that if your application is dependent upon the operating system for TLS, that Windows 7 is the minimum requirement (since Vista is in the same boat).


24 Comments
Brendan Vanous said on Thu, 23 April 2015 at 5:56 PM

I suspect you're hitting this due to a timeout. We haven't seen this in our own testing, but depending on your location, it's possible you'll hit the default timeout of 30 seconds. Can you add this to the PlaFabHTTP.as, and let us know if this resolves the issue for you?

import flash.net.URLRequestDefaults;

URLRequestDefaults.idleTimeout = 120000;

This sets the timeout to two minutes (the value is in milliseconds).

Brendan


amjadyahya said on Fri, 24 April 2015 at 1:39 AM

Thanks for your help, but that did not resolve the issue. I see the error about 2-3 seconds after I initiate the call, so it's not about the timeout, I even tried a value of 520000 with no luck what so ever.

Another issue arose today -which did not exist yesterday- LoginWithPlayFab() is failing with the exact same error:

error.HttpCode: 0
error.HttpStatus: null
error.Error: 2
error.ErrorMessage: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://5490.playfabapi.com/Client/LoginWithPlayFab" errorID=2032]
error.ErrorDetails: null

The strange thing is that I can successfully login with LoginWithPlayFab() using POSTMAN with the exact same parameters that I'm using in my AS3 app.

Here is my development environment, may be it will help:
Windows XP 32-bit
Flash Builder 4.7
AIR 17


Brendan Vanous said on Fri, 24 April 2015 at 10:19 AM

Thanks for the extra info - are you running in the standalone runtime or the web browser (and if so, which browser and what version)?


amjadyahya said on Sat, 25 April 2015 at 1:57 AM

Standalone Air 17 runtime.


Brendan Vanous said on Mon, 27 April 2015 at 3:29 PM

Thanks - good to know. As we're not able to repro this (and we can't really match your environment), could you grab the sample project from our ActionScript SDK (we updated to include this) and test using that? And if possible, could you get a network capture of the traffic during that test?

Brendan


amjadyahya said on Tue, 28 April 2015 at 8:19 AM

Same thing
Here is the log

DONE
[SWF] SDKTest.swf - 198,685 bytes after decompression
Got an error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://F00.playfabapi.com/Client/LoginWithPlayFab" errorID=2032]
[Unload SWF] SDKTest.swf

Attaching the network traffic capture


Brendan Vanous said on Mon, 04 May 2015 at 4:23 PM

Aha! Sometimes we have to take a step back and look at the most basic elements, to find the answer. In this case, it's simply the fact that your ActionScript executable is using TLS 1.0 - which isn't compatible, as it's not secure. If you update your system to Internet Explorer 8, that should update you to TLS 1.2, which will work. Can you give that a try?


amjadyahya said on Tue, 05 May 2015 at 11:39 PM

IE 8 is already installed, and unfortunately -after a little research- TLS 1.2 is not supported on Windows XP.
I guess that's it, I'm forced to drop development using playfab.

Thank you for your help.


Brendan Vanous said on Wed, 06 May 2015 at 12:05 AM

Sorry to hear that - from some of the follow-up posts I ran across, I was hoping that the update would bring this within reach. With XP no longer supported, I suppose I shouldn't be too surprised, but it's still irritating. We'll make sure to update our SDK documentation to note that if your application is dependent upon the operating system for TLS, that Windows 7 is the minimum requirement (since Vista is in the same boat).


Yaame said on Wed, 06 May 2015 at 5:49 AM

I think that I have a somewhat similar if not the same problem. I am using the Unity SDK and every time I call PlayFabClientAPI.LoginWithPlayFab the unity log reports:

Got an error: Invalid input parameters
UnityEngine.Debug:Log(Object)
MiniExample:OnPlayFabError(PlayFabError) (at Assets/Scripts/MiniExample.cs:27)
PlayFab.Internal.ResultContainer`1:HandleResults(String, String, LoginResult&, PlayFabError&) (at Assets/Playfab/PlayFabSDK/Internal/ResultContainer.cs:91)
PlayFab.<LoginWithPlayFab>c__AnonStorey8:<>m__4(String, String) (at Assets/Playfab/PlayFabSDK/Public/PlayFabClientAPI.cs:207)
PlayFab.Internal.<MakeRequest>c__Iterator0:MoveNext() (at Assets/Playfab/PlayFabSDK/Internal/PlayFabHTTP.cs:53)
I have TLS 1.2 installed and activated and tried the sdk from both https://github.com/PlayFab/UnitySDK and https://github.com/PlayFab/Unity3d_Login_Example_Project. I tried multiple game title ID's(my own and 8D34). It seems like the connection is timing out. I do not really know what to do any more.


amjadyahya said on Wed, 06 May 2015 at 6:24 AM

Wait a minute, I just remembered that In my second post above I mentioned that I was able to call LoginWithPlayFab successfully from within my browser with Postman, so how it was possible from the browser with TLS 1.0 but not from a desktop app?
It seems that there is something else going on here that is not compatable with Windows XP other than TLS version.


Yaame said on Wed, 06 May 2015 at 7:07 AM

I'm testing with PowerShell right now and everything seems to work there.


Brendan Vanous said on Wed, 06 May 2015 at 10:28 AM

Yaame, could you send the code snippet of how you're calling LoginWithPlayFab? Normally, the "Invalid input parameters" means that something isn't correct in the use of the call.

Amjadyahya, Postman uses Chrome, which doesn't use the Windows crypto providers, so it doesn't have the same issue. If you take a WireShark capture of the communications in each test, you'll see what I mean when you expand the messages and example their TLS/SSL versions.


Yaame said on Wed, 06 May 2015 at 3:13 PM

Ah yes it was only written in the error message. Its a new scene with the MiniExample.cs script attached to the camera. In the script only the TitleID was changed. All files were copied as described in the github readme(the top level one).


Brendan Vanous said on Wed, 06 May 2015 at 3:52 PM

I would recommend having a look at our example project, which shows how to use a number of our authentication API calls, including LoginWithPlayFab: https://github.com/PlayFab/Unity3d_Login_Example_Project

There's also a blog post (here: https://playfab.com/blog/2015/04/15/first-impressions-count-best-practices-friction-free-player-authentication) which discusses best practices to ensure low-friction sign-in for your users.


amjadyahya said on Thu, 07 May 2015 at 3:17 AM

brendanv, thanks for the explanation.


Mc.chang05 said on Tue, 19 May 2015 at 1:58 AM

I'm using AS3 SDK and having a same problem.But this error only occur when i pass in incorrect request properties to any API calls. I can't get a proper error message like example

"code": 400,
"status": "BadRequest",
"error": "AccountNotFound",
"errorCode": 1001,
"errorMessage": "User not found"

I always get this stream error message

Got an error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://F00.playfabapi.com/Client/LoginWithAndroidDeviceID" errorID=2032]

I don't have any problem when I pass in the correct request properties. Any idea where i might got wrong?


Brendan Vanous said on Tue, 19 May 2015 at 6:29 PM

Jace, can you provide the specifics of the call you're making that results in this error?


Mc.chang05 said on Tue, 19 May 2015 at 10:01 PM

PlayFabSettings.TitleId = [MyTitleID];
PlayFabSettings.GlobalErrorHandler = onPlayFabError;
PlayFabClientAPI.LoginWithAndroidDeviceID(new LoginWithAndroidDeviceIDRequest( { AndroidDeviceId:"test1"} ), onLoginSuccess, null);

This is one of the example how I call. It is not only happen when I call LoginWithAndroidDeviceID, it happens to every API I call.


Brendan Vanous said on Wed, 20 May 2015 at 12:55 AM

Yes, in this case, it's the formatting of the request causing the values to be incorrect. I'd recommend having a look at the samples in our Login example project: https://github.com/PlayFab/Unity3d_Login_Example_Project. Specifically, in C#, you would create an instance of the request class in the call like so:

PlayFabClientAPI.LoginWithAndroidDeviceID(new LoginWithAndroidDeviceIDRequest{ AndroidDeviceId:"test1"}, onLoginSuccess, null);


Mc.chang05 said on Thu, 21 May 2015 at 3:10 AM

In PlayFabHTTP.as, I just add

request.requestHeaders.push(new URLRequestHeader("X-ReportErrorAsSuccess", "true"));

and it solve my problem.


Brendan Vanous said on Thu, 21 May 2015 at 6:12 PM

Hi Jace,

You actually shouldn't ever explicitly set X-ReportErrorAsSuccess. It's in there specifically to allow Unity developers to get the error details, since anything other than a 200 response won't get them in Unity. And it is automatically set in our Unity SDK, so you should never have to do anything with it.

Correcting the instantiation of the LoginWithAndroidDeviceIDRequest, as in my previous post, would be the way to fix the error as originally stated. Using X-ReportErrorAsSuccess would result in you getting back a 200 response, with the error details in the body (and the call would have failed on the backend).

Brendan


Pdgilmore said on Fri, 24 July 2015 at 2:13 PM

Hello!

I am arriving at this party late, but I'm here to resolve this issue.

Firstly, I have fixed a widespread syntax issue, which was making many files not compile correctly.

This is now submitted, and should make it easy to set up the ActionScriptSDK in your project.

Secondly, I reproduced the error message. The failure is not consistent for me though. I have had both failed calls and successful calls from my ActionScript project. I am investigating a potential hidden cause, so stay tuned.


Brendan Vanous said on Mon, 27 July 2015 at 11:28 AM

Hi all,

The fix for this is now live. Please do let us know if you're seeing anything unusual with the ActionScript SDK, but at this time it should all be working well.

Thanks,

Brendan

10 |1200

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

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.