Facebook 应用程序使用 Flash AS3 URLRequest 偶尔返回 IOErrorEvent
我有一个在 iFrame 中运行的基于 Flash 的 Facebook 应用程序,它定期对服务器进行 URLRequest .load() 调用,以便设置和获取有关用户游戏玩法的信息。
对于大多数用户来说,这可以正常工作并且符合预期。 问题在于,不同的用户在随机的时间和随机的浏览器上收到此错误 [ioErrorHandler:[IOErrorEvent type =“ioError” bubbles = false cancelable = false eventPhase = 2 text =“Error #2032]
这对我来说很难重新创建,并且我重新创建了该事件几次,我已经检查了使用 FireBug 的 Net 请求,发现它从未关闭且从未收到响应
刷新并再次执行相同的操作不会重新创建错误。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Graph API 请求将在出现错误时发送 HTTP 400 响应,从而导致 IOErrorEvent。不幸的是,Flash 似乎会丢弃此错误的内容,但如果您可以记录导致该事件的 URI,然后通过curl 等将其关闭,这应该可以帮助您追踪可能导致该事件的原因。
如果我猜测,我会认为您的用户的访问令牌可能已过期。查看:http://developers.facebook.com/blog/post/500
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
最好的办法是优雅地处理失败(例如重新请求 URL)并尽可能多地记录有关错误的信息,以便您将来可以提供更详细的描述。
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: