Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS DynamoDB not work on Android but work on Unity Editor #1440

Closed
asahimx opened this issue Oct 30, 2019 · 1 comment
Closed

AWS DynamoDB not work on Android but work on Unity Editor #1440

asahimx opened this issue Oct 30, 2019 · 1 comment
Labels
guidance Question that needs advice or information. Unity

Comments

@asahimx
Copy link

asahimx commented Oct 30, 2019

Expected Behavior

AWS DynamoDB SDK works on Unity

Current Behavior

I can save and get data to DynamoDB on Unity Editor .
When i build the app on Android device the LoadAsync and SaveAsync function is not run then i get this error on logcat:

ArgumentException: Object of type 'System.Object[]' cannot be converted to type 'UnityEngine.AndroidJavaObject[]'.

Then I do this thinks and try to build the app again

  • Upgrade the AWS SDK to last version : aws-sdk-unity_3.3.618.0
  • Upgrade the Unity to last version : 2019.2.10f1

The error is disappear on logcat, but the LoadAsync and SaveAsync function still not running , also the logcat not have any error.

Here is my code:

void Start()
    {
        
        UnityInitializer.AttachToGameObject(this.gameObject);
        AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest;
        var credentials = new CognitoAWSCredentials("ap-southeast-1XXXX", RegionEndpoint.APSoutheast1);
        AmazonDynamoDBClient client = new AmazonDynamoDBClient(credentials, RegionEndpoint.APSoutheast1);
        var Context = new DynamoDBContext(client);
        

        Context.LoadAsync<DynamoDB>("UserId", (AmazonDynamoDBResult<DynamoDB> result) => {
             myTextView.text = "get"; //work on Unity Editor not work on Android
        }, null);
    }

Possible Solution

same issue:
#1262

Your Environment

  • AWSSDK.Core version used: AWSSDK.DynamoDBv2.3.3.101.82 and AWSSDK.CognitoSync.3.3.100.91
  • Operating System and version: Android
  • Targeted .NET platform: 4.x
@klaytaybai klaytaybai added the guidance Question that needs advice or information. label Oct 30, 2019
@klaytaybai
Copy link
Contributor

Hi @asahimx, as noted in that issue you referenced, #1262, we are transitioning support of Unity from the aws-sdk-unity to our AWSSDK .NET Standard 2.0 dlls. Please try using those instead of the aws-sdk-unity package as we are not supporting fixes for this package anymore. Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information. Unity
Projects
None yet
Development

No branches or pull requests

2 participants