kpfaulkner / azurecopy

copy blobs between azure, s3 and local storage
Apache License 2.0
36 stars 13 forks source link

System.FormatException: Invalid length for a Base-64 char array or string. #27

Open phnxfire opened 7 years ago

phnxfire commented 7 years ago

I'm trying to perform a copy form AWS S3 to Azure of a simple test.txt file

azurecopy -i https://se.amazonaws.com/ -o https://.blob.core.windows.net/ -azurekey %AzureAccountKey% -s3k %AWSAccessKeyID% -s3sk %AWSSecretAccessKeyID% -blobcopy -db

... and I'm getting error :

GetHandler start GetHandler retrieved azurecopy.S3Handler GetHandler start Unknown error generated. Please report to Github page https://github.com/kpfaulkner/azurecopy/issues . Can view underlyin race by adding -db flag. System.FormatException: Invalid length for a Base-64 char array or string. at System.Convert.FromBase64_Decode(Char startInputPtr, Int32 inputLength, Byte startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials.UpdateKey(String keyValue, String keyName)

kpfaulkner commented 7 years ago

Hi

What version of azurecopy are you using? Also, can I get the full stack trace please?

Thanks

Ken

kpfaulkner commented 7 years ago

Hi

Just to clarify, in the real command you execute the S3 and Azure URLs are correct, yes?

Thanks

Ken

On 8 Jun 2017, at 07:46, fabianoamorim notifications@github.com wrote:

I'm trying to perform a copy form AWS S3 to Azure of a simple test.txt file

azurecopy -i https://se.amazonaws.com/ -o https://.blob.core.windows.net/ -azurekey %AzureAccountKey% -s3k %AWSAccessKeyID% -s3sk %AWSSecretAccessKeyID% -blobcopy -db

... and I'm getting error :

GetHandler start GetHandler retrieved azurecopy.S3Handler GetHandler start Unknown error generated. Please report to Github page https://github.com/kpfaulkner/azurecopy/issues . Can view underlyin race by adding -db flag. System.FormatException: Invalid length for a Base-64 char array or string. at System.Convert.FromBase64_Decode(Char startInputPtr, Int32 inputLength, Byte startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials.UpdateKey(String keyValue, String keyName)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

phnxfire commented 7 years ago

I'm using version 1.3.1.

I believe I'm using the correct URLs. I tried the 'list' command for the S3 and it worked! (It brought a list of the contents of the S3 bucket).

I'm not sure about the correct parameter for 'AzureAccountKey', when I go to Azure console I cannot find a property with this exact name.

phnxfire commented 7 years ago

I tried to perform the 'list' command on the azure storage and I get similar error:

C:>azurecopy -list https://.blob.core.windows.net/ -azurekey %AzureAccountKey% -s3k %AWSAccessKeyID% -s3sk %AWSSecretAccessKeyID% -db GetHandler start Unknown error generated. Please report to Github page https://github.com/kpfaulkner/azurecopy/issues . Can view underlying stackt race by adding -db flag. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. at System.Convert.FromBase64_Decode(Char startInputPtr, Int32 inputLength, Byte startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials.UpdateKey(String keyValue, String keyName) at azurecopy.Utils.AzureHelper.GetCloudStorageAccount(String url, String accountKey, String accountName) at azurecopy.Utils.AzureHelper.GetCloudBlobClient(String url, Boolean isSrc, String accountKey) at azurecopy.AzureHandler..ctor(String url) at azurecopycommand.Program.GetHandler(UrlType urlType, String url) at azurecopycommand.Program.DoList(Boolean debugMode) at azurecopycommand.Program.Main(String[] args) at System.Convert.FromBase64_Decode(Char startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)

phnxfire commented 7 years ago

I'm sorry but the correct version I'm using of ## azurecopy is version 1.4.3.0

Asfawh commented 5 years ago

I have same issue when i use PowerShell and currently am using Version azurecopy-1.5.1, Error: System.FormatException: The input is not a valid Base-64 string as it con tains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters But, it works fine when i use command prompt.

kpfaulkner commented 5 years ago

Thanks for the update.

/me puts it on his todo list :)