Issue Bug Closed

#89188maybe ddev-related / Manage Language Packs: Uncaught TYPO3 Exception: gzdecode() expects parameter 1 to be string, boolean given

Jonas Eberle 09/17/19, 13:27 updated 12/17/19, 10:06

Description

When trying to open the Maintenance -> Manage Language Packs modal, the AJAX-request fails with

Uncaught TYPO3 Exception: gzdecode() expects parameter 1 to be string, boolean given | TypeError thrown in file /var/www/html/webroot/web/typo3/sysext/install/Classes/Service/LanguagePackService.php in line 177. Requested URL: https://xxxx.test/typo3/install.php?install[controller]=maintenance&install[context]=backend&install[action]=languagePacksGetData&_=1568718473579 

PHP 7.2.21, running with ddev. I have seen some other problems with downloading stuff from the core in ddev (e.g. when a 404-page is given), so maybe there is something going wrong with ddev and GuzzleHttp.

These are the code lines up to the exception:

    /**
     * Update main language pack download location if possible.
     * Store to registry to be used during language pack update
     *
     * @return string
     */
    public function updateMirrorBaseUrl(): string
    {
        $downloadBaseUrl = false;
        try {
            $xmlContent = GeneralUtility::getUrl('https://repositories.typo3.org/mirrors.xml.gz');
            $xmlContent = GeneralUtility::xml2array(@gzdecode($xmlContent));

-> $xmlContent is false here. I xdebugged into Guzzle and it is getting a timeout. I can download the file fine though from the web-containers PHP context.

The shown error message is not really helpful:

Something went wrong. Please use Check for broken extensions to see if a loaded extension breaks this part of the install tool and unload it.

The box below may additionally reveal further details on what went wrong depending on your debug settings. It may help to temporarily switch to debug mode using Settings > Configuration Presets > Debug settings.

I suggest to show the Guzzle exception. That would be cURL error 28: Connection timed out after 10001 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in my case.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.