Hi there!
I’m getting a null IGraphResult when making a Graph API call on my iOS 11 device.
The API Request works in the Graph API Tool and in the Unity editor, the error only occurs when built.
The API Query is like so
query: me?fields=id,first_name,age_range,gender,friends{id}&redirect=false
The log for the crash on xcode is as follows
FacebookAPI | ApiQuery ( query: me?fields=id,first_name,age_range,gender,friends{id}&redirect=false )
debugManager:logThis(String, logLevel, GameObject)
FacebookAPI:ApiQuery(String, Action`1)
FacebookAPI:FacebookPermissionsOk(String, String[])
FacebookAPI:FacebookMobileLogInResult(IResult)
Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult)
Facebook.Unity.CallbackManager:CallCallback(Object, IResult)
Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
FacebookAPI | PostLogIn postLogInActionType: logIn
debugManager:logThis(String, logLevel, GameObject)
FacebookAPI:PostLogIn()
Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult)
Facebook.Unity.CallbackManager:CallCallback(Object, IResult)
Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
2017-12-02 12:12:51.190699-0800 ios[31953:3976530] You are using download over http. Currently unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
2017-12-02 12:12:51.193128-0800 ios[31953:3977794] TIC Read Status [20:0x0]: 1:57
2017-12-02 12:12:51.193158-0800 ios[31953:3977794] TIC Read Status [20:0x0]: 1:57
2017-12-02 12:12:51.195518-0800 ios[31953:3976778] NSURLConnection finished with error - code -1002
FacebookAPI | MobileSdkResult ( result: )
debugManager:logThis(String, logLevel, GameObject)
FacebookAPI:ApiQueryMobileResult(IGraphResult)
Facebook.Unity.<Start>d__9:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at FacebookAPI.ApiQueryMobileResult (IGraphResult result) [0x00000] in <filename unknown>:0
at Facebook.Unity.AsyncRequestString+<Start>d__9.MoveNext () [0x00000] in <filename unknown>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0
(Filename: currently not available on il2cpp Line: -1)
FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at FacebookAPI.ApiQueryMobileResult (IGraphResult result) [0x00000] in <filename unknown>:0
at Facebook.Unity.AsyncRequestString+<Start>d__9.MoveNext () [0x00000] in <filename unknown>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0
UnityEngine.UnhandledExceptionHandler:PrintException(String, Exception)
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)
(Filename: currently not available on il2cpp Line: -1)
ios was compiled with optimization - stepping may behave oddly; variables may not be available.
Is anyone else encountering this? Any help is appreciated! Thanks for your time!