简体   繁体   中英

Facebook App using Flash AS3 URLRequest sporatically returns IOErrorEvent s

I've got a Flash-based Facebook App running in an iFrame that makes regular URLRequest.load() calls to the server in order to set and get information about user game play.

For most users, this works fine and as intended. The problem is that various users receive this error at random times and on random browsers [ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032]

This is hard to recreate on my end and the few times that I have recreated the event, I've checked the Net request using FireBug and found that it never closed and never received a response.

Refreshing and following the same action again does not recreate the error.

Graph API requests will send HTTP 400 response on error which result in the IOErrorEvent. Unfortunately Flash seems to throw the contents of this error away, but if you could log the URI that caused the event and then fire it off via curl, etc. that should help you track down what could be causing it.

If I were to take a guess, I'd go with your user's access token may have expired. Check out: http://developers.facebook.com/blog/post/500

The best bet would be to handle the failure gracefully (like re-request the the url) and log as much about the error as possible so that you can provide a more detailed description in the future.

This could be due to a timeout and should be handled like so:

myurlloader.addEventListener(IOErrorEvent.IO_ERROR, _handleError);

function handleError(e:IOErrorEvent):void
{
    // code to handle connection timeout
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM