Forum Cross Platform with Xamarin

AWS S3 System not implemented exception PCL.

Hello, can someone help me? How can I fix this error?

My StackTrace:

at Amazon.Util.Internal.PlatformServices.ApplicationSettings.GetValue (System.String key, Amazon.Util.Internal.PlatformServices.ApplicationSettingsMode mode) [0x00000] in :0

at Amazon.CognitoIdentity.CognitoAWSCredentials.GetCachedIdentityId () [0x00017] in :0
at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String accountId, System.String identityPoolId, System.String unAuthRoleArn, System.String authRoleArn, Amazon.CognitoIdentity.IAmazonCognitoIdentity cibClient, Amazon.SecurityToken.IAmazonSecurityTokenService stsClient) [0x0007b] in :0
at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String accountId, System.String identityPoolId, System.String unAuthRoleArn, System.String authRoleArn, Amazon.RegionEndpoint region) [0x0001e] in :0
at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String identityPoolId, Amazon.RegionEndpoint region) [0x00000] in :0
at DineConnect.PCL.S3Util+S3Utils.get_Credentials () [0x00016] in /Users/airat/Projects/DineConnect/DineConnect.PCL/Helpers/S3Util.cs:22
at DineConnect.PCL.S3Util+S3Utils.get_S3Client () [0x0000c] in /Users/airat/Projects/DineConnect/DineConnect.PCL/Helpers/S3Util.cs:34
at DineConnect.Droid.Upload+c__async1.MoveNext () [0x0004b] in /Users/airat/Projects/DineConnect/Droid/Activities/Upload.cs:86
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at Android.App.SyncContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3511/501e63ce/source/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:18
at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3511/501e63ce/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3511/501e63ce/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:0e4ff6e1-df32-44d0-81a1-351e1c711cad (intptr,intptr)

My code, where I catched this error.

`if (_file == null)
{
Toast.MakeText(this, "No file to upload", ToastLength.Short).Show();
return;
}

        var S3Client = S3Util.S3Utils.S3Client;
        try
        {
            await S3Client.PutObjectAsync(new PutObjectRequest()
            {
                BucketName = Constants.BUCKET_NAME.ToLowerInvariant(),
                FilePath = _file.AbsolutePath,
                Key = _file.Name
            });

            _file.Delete();
            Toast.MakeText(this, "File uploaded to S3 Bucket", ToastLength.Long).Show();

        }
        catch (AmazonS3Exception s3Exception)
        {
            Toast.MakeText(this, "Upload failed, check logs for more information", ToastLength.Long).Show();
            System.Console.WriteLine(s3Exception.StackTrace);
        }`

I read that I must add reference, but even I do it, error still remains.

There my packages for Android app

And this is my PCL part packages

I hope you will help to find solution against this problem.

Sign In or Register to comment.