Facebook Wrap Wrap

I use the Facebook application to show statuses and images on Facebook from the Facebook page in my Windows 8 application, but every time I get an exception for the target call and although I have an attempt to catch, I don’t know how to get rid of this exception. An internal exception is the Wrap Exception Wrapper. Any ideas? Here is my call stack:

System.Reflection.TargetInvocationException was unhandled HResult=-2146232828 Message=An exception occurred during the operation, making the result invalid. Check InnerException for exception details. Source=System StackTrace: at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at Facebook.OpenReadCompletedEventArgs.get_Result() at Facebook.Client.FacebookSessionClient.<SendAnalytics>b__0(Object o, OpenReadCompletedEventArgs e) at Facebook.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args) at Facebook.HttpHelper.ResponseCallback(IAsyncResult asyncResult, Object userToken) at Facebook.HttpHelper.<>c__DisplayClass2.<OpenReadAsync>b__0(IAsyncResult ar) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.ContextAwareResult.CompleteCallback(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.HttpWebRequest.SetResponse(Exception E) at System.Net.HttpWebRequest.SetAndOrProcessResponse(Object responseOrException) at System.Net.ConnectionReturnResult.SetResponses(ConnectionReturnResult returnResult) at System.Net.Connection.CompleteConnectionWrapper(Object request, Object state) at System.Net.PooledStream.ConnectionCallback(Object owningObject, Exception e, Socket socket, IPAddress address) at System.Net.ServicePoint.ConnectSocketCallback(IAsyncResult asyncResult) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.Sockets.Socket.ConnectCallback() at System.Net.Sockets.Socket.RegisteredWaitCallback(Object state, Boolean timedOut) at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut) InnerException: Facebook.WebExceptionWrapper HResult=-2146233088 Message=Unable to connect to the remote server InnerException: System.Net.Sockets.SocketException HResult=-2147467259 Message=A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond 31.13.81.1:443 Source=System ErrorCode=10060 NativeErrorCode=10060 StackTrace: at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) InnerException: 
+1
source share
2 answers

This is a known bug in Facebook.Client fixed in this revision in the GitHub repository:

https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/commit/93f4c6498f32792d52fdb46d80d0c68435744c47

To get rid of this error, create Facebook.Client from the most recent sources, and not download it through NuGet. You can also try contacting the guys at http://facebooksdk.net and asking them to update the Facebook.Client version of NuGet.

+1
source

The new nuget has been ported with a fix. Thanks.

+1
source

Source: https://habr.com/ru/post/1492354/


All Articles