composer: Failed to decode response: zlib_decode(): data error
Don’t know why but I have an issue here on updating/installing etc…
I know there is a very long discussion on the topic #4121 and an article over here but none of these recommendations helped.
The actual very weird thing is: On friday everything worked still fine.
Getting the same issue on different machines (linux/windows) and on our ci-server
local:
$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
zlib_decode(): data error
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Jenkins:
vendors:
[exec] Loading composer repositories with package information
[exec] Updating dependencies (including require-dev)
[exec] Failed to decode response: zlib_decode(): data error
[exec] Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[exec] zlib_decode(): data error
[exec] http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
[exec] Nothing to install or update
[exec] Writing lock file
[exec] Generating autoload files
I don’t have any idea whats wrong 😦
EDIT:
$ php composer.phar diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Why is diagnose not testing for the zlib_decode functionality?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Composer zlib_decode error fix. https://github.com/composer/composer/issues/4892 — committed to faithpromise/faithpromise.org by bradroberts 8 years ago
Yep issue resolved due to this solution:
Perhaps this can find it way to the troubleshooting article as possible workaround. https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode
Or as an additional suggestion: Add some kind of “prefer https” and/or “accept only https” option.
Just run this command. composer clear-cache Now, you can composer install package or update . It’s working for me