composer-wp-pro-plugins
composer-wp-pro-plugins copied to clipboard
Failed to execute (9) unzip -qq -o 'web/app/plugins/wp-all-import-pro// ...
Hey all,
Trying to use the all import/export pro plugin part of this.
Seems that I am getting a similar error as the issues referenced below (and commented in issue 18): https://github.com/junaidbhura/composer-wp-pro-plugins/issues/18 https://github.com/junaidbhura/composer-wp-pro-plugins/issues/14 https://github.com/junaidbhura/composer-wp-pro-plugins/issues/1
Screenshots of my error:
Text version:
[RuntimeException]
Failed to execute (9) unzip -qq -o 'web/app/plugins/wp-all-import-pro//7d7969993593a13942741e4a52c3e8
29' -d '/Users/jesstucker/Code/redacted/site/vendor/composer/b8cc9703'
[web/app/plugins/wp-all-import-pro//7d7969993593a13942741e4a52c3e829]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of web/app/plugins/wp-all-import-pro//7d7969993593a13942
741e4a52c3e829 or
web/app/plugins/wp-all-import-pro//7d7969993593a13942741e4a52c3e829.zip, and cannot find web/
app/plugins/wp-all-import-pro//7d7969993593a13942741e4a52c3e829.ZIP, period.
I noticed that some previous fixes had occurred on Installer.php
but I must be honest in admitting I am terribly new to composer / wp / etc... and not really sure where / what to inspect to catch the error.
@junaidbhura asked me to post my versions in the prior post; here they are again:
composer.json
:
...
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-import-pro",
"version": "4.6.5",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
},
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-export-pro",
"version": "1.6.4",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
}
...
"require": {
...
"junaidbhura/wp-all-import-pro": "*",
"junaidbhura/wp-all-export-pro": "*"
},
Perhaps I will also add that I am using Bedrock / Roots / Trellis / Sage 10 Also my assumption is that I am using the 1.2.0 version of this plugin (composer-wp-pro-plugins)
Love what you're doing, managing these paid plugins is a headache!
Sincerely, Jess
Also, just tried mimicking the api call to the WP All Import Api using postman,
I'm getting presumably desired results from postman – at least a download_link
property. But not in the WpAiPro.php
plugin – it returns a similar json object, without a download_link
value.

Whereas the plugin returns:
Hey @jesstucker thanks for creating this issue, and I'm glad you find this plugin useful! :)
A few things to test:
- Are you sure you have the correct values in the
.env
file? - Try deleting the
vendor
directory, the WP All Import / Export plugins from thewp-content/plugins
directory andcomposer.lock
file and runningcomposer install
again - In Postman - Can you click the
download_link
to see if you actually get a ZIP file?
I've faced issues with WP All Import / Export before - its really fussy
Hey @junaidbhura,
- I believe the values are correct in the
.env
file. Here is a var_dump of the params seemingly sent to the wpallimport api:
{
["edd_action"]=>
string(11) "get_version"
["license"]=>
string(32) "(redacted: but matches license)"
["item_name"]=>
string(13) "WP All Import"
["url"]=>
string(161) "https://www.wpallimport.com/index.php?eddfile=<redacted>&ttl=<redacted>&file=<redacted>&token=<redacted>"
["version"]=>
string(5) "4.6.5"
}
When I send these same values in postman, I do seem to get a download_link
value.
-
Just tried deleting
vendor
,site/web/app/plugins
(note this is a little different in wp sage), andcomposer.lock
. Rancomposer install
and still getting that error. -
Yes, the postman response
download_link
downloads a zip file containing the expected contents.
I discovered that if I modify the site/vendor/junaidbhura/composer-wp-pro-plugins/plugins/WpAiPro.php
file to omit the version
param, it seems to download properly:
$response = json_decode( $http->post( 'https://www.wpallimport.com', array(
'edd_action' => 'get_version',
'license' => $license,
'item_name' => $name,
'url' => $url,
'version' => $this->version, # <---- removing this seems to successfully download/unzip
) ), true );
Also, this is a little crazy making, but I just reprovisioned a local environment, and it seems to work, which I cannot make any sense of!
Hey @jesstucker hmm that is really weird. If reprovisioning a local environment works, then there must be some obscure configuration in your existing environment that must be preventing it from working.
I can confirm that the exact same versions of All Import and Export work for me - both locally on a Mac and in an Ubuntu CI environment
Can you run composer clear-cache
before running composer install
? What version of Composer do you use?
Hey @junaidbhura,
Just ran composer clear-cache
and composer install
, same behavior. I'm using Composer version 1.10.10
. Started using v.2 but was having problems.
I can't for the life of me understand why removing the versions
param would allow the plugin to download?
I suppose if it comes down to it, maybe I can fork your repo and modify, I do sincerely appreciate your work!!!
Thanks, Jess
@jesstucker Do you use https://github.com/hirak/prestissimo ? This plugin is incompatible with it
@junaidbhura,
Just checked the dependencies, and don't see any use of prestissimo. I did try updating to composer v2 and was having the same zip download error.
Just as a test I tried overwriting this line with a hardcoded url download link (available on wp-all-import site: https://www.wpallimport.com/checkout/purchase-confirmation/?payment_key=REDACTED) that follows this link formatting:
https://www.wpallimport.com/index.php?
eddfile={redacted}&
ttl={redacted}&
file={redacted}&token={redacted}
And was able to successfully download and install the packages.
So then I tried a hybrid approach of your repo and ffraenz/private-composer-installer
, this seemed to work. See composer.json
example:
#composer.json
...
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-import-pro",
"version": "4.6.5",
"type": "wordpress-muplugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com/index.php?eddfile={redacted}&ttl={redacted}&file={redacted}&token={redacted}"
},
"require": {
"composer/installers": "^1.4",
"ffraenz/private-composer-installer": "^5.0"
}
}
},
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-export-pro",
"version": "1.6.4",
"type": "wordpress-muplugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com/index.php?eddfile={redacted}&ttl={redacted}&file={redacted}&token={redacted}"
},
"require": {
"composer/installers": "^1.4",
"ffraenz/private-composer-installer": "^5.0"
}
}
}
],
...
"require": {
"junaidbhura/wp-all-import-pro": "*",
"junaidbhura/wp-all-export-pro": "*"
},
...
Still not really sure of anything 😅
Thanks!
I've been facing a similar issue too.
At first I thought the problem was caused by the fact that zip was named tmp-somehash.ZIP
with uppercase and as I'm using Ubuntu, the OS is case sensitive.
But then I tried to replicate the problem to give you more information about it but I was able to run composer install
without any troubles.
Between my first and second try, I modified the permissions of my directories by running some sudo chmod 775 path/to/directory -R
inside the project.
So, I don't know what you can do with those information, hope it'll help.
So I'm trying to achieve the same with Composer 2 and Sage 9, but how can I get this registered_url_for_wpae_pro
?
I purchased WP All Export Pro and need to add it to my composer, just like I did with my GravityForms plugins.
I tried with this url as the WP_ALL_EXPORT_PRO_URL:
https://www.wpallimport.com/index.php?eddfile=<somestring>&ttl=<somenumber>&file=<number>&token=<somerandomstring>
But it's not working, getting this error:
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 1 removal
- Downloading junaidbhura/wp-all-export-pro (1.6.5)
- Downloading junaidbhura/wpae-user-add-on (1.0.4)
- Removing junaidbhura/wpai-user-add-on (1.0.4)
Deleting web/app/plugins/wpai-user-add-on/ - deleted
- Installing junaidbhura/wp-all-export-pro (1.6.5): Extracting archive
- Installing junaidbhura/wpae-user-add-on (1.0.4): Extracting archive
0/2 [>---------------------------] 0% Install of junaidbhura/wp-all-export-pro failed
Install of junaidbhura/wpae-user-add-on failed
2/2 [============================] 100%
[RuntimeException]
Failed to extract junaidbhura/wp-all-export-pro: (9) unzip -qq -o '/path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314' -d '/path/to/project/site/vendor/composer/af2697f1'
[/path/to/project/site/vendor/composer/tmp-9951e9fc7fe
d9695e45bb6396442b314]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314 or
/path/to/project/site/vendor/composer/tmp-9951
e9fc7fed9695e45bb6396442b314.zip, and cannot find /path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314.ZIP, period.
Any idea where to get this magical url? Thanks!
So I'm trying to achieve the same with Composer 2 and Sage 9, but how can I get this
registered_url_for_wpae_pro
? I purchased WP All Export Pro and need to add it to my composer, just like I did with my GravityForms plugins.I tried with this url as the WP_ALL_EXPORT_PRO_URL:
https://www.wpallimport.com/index.php?eddfile=<somestring>&ttl=<somenumber>&file=<number>&token=<somerandomstring>
But it's not working, getting this error:
Installing dependencies from lock file (including require-dev) Package operations: 2 installs, 0 updates, 1 removal - Downloading junaidbhura/wp-all-export-pro (1.6.5) - Downloading junaidbhura/wpae-user-add-on (1.0.4) - Removing junaidbhura/wpai-user-add-on (1.0.4) Deleting web/app/plugins/wpai-user-add-on/ - deleted - Installing junaidbhura/wp-all-export-pro (1.6.5): Extracting archive - Installing junaidbhura/wpae-user-add-on (1.0.4): Extracting archive 0/2 [>---------------------------] 0% Install of junaidbhura/wp-all-export-pro failed Install of junaidbhura/wpae-user-add-on failed 2/2 [============================] 100% [RuntimeException] Failed to extract junaidbhura/wp-all-export-pro: (9) unzip -qq -o '/path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314' -d '/path/to/project/site/vendor/composer/af2697f1' [/path/to/project/site/vendor/composer/tmp-9951e9fc7fe d9695e45bb6396442b314] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314 or /path/to/project/site/vendor/composer/tmp-9951 e9fc7fed9695e45bb6396442b314.zip, and cannot find /path/to/project/site/vendor/composer/tmp-9951e9fc7fed9695e45bb6396442b314.ZIP, period.
Any idea where to get this magical url? Thanks!
Hey what's up @Twansparant,
I got this URL by logging into my All Import Pro account (customer portal), and finding the "special" url available for download:
Hi @jesstucker, thanks for your reply!
I did try that url already by setting it as the WP_ALL_EXPORT_PRO_URL
env variable, but that resulted in the error above.
Hello everyone, are you sure you're not using Prestissimo? https://github.com/hirak/prestissimo . Its a global package, so it won't show up in your composer.json
file
Just in case, you can try removing it by running: composer global remove hirak/prestissimo
Yes, in my case 100% sure since I had the same problems with gravityforms packages.
WP_ALL_EXPORT_PRO_KEY='{redacted}'
WP_ALL_EXPORT_PRO_URL='https://www.wpallimport.com/checkout/purchase-confirmation/?payment_key={redacted}'
In my composer.json repositories
:
{
"type": "package",
"package": {
"name": "junaidbhura/gravityforms",
"version": "2.5.5",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.gravityforms.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
},
{
"type": "package",
"package": {
"name": "junaidbhura/gravityformsmailchimp",
"version": "4.9",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.gravityforms.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
},
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-export-pro",
"version": "1.6.5",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
},
{
"type": "package",
"package": {
"name": "junaidbhura/wpae-user-add-on-pro",
"version": "1.0.4",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
}
And in my require
:
"require": {
"php": ">=7.1",
"composer/installers": "^1.9",
"vlucas/phpdotenv": "^4.1",
"oscarotero/env": "^2.1",
"junaidbhura/wp-all-export-pro": "*",
"junaidbhura/wpae-user-add-on-pro": "*",
"junaidbhura/gravityforms": "*",
"junaidbhura/gravityformsmailchimp": "*"
}
When I run rm -rf vendor && rm -rf composer.lock && composer clear-cache && composer install
, I get this error:
Installing dependencies from lock file (including require-dev)
Package operations: 30 installs, 0 updates, 0 removals
- Downloading symfony/polyfill-ctype (v1.23.0)
- Downloading phpoption/phpoption (1.7.5)
- Downloading vlucas/phpdotenv (v4.2.0)
- Installing symfony/polyfill-ctype (v1.23.0): Extracting archive
- Installing phpoption/phpoption (1.7.5): Extracting archive
- Installing vlucas/phpdotenv (v4.2.0): Extracting archive
- Downloading ffraenz/private-composer-installer (v5.0.1)
- Installing ffraenz/private-composer-installer (v5.0.1): Extracting archive
- Downloading junaidbhura/composer-wp-pro-plugins (1.2.0)
- Installing junaidbhura/composer-wp-pro-plugins (1.2.0): Extracting archive
- Downloading composer/installers (v1.11.0)
- Downloading junaidbhura/gravityforms (2.5.5)
- Downloading junaidbhura/gravityformsmailchimp (4.9)
- Downloading junaidbhura/wp-all-export-pro (1.6.5)
- Downloading junaidbhura/wpae-user-add-on-pro (1.0.4)
- Downloading oscarotero/env (v2.1.0)
- Installing composer/installers (v1.11.0): Extracting archive
- Installing junaidbhura/gravityforms (2.5.5): Extracting archive
- Installing junaidbhura/gravityformsmailchimp (4.9): Extracting archive
- Installing junaidbhura/wp-all-export-pro (1.6.5): Extracting archive
- Installing junaidbhura/wpae-user-add-on-pro (1.0.4): Extracting archive
- Installing oscarotero/env (v2.1.0): Extracting archive
Install of junaidbhura/wp-all-export-pro failed
Install of junaidbhura/wpae-user-add-on-pro failed
11/11 [============================] 100%
[RuntimeException]
Failed to extract junaidbhura/wp-all-export-pro: (9) unzip -qq -o '/path/to/my/project/vendor/composer/tmp-984efec9b23b461d3b06190ff14bcd00' -d '/path/to/my/project/vendor/composer/d15eea56'
[/path/to/my/project/vendor/composer/tmp-984efec9b23b4
61d3b06190ff14bcd00]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /path/to/my/project/vendor/composer/tmp-984efec9b23b461d3b06190ff14bcd00 or
/path/to/my/project/vendor/composer/tmp-984efe
c9b23b461d3b06190ff14bcd00.zip, and cannot find /path/to/my/project/vendor/composer/tmp-984efec9b23b461d3b06190ff14bcd00.ZIP, period.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...
If I try and install the junaidbhura/wpai-acf-add-on
addon, it does install correctly?
Thanks, Toine
hey @Twansparant the WP_ALL_EXPORT_PRO_URL
is supposed to just be your site's URL. Ex: https://www.yoursite.com
Hi @junaidbhura, thanks for your reply! I just tried, but got the same error:
[RuntimeException]
Failed to extract junaidbhura/wp-all-export-pro: (9) unzip -qq -o '/path/to/my/project/vendor/composer/tmp-7e6750d4615d750484de93b33b7aa67c' -d '/path/to/my/project/vendor/composer/40f1397d'
Also I didn't have to register my domain anywhere when purchasing my license, so what is this url used for in the first place?
That URL is used to identify your site to WP All Export. It simulates when you update the plugin through the WP Admin. I don't think you have to register the URL anywhere.
Stupid question but, do you have a valid license key? Also can you try the license key without quotes in the .env file?
Ok check. Yes I have got a valid WP All Export Pro Unlimited License key. I tried without the quotes, same error. Are there different types of licenses? I only have the WP All Export license, not a WP All Import license? That shouldn't matter right?
Hmm this is weird. I've come across some weirdness with WP All Import / Export based on version numbers. Can you try a different version number like 1.6.4
. It should still give you the latest. That's the last thing I can think of.
I use this on a lot of websites, and it has been tested on Mac, Linux and Windows, and works fine!
Just tried it with setting the version as 1.6.4
but same thing...
Weird, it works with my gravityforms
plugins on several running projects, so I know your plugin works :)
I just purchased the whole suite incl. import pro add-ons, but the same error happens:
Failed to extract junaidbhura/wp-all-import-pro: (9) '/usr/bin/unzip' -qq '/path/to/my/project/mysite.com/site/vendor/composer/tmp-cc86a236ce6b42763ace23cf8d1f1a17' -d '/path/to/my/project/mysite.com/site/vendor/composer/ea9087ce'
Still not able to reproduce this? Thanks!
Hey @Twansparant a fix for WP All Import / Export add-ons was recently released. Are you using the latest version of this plugin? It looks like the issue may be different - but can you try to see if updating the plugin helps?
I already am using all the latest versions of the plugin and the add-ons.
I'm here to confirm the issue, I have the same behaviour than @jesstucker . When i remove 'version' or set another version like 4.4.4 i have the downlaod_link with the package v4.6.9.
I think the problem is WPAI side. :)
Hey @Twansparant I mean the latest version of THIS plugin? https://github.com/junaidbhura/composer-wp-pro-plugins/releases/tag/1.2.1
@vaandefanel What OS are you on? Are you also using the latest version of this plugin?
Hey @Twansparant I mean the latest version of THIS plugin? https://github.com/junaidbhura/composer-wp-pro-plugins/releases/tag/1.2.1
Ah sorry, yes also using latest version 1.2.1 of your plugin!
@junaidbhura I'm using version 1.2.1 on WSL Ubuntu on Windows. I confirmed the error with api call with Insomnia (postman alternative) on Windows. The WPAI licence is a Bundle Elite.
Getting the same error message as the OP here @junaidbhura, using composer-wp-pro-plugins 1.2.1 on Mac, also with the Bundle Elite WPAI license.
I made sure to try all of the above solutions. Only adding the full link in the url instead of https://www.wpallimport.com like shown in https://github.com/junaidbhura/composer-wp-pro-plugins/issues/27#issuecomment-788084552 works fine, even without requiring ffraenz/private-composer-installer, like so:
{
"type": "package",
"package": {
"name": "junaidbhura/wp-all-import-pro",
"version": "4.6.9",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.wpallimport.com"
},
"require": {
"junaidbhura/composer-wp-pro-plugins": "*"
}
}
}
The plugin folders seem to appear in the the plugins directory, but will disappear once the installer fails.
Thanks for the great work!
Hey @Twansparant I just re-read one of your earlier comments. WP All Import and Export use different keys. Are you sure you're using the right key for both of them? Edit: If you're using both All Import and Export, you need to add both keys:
WP_ALL_IMPORT_PRO_KEY="<wp_all_import_license_key>"
WP_ALL_IMPORT_PRO_URL="<registered_url_for_wpai_pro>"
WP_ALL_EXPORT_PRO_KEY="<wp_all_export_license_key>"
WP_ALL_EXPORT_PRO_URL="<registered_url_for_wpae_pro>"
@vaandefanel @jdraserschieb can you point me to the Bundle Elite license? I don't see it on their website?
Sorry for the confusion @junaidbhura, I remembered the name wrong, the license is called “Import + Export Pro Package”.
My config file looks like this:
ACF_PRO_KEY="<acf_pro_license_key>"
POLYLANG_PRO_KEY="<polylang_pro_license_key>"
POLYLANG_PRO_URL="localhost/"
WP_ALL_IMPORT_PRO_KEY="<wp_all_import_pro_license_key>"
WP_ALL_IMPORT_PRO_URL="localhost/"
WP_ALL_EXPORT_PRO_KEY="<wp_all_export_pro_license_key>"
WP_ALL_EXPORT_PRO_URL="localhost/"
ACF and Polylang work just fine with the localhost/
URL, but maybe this is different for WP All Import and Export?
Are you sure you're using the right key for both of them?
Yes I'm sure of that, I do have 2 separate license keys for both indeed. Thanks