Salesforce Workbench Zip deployment ‘No Package.xml Found’ error on Mac
I was trying to delete a trigger in salesforce production instance via workbench.
I basically followed the steps here:
- First create a package.xml with the trigger name.
- Retrieve the trigger zip folder from the workbench using the package.xml.
- Update the downloaded xml data file by changing Status from Active to Deleted.
- Zip the downloaded folder again and upload it to the workbench
However, the deployment failed with a ‘No Package.xml Found’ error. After some googling, I made sure the file structure was right and the the Single Package checkbox was selected. Still, same error showed up.
The Culprit
I use Mac!
When mac compressed the folder to a zip file, it created some extra hidden data files and folders. Salesforce Workbench does not like them and refused to recognize the package.xml file when they are around!
The Resolution
Remove those files! There are many ways to do that. What I did was using the Terminal command line. Cd-ed into the folder to be zipped, then
zip -r -X YourZipFileName.zip *
Bingo! Then you can upload the zip file to workbench and it accepts it!