question

aebike avatar image
0 Likes"
aebike asked ·

LMS Zip file in response is corrupt

I recently finished implementing the Large Merchant Services API and am using the downloadFile call to read Active Inventory Reports, and responses on bulk listing. My problem is that **sometimes** the ZIP file I get in the response cannot be decompressed. For example, I can run the script to download a new Active Inventory Reports file three times in a row, and two out of three times, the file will unzip just fine, and one out of three times it will fail. I have tried unzipping both in memory, programmatically, and saving the file to the drive and using an unzip utility. It just complains that the file is invalid. Due to the inconsistently this seems like something on eBay's end... is there anything special I need to know about the zip files that it sends?
lmsdownloadfilezip
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

aebike avatar image
0 Likes"
aebike answered ·
Solution found - the 'bad' files had \r\n characters in the middle of the binary blob. My parsing was splitting on \r\n and thus dropping those from the middle of the zip blob. Most files do not have that character in them, strangely.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

aebike avatar image
0 Likes"
aebike answered ·
I still find this happening, and it seems to come in clusters. I am providing a link to the full response from an ActiveInventoryReport downloadFile request [here][1]. This is the raw response content (in binary). To extract the zip file, I get rid of everything up until the 'PK' characters on line 12, and then also remove the last MIME boundary at the very end of the file. This works most of the time, but sometimes it does not. [Here][2] is an example of the file above after the lines have been parsed out. It should be a valid zip archive, but is corrupt. [1]: https://dl.dropboxusercontent.com/u/626153/ebay_zipfile-fullresponse.zip [2]: https://dl.dropboxusercontent.com/u/626153/ebay_zipfile-parsed.zip
· 8 · Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi, Can you give me sample JobID where the response was corrupted. We will take a look and let you know. Cheers!!!
0 Likes 0 ·
aebike avatar image aebike shulmani_developer.support ♦♦ ·
Sure, one from this morning: jobID: 5444655070 fileID: 5468571620
0 Likes 0 ·
I had been hoping that the problem might go away when I completed my Compatible Application Check, but I just did my first job after that check was approved and I'm getting the same problem: jobID 5444814250 fileID 5468758970
0 Likes 0 ·
In the initial message you said that you were seeing this issue with the Active Inventory report. But the JobID that you gave :5444814250 is for ReviseInventoryStatus. For the ActiveInventory report try getting only seven days data at a time instead of 30 days data and see if that improves the response. Cheers!!!
0 Likes 0 ·
aebike avatar image aebike shulmani_developer.support ♦♦ ·
Hi, a couple comments: 1) The errors occasionally occur on any call I make that involves downloading a file from LMS. ActiveInventoryReport, ReviseInventoryStatus, or AddFixedPriceItem. 2) I don't see a way to restrict data on the ActiveInventoryReport, since it lists all active listings. I think you are thinking of a different report? 3) Here are two ActiveInventoryReports I downloaded within an hour of each other. One failed to unzip, and one worked JobID: 5444815880, FileID: 5468760070 SUCCESS JobID: 5444840080, FileID: 5468787540 FAILURE Also posted these files http://goo.gl/RU1GLZ
0 Likes 0 ·
Sorry, I was thinking of something else. For the Job ID: 5444814250 , the response file looks just fine at our end. Even for the JobID:5444815880, it looks fine . Not sure why you are not able to extract the files. Can you try to download the files are sometime of the job getting completed and see if the files look all fine? Cheers!!
0 Likes 0 ·
Show more comments
aebike avatar image
0 Likes"
aebike answered ·
I have added this question, with more detail and including more sample files, on [StackOverflow][1] [1]: http://stackoverflow.com/questions/28729945/ebay-lms-zip-file-occasionally-corrupted
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kyfedere_0 avatar image
0 Likes"
kyfedere_0 answered ·
While using zip files it may become corrupt due virus infection, software conflict crc error and many more. I too had faced the same problem and my zip file got corrupted. I tried many ways to repair the zip file as it contained many important documents. At last I was able to **repair and extract zip file** with the help of **[Zip File Repair Tool][1]**. I was able to recover all the documents in it. Most importantly this software is very user friendly. [1]: http://zip.filerepairtool.net/blog/repair-broken-zip-file
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.