aws-samples / aws-samples/aws-sdk-unity-samples

S3 demo does not work on Android?

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
163
Forks
107
PR merge metrics
No merged PRs in 30d

Description

The S3 demo seems to work fine in the editor but when I run it on Android I get exceptions all over the place. For instance, when I hit the ListObjects button, I get these (maybe to get this running on Android it needs some Manifest settings??) (using Unity 5 here)

I/Unity (25194):
I/Unity (25194): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25194):
I/Unity (25194): NullReferenceException: Object reference not set to an instance of an object
I/Unity (25194): at Amazon.Util.CryptoUtilFactory+CryptoUtil.ComputeSHA256Hash (System.Byte[] data) [0x00000] in :0
I/Unity (25194): at Amazon.Runtime.Internal.Auth.AWS4Signer.SetRequestBodyHash (IRequest request) [0x00000] in :0
I/Unity (25194): at Amazon.Runtime.Internal.Auth.AWS4Signer.SignRequest (IRequest request, Amazon.Runtime.ClientConfig clientConfig, Amazon.Runtime.Internal.Util.RequestMetrics metrics, System.String awsAccessKeyId, System.String awsSecretAccessKey) [0x00000] in :0
I/Unity (25194): at Amazon.S3.Internal.S3Signer.Sign (IRequest request, Amazon.Runtime.ClientConfig clientConfig, Amazon.Runtime.Internal.Util.RequestMetrics metrics, System.String awsAccessKeyId, System.String awsSecretAccessKey) [0x00000] in :0
I/Unity (25194): at Amazon.Runtime.Internal.Signer.SignRequest (IRequestContext requestContext) [0x00000] in :0
I/Unity (25194): at Amazon.Runtime.Internal.Signer.PreInvoke (IExecutionContext execut
E/Unity (25194): An exception of type NullReferenceException was thrown from InvokeAsyncCallback().
E/Unity (25194):
E/Unity (25194): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

---

I/Unity (25194): Object reference not set to an instance of an object
I/Unity (25194):
I/Unity (25194): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
I/Unity (25194):
I/Unity (25194): NullReferenceException: Object reference not set to an instance of an object
I/Unity (25194): at AWSSDK.Examples.S3Example.m__8 (Amazon.Runtime.AmazonServiceResult`2 responseObject) [0x00000] in :0
I/Unity (25194): at Amazon.S3.AmazonS3Client+c__AnonStorey6D.<>m__76 (Amazon.Runtime.AmazonWebServiceRequest req, Amazon.Runtime.AmazonWebServiceResponse res, System.Exception ex, Amazon.Runtime.AsyncOptions ao) [0x00000] in :0
I/Unity (25194): at Amazon.Runtime.Internal.UnityMainThreadDispatcher.ProcessRequests () [0x00000] in :0
I/Unity (25194): UnityEngine.Debug:Internal_LogException(Exception, Object)
I/Unity (25194): UnityEngine.Debug:LogException(Exception)
I/Unity (25194): Amazon.Runtime.Internal.Util.UnityDebugLogger:Error(Exception, String, Object[])
I/Unity (25194): Amazon.Runtime.Internal.Util.Logger:Error(Exception, String, Object[])
I/Unity (25194): Amazon.Runtime.Internal.UnityMainThreadDispatcher:ProcessRequests()
I/Unity (25194):
I/Unity (25194): (Filename: Line: -1)
I/Unity (25194):
E/Unity (25194): An unhandled exception was thrown from the callback method Amazon.S3.Model.ListObjectsRequest.
E/Unity (25194):
E/Unity (25194): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
E/Unity (25194):

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.