VMware Aria Automation Tools

 View Only

 java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor [AA 8.16]

Jump to  Best Answer
Andrew Nagy's profile image
Andrew Nagy posted Sep 17, 2024 11:48 AM

When trying to import a ZIP file for a Python ABX action from another developer I get the following error in a red banner at the top of the page:

java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor

Steps to re-create:

  1. Create new ABX.
  2. Accept default of Python 3.10.
  3. Change "Write script" to "Import package".
  4. Select and open ZIP file.
  5. Change 'Main function' to 'handler'.
  6. Change 'FaaS provider' to 'On Prem'.
  7. Click SAVE.

I did some research and found this article on StackOverflow which suggests some sort of incompatibility between the ZIP file and Java (and is not an Android specific issue):

Android ZipInputStream: only DEFLATED entries can have EXT descriptor

Other research also corroborates the incompatibility between the ZIP file and Java. I am reasonably sure that this should work as there is already an ABX action for the same thing already working in the same instance of AA. I'm just creating a new test version using the same source ZIP file.

Has anyone encountered this problem or have any suggestions?

Thanks in advance.

Andrew Nagy's profile image
Andrew Nagy  Best Answer

Found the solution using 7Zip:

  1. I'm using Windows so I used the File Explorer "Extract All ..." to a temp folder.
  2. In the folder with the extracted files I selected all files, e.g. <Ctrl-A>
  3. I right-clicked all files using 7Zip and selected "Add to archive ...".
  4. Select a destination for the output ZIP file outside of the folder containing all files.
  5. Make sure that 'Compression level' is set to '5 - Normal' and 'Compression method' is set to 'Deflate'. Leave all other values as default.
  6. Click OK.
  7. Import new file into AA Actions.

Unrelated to the original symptom I found out through trial and error that the original ZIP file had all of the Python code and binaries in a sub-folder. The article below confirms my observation that the files need to be in the root of the ZIP file. The other change I made was to update the value in 'Main function' on the ABX edit page to 'main.handler' because the 'handler' function was in the Python script 'main.py' in the root of  the ZIP file.

Create a ZIP package for Python runtime extensibility actions
https://docs.vmware.com/en/VMware-Aria-Automation/8.16/Using-Automation-Assembler/GUID-CC6DEEF1-49E8-4881-82A6-FA10DC0135E8.html