amazon-archives / aws-sdk-unity

ARCHIVED: The aws sdk for unity is now distributed as a part of aws sdk for dotnet:
https://github.com/aws/aws-sdk-net
Other
105 stars 43 forks source link

AmazonS3Client.PostObjectAsync will never return if the user has no internet connection #108

Closed designzoo-peter closed 8 years ago

designzoo-peter commented 8 years ago

Tested on iOS, and OSX Editor. The logs show that it recognises that the Status is 0 and it received an error response, but the callback never succeeds.

If no internet connection is available from the very start, then it is generating the signed policy for a request that falls over (it gets a response back then nothing happens with the PostAsync call that called for its generation).

If a signed policy already exists and a PostAsync call is made, then the UnityMainThreadDispatcher that fails to call the callback

The callstack is as follows:

recieved error response UnityEngine.Debug:Log(Object) Amazon.Runtime.Internal.Util.UnityDebugLogger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/_unity/UnityDebugLogger.cs:76) Amazon.Runtime.Internal.Util.Logger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/Logger.cs:189) Amazon.Runtime.Internal.Transform.UnityWebResponseData:.ctor(WWW) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Transform/_unity/UnityWebResponseData.cs:67) Amazon.Runtime.Internal.c__Iterator2:MoveNext() (at Assets/AWSSDK/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:133)

recieved = Couldn't resolve host 'cognito-identity.eu-west-1.amazonaws.com' UnityEngine.Debug:Log(Object) Amazon.Runtime.Internal.Util.UnityDebugLogger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/_unity/UnityDebugLogger.cs:76) Amazon.Runtime.Internal.Util.Logger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/Logger.cs:189) Amazon.Runtime.Internal.Transform.UnityWebResponseData:.ctor(WWW) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Transform/_unity/UnityWebResponseData.cs:68) Amazon.Runtime.Internal.c__Iterator2:MoveNext() (at Assets/AWSSDK/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:133)

Status = 0 UnityEngine.Debug:Log(Object) Amazon.Runtime.Internal.Util.UnityDebugLogger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/_unity/UnityDebugLogger.cs:76) Amazon.Runtime.Internal.Util.Logger:DebugFormat(String, Object[]) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Util/Logger.cs:189) Amazon.Runtime.Internal.Transform.UnityWebResponseData:.ctor(WWW) (at Assets/AWSSDK/src/Core/Amazon.Runtime/Internal/Transform/_unity/UnityWebResponseData.cs:114) Amazon.Runtime.Internal.c__Iterator2:MoveNext() (at Assets/AWSSDK/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:133)

Request metrics: {"properties":{"AsyncCall":"False","ServiceName":"Amazon.CognitoIdentity","ServiceEndpoint":"https://cognito-identity.eu-west-1.amazonaws.com/","MethodName":"GetCredentialsForIdentityRequest","RequestSize":"63"},"timings":{"HttpRequestTime":5441.373,"ClientExecuteTime":5458.702},"counters":{}}

And then no callback from the response to the AmazonServiceCallback delegate passed to PostObjectAsync

karthiksaligrama commented 8 years ago

also relate to #66 . I'm closing this issue and tracking the progress of the issue there as a general issue for internet connectivity