junaidbhura / composer-wp-pro-plugins

Composer installer for Pro WordPress plugins.
https://packagist.org/packages/junaidbhura/composer-wp-pro-plugins
MIT License
92 stars 28 forks source link

* is not a zip archive. #1

Closed davidwebca closed 4 years ago

davidwebca commented 6 years ago

Hi! Thanks for creating this plugin, this is exactly what I would need for Polylang pro. There seems to be a problem right now though and your repo seems pretty recent, so I thought I'd leave an issue either way.

I get this error when using "composer update" : 'web/app/mu-plugins/advanced-custom-fields-pro//77d11e6a97cd4d47687579fa4009c261' is not a zip archive.

It seems like there's a double "//" somewhere in your code so that the zip file isn't found... but I'm saying that without having taken the time to look at it properly.

Let me know if you know what this is about!

(Using Bedrocks as WP install)

junaidbhura commented 6 years ago

Hey @david-treblig !

I'm glad you find this plugin useful. From the look of it, it looks like the ACF archive isn't downloaded correctly.

Are you using the ACF plugin? If so, have you entered the correct key in the .env file?

You can just remove any of the Pro plugins you aren't using from your composer.json file and from the .env file.

This plugin has been tested on Mac, Windows and Linux - so I'm pretty sure it works well. So I'm hoping it's just a small thing like that.

davidwebca commented 6 years ago

Mmm I tried again today and it doesn't seems to work. I only added polylang pro and ACF pro, the only two I need, with the vcs repo at the top and added all the info necessary to my .env file. It seems to be loading everything correctly, but then tells me the zip file doesn't exist. I'm on a Mac btw. I've been using ACF pro installer for years, but I've been looking for an alternative since I'm a Polylang Pro user as well.

davidwebca commented 6 years ago

Got it! Same issue that was mentioned many times here : https://github.com/PhilippBaschke/acf-pro-installer/issues/19. Prestissimo is the culprit. You can look at the proposed PR here so that this plugin runs after Presstissimo https://github.com/PhilippBaschke/acf-pro-installer/pull/20/files.

junaidbhura commented 6 years ago

Thanks for pointing this out!

Let me take a deeper look into this and make sure I implement a solution which not only patches this problem, but also prevents further plugin conflicts.

kukac7 commented 5 years ago

I have the same problem with me as well. 😞

briankompanee commented 5 years ago

Just wanted to chime in here. I am having the same issue when trying to deploy my Trellis > Bedrock > Sage project on my server. Everything seems to work fine on my local dev.

Twansparant commented 4 years ago

Just wanted to chime in here. I am having the same issue when trying to deploy my Trellis > Bedrock > Sage project on my server. Everything seems to work fine on my local dev.

I had the same problem! Turns out that the first time you deploy with the new repositories set to junaidbhura, the GRAVITY_FORMS_KEY env variable is not present yet on the remote server causing this error. If you first deploy with only adding the GRAVITY_FORMS_KEY variable and then another deploy with the new repositories, it will succeed!

ghost commented 4 years ago

Hello,

I recently came across this very same issue. Upon running composer update the following occurs.

composer update
  - Installing junaidbhura/wp-all-import-pro (4.6.0): Downloading (100%)
    Failed to execute unzip -qq  'web/app/plugins/wp-all-import-pro//4ce805a82ed163a942c6ec4d180bf752' -d '/Users/me/CODE/bedrock/vendor/composer/4eb6aa74'

[web/app/plugins/wp-all-import-pro//4ce805a82ed163a942c6ec4d180bf752]
  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//4ce805a82ed163a942c6ec4d180bf752 or
        web/app/plugins/wp-all-import-pro//4ce805a82ed163a942c6ec4d180bf752.zip, and cannot find web/app/plugins/wp-all-import-pro//4ce805a82ed163a942c6ec4d180bf752.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

Double // 'web/app/plugins/wp-all-import-pro//4ce805a82ed163a942c6ec4d180bf752'

My .env file:

WP_ALL_IMPORT_PRO_KEY='....'
WP_ALL_EXPORT_PRO_KEY='....'
junaidbhura commented 4 years ago

@andrade1379 I've come across that issue with WP All Import / Export. They seem to have an issue with their configuration of Easy Digital Downloads. Try changing the version number to an earlier version number. It has helped me in the past.

stuartcusackie commented 4 years ago

Getting the same problems. This error shows for ACF but if I remove ACF then the same thing happens with GravityForms:

Failed to execute (9) unzip -qq 'web/app/plugins/advanced-custom-fields-
pro//1d1bc86472e4cec128ad875d79f5ce18' -d
'/srv/www/mysite.ie/releases/20200414131048/vendor/composer/361cce34'
[web/app/plugins/advanced-custom-fields-
pro//1d1bc86472e4cec128ad875d79f5ce18] 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.

I am also on the Roots framework and I've tried Twansparant's suggestion to deploy first before adding packages to composer, but it hasn't worked.

junaidbhura commented 4 years ago

@stuartcusackie Do you use Prestissimo? This plugin doesn't currently support Prestissimo

stuartcusackie commented 4 years ago

@stuartcusackie Do you use Prestissimo? This plugin doesn't currently support Prestissimo

Yes, it seems I am using Prestissimo. It's the first time I've heard of it but I can see it in my Roots Trellis packages.

It seems composer 2.0 will use an alternative method and Prestissimo will be obsolete. I will try your package again when that day comes.

Thanks for your help!

junaidbhura commented 4 years ago

Okay, great thank you @stuartcusackie !

Twansparant commented 4 years ago

I am also on the Roots framework and I've tried Twansparant's suggestion to deploy first before adding packages to composer, but it hasn't worked.

Sorry about that, you're right, it still does not work. I'm also using the Roots stack with Prestissimo so that's the reason it fails...

Twansparant commented 4 years ago

Do you use Prestissimo? This plugin doesn't currently support Prestissimo

So I thought this error was also related to Prestissimo because Trellis includes it here as a global package, but when I disable this line and re-provision my local and my remote server, it still happens.

When I ssh into my remote server and check for the global packages: composer global show -i Prestissimo is not in it? Could it be caused by something else?

Running composer update locally never has any problems, it only happens on remote servers.

junaidbhura commented 4 years ago

@Twansparant Do you use composer update or composer install on the remote server? You should ideally be using composer install on the remote server and composer update locally

Twansparant commented 4 years ago

Hi @junaidbhura, locally I always use composer update and on deploy composer install indeed: https://github.com/roots/trellis/blob/master/roles/deploy/hooks/build-after.yml#L28