Free Support Forum - aspose.cloud

Download API method of Aspose.Storage REST API throws error: 'The specified version does not exist'

The storage Api gives an error today, yesterday it run successfully.
Here is the log of events for an example of the failing operation, read from “My Usage”:

06/21/2017 7:54 AM Kundkartan storage Error: AmazonS3 exception: Error ‘The specified version does not exist.’, Bucket ‘afc-filestorage’, FilePath ‘22815/4ba8661a-fef2-42bc-8d25-b957894fde58/Output_66984e55.xlsx’. Method: Download the file… Parameters: path ‘Output_66984e55.xlsx’,versionId ‘null’,storage ‘’ 263,001.00 kb 77.40.239.170

06/21/2017 7:54 AM Kundkartan cells Success: Set cell value… name ‘Output_66984e55.xlsx’,sheetName ‘Hovedkategori’,cellName ‘P2’,value ‘06/21/2017 09:54:48’,type ‘datetime’,formula ‘’,folder ‘’ 263,393.00 kb 77.40.239.170

06/21/2017 7:54 AM Kundkartan cells Success: Import data (array) to workbook worksheet… name ‘Output_66984e55.xlsx’,folder ‘’ 6,546,930.00 kb 77.40.239.170

06/21/2017 7:54 AM Kundkartan storage Success: Upload the file… path ‘Output_66984e55.xlsx’,versionId ‘null’,storage ‘’ 30,787.00 kb 77.40.239.170

Hi,

Thank you for contacting support and sharing details.

We tested Aspose.Storage APIs but unable to produce The specified version does not exist error. APIs are working fine at our end. Would you please confirm whether you are still experiencing this error?

Yes, the error has been thrown all day.

The offending code on our side is this:

        String storage = null;
        return storageApi.GetDownload(fileName, "null", storage).ResponseStream;

As you see from the log, the upload, import data and set cell value operations are successful.

Dear Ola Noss,

You are receiving The specified version does not exist error because you are passing null as String value to version parameter.

return storageApi.GetDownload(fileName, “null”, storage).ResponseStream;

Instead, you should pass null object to version parameter. API call should be like following

return storageApi.GetDownload(fileName, null, storage).ResponseStream;

Thank you for your help, that solution works.
Funny that the string “null” has been working for months, and started giving error yesterday.

@olagutt1

Please note, in latest Aspose.Cells Cloud API we have introduced storage API methods within the API. Now, it does not need to use Aspose.Storage Cloud API anymore. Kindly check latest Aspose.Cells Cloud SDK for Java for more details and feel free to contact us for any further assistance in this regard.

//download the xlsx file
    result = api.downloadFile(remotefilePath, Storage_Name, null)