zimothy/gaf — Issue #10: Connections Timing Out
Author: rykardo
Created: 2011-12-19 00:13:55+00:00
State: open

When connecting to Facebook with the Unity WWW functions (inside Coroutines) a timeout will often be thrown. Also, sometimes the data (namely the Facebook picture data) is received but is mal-formated.

To resolve this I suggest wrapping the StartCoroutine() functions in an object that will restart the Coroutine if it times out. Once data is received the wrapper should validate the downloaded data, to ensure it is compatible with the requested data type. The wrapper object should always return null until the data is received and validated.

20 attempts using the CHQ-boardroom connection lead to:

01: Get player data from Facebook graph timed out.
02: No problems, loaded correctly.
04: Cross Domain Policy error occured.
04: Leaderboard pictures were corrupted (download stopped half way?)
09: Leaderboards timed out.