Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Failed #54

Closed
andreamaiolo opened this issue Jun 19, 2017 · 6 comments
Closed

Update Failed #54

andreamaiolo opened this issue Jun 19, 2017 · 6 comments

Comments

@andreamaiolo
Copy link

Hi,

I'm running WordPress on an Amazon Linux AMI. Your plugin worked great until two weeks ago, but now when I try to update a plugin, WordPress notify me with this message:

"Update Failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Invalid End of Central Dir Record size : 16".

I also forced to download the plugin and what I got is a corrupted zip file.
Any suggestion on how to solve this?

Many thanks,
Andrea

@YahnisElsts
Copy link
Owner

YahnisElsts commented Jun 19, 2017

This may sound obvious, but did you verify that the ZIP file that you uploaded to the packages directory is valid and not corrupted?

Also, is there anything special about the corrupted file? For example, is the size wrong (and if so, is it larger or smaller)? Have you tried looking at it with a hex editor? How about the HTTP headers from the download - anything wrong there? Did the download get interrupted after a certain time or after a specific number of bytes was transmitted?

Edit: Also, wp-update-server is not a plugin.

@andreamaiolo
Copy link
Author

Of course is not a plugin...sorry for the mistake.

The uploaded zip file is not corrupted. If I download it via ftp I'm able to unzip it. The problem is during the update process via WordPress. The client receive the corrupted zip file with the notification I mentioned in my previous message.
Both files (the corrupted and the original) are identical in size, but when I open them with the HexEditor I've noticed that there are some differences, but I don't know what can I do with this information.
Also the HTTP headers are valid.
If I use wp-update-server on a server different from the one I'm using, everything's working as usual.

@DanBruns
Copy link

Hi. I'm having a similar issue. I'm using WP 4.8 hosted at GoDaddy, trying to use plugin-update-checker-4.1. The zip file for my plugin/update appears to be OK - when I download it to my PC then upload it to my WP installation to install manually, it works just fine. But when I try to use the update link generated by the plugin-update-checker plugin, I get

Update Failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

Here's the link to the JSON meta file: http://talk-city.com/talkcity/talkcity-plugin-version.json

Any hints appreciated!

@YahnisElsts
Copy link
Owner

Both files (the corrupted and the original) are identical in size, but when I open them with the HexEditor I've noticed that there are some differences, but I don't know what can I do with this information.

Maybe I could take a look. Can you post the file or send it to me? My email is whiteshadow@w-shadow.com

@DanBruns: It looks like the download URL requires login. Does you plugin take care of that, e.g. by appending login credentials to the URL? If not, that would explain why updates don't work. WordPress can't download the update because it's not logged in.

@DanBruns
Copy link

Thanks @YahnisElsts for the quick response! That, of course, was the problem and I'm sorry to have wasted your time. Working now and I'm looking forward to getting it into production!

@andreamaiolo
Copy link
Author

I was using the wp-load.php file to access to WordPress functions to fetch some data related to the users. I deleted this file and I solved by using the REST APIs to access to WordPress data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants