-
Notifications
You must be signed in to change notification settings - Fork 9
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
Download issue....PCLZIP_ERR_BAD_FORMAT #35
Comments
Is it a private repo? If so, is a username and password set in the URL, and does the username/password you're using have access? If your username is an email, you may have to use Do you have a sample repo that could be used for testing? |
Hi Paul, Thanks for getting back to me. Yes, this is a private repo, so for the sake of security, I've created a fresh new bitbucket account, and added in a fresh dummy plugin repository with the exact same conditions. U: bavtest bitbucket.org/bavtest/test-plugin These are the actions I've taken:
At this point, this is what I assume to be the latest version of the plugin, that I wish to auto update from.
You can download this very version from the downloads tab: You should be able to unzip this v0.1 plugin to your plugins folder, and test it from there. At this point, I was hoping it would just download the new v2.0 zip from the master branch (as it certainly seems to do from the code), but for some reason I just can't get past the bad_zip error. I was thinking it could be that BitBucket is sending an archive format that the pclzip library can't decode, but that wouldn't explain why it works for everyone else? Another issue could be that I'm running locally on windows, however I get the same issue when running online on a linux server. Currently right now, the 'Test Plugin' is not showing up with an update message, so I haven't even been able to see if it works, however with my actual plugin that I'm testing with, it seemed to sporadically appear after a while, so I'm expecting it to in a short while. I've tried forcing the 'check updates' but that doesn't seem to fix my issue. I massively appreciate any time you can spend on figuring out what's happening here, please do ask if you need any more info from me. Thanks, |
I can confirm that the plugin is now detecting that there is an update,and returning the same original bad zip error, so you should e able to see what's wrong in this one. Thanks again! |
Did you ever figure out what was wrong? I'm seeing the same issue. |
No, it's still on my list of things to figure out but just lower priority. It's good to see it wasn't the only one getting the error though! |
Ok great! Yeah, I may be able to help out too. I haven't had a chance to really look at how the code is working, and what the root cause of the problem is. I feel like the basic authentication ( |
It seems that Bitbucket does not allow the "public" downloading of private repos. https://bitbucket.org/site/master/issue/1087/private-repository-public-downloads-bb-733 |
I was in error above. This does work in Bitbucket. You must have the URI in the format |
FYI, I've managed to get this working in https://github.com/afragen/github-updater |
Hi,
I seem to have a working version of the updater and am using it to auto download an update from a private repository on BitBucket.
The error the Wordpress updater gives is:
Downloading update from https://bitbucket.org/username/product-name/get/master.zip…
Unpacking the update…
The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature.
I'm struggling to see what the issue is now. It's happening on localhost and on my development server.
I've used the method described to integrate within a plugin. Copied the 'git-plugin-updates' to the root of my plugin folder. And added:
To initiate actions:
add_action( 'plugins_loaded', array($this, 'myplugin_git_updater' ));
add_filter( 'gpu_use_plugin_uri_header', '__return_true' );
The method:
public function myplugin_git_updater() {
if ( is_admin() && !class_exists( 'GPU_Controller' ) ) {
require_once dirname( FILE ) . '/git-plugin-updates/git-plugin-updates.php';
add_action( 'plugins_loaded', 'GPU_Controller::get_instance', 20 );
}
}
It may be worth noting that I've also added an action that I think turns off ssl verification:
add_action('http_request_args', array($this, 'no_ssl_http_request_args' ), 10, 2);
public function no_ssl_http_request_args($args, $url) {
$args['sslverify'] = false;
return $args;
}
Without this, I get this issue:
Downloading update from https://bitbucket.org/username/product-name/get/master.zip…
Download failed. SSL certificate problem: unable to get local issuer certificate
My main issue is the bad zip issue, the internet seems to think it's lack of space, an incorrect http.php file, that's all though, and I'm not sure why I can't find a solution for this?
Really hope you can help,
Thanks,
Bav
The text was updated successfully, but these errors were encountered: