Package Manager: Could not connect to provider


After migrating my modx installation from one provider to another there are some errors popping up when navigating to the package manager.

[2019-04-16 13:14:54] (ERROR @ /storage/web/modx/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at:

Seems to be related to the system setting ‘locale’, see below.

Step to reproduce

Set the system setting ‘locale’ to the value ‘de_DE.UTF-8’. While the page output (including dates) should now be with german locale there are some errors when navigating to the package manager. Reset the system setting to an empty value and the errors are gone.

After some research I tried to add two new system settings ‘setlocale’ (true) and ‘setmgrlocale’ (false) which helps a little bit as sometimes the errors are gone, but sometimes they are there again.

Expected behavior

No errors while navigating to the package manager


MODX 2.71 with Apache and NGINX

Weird. Are there other errors? Can you connect to other providers?

No, there aren’t any other errors, even in the apache log.

And yes, there are two additional providers installed: und, both without any issue

Digging into it: I tried to output the rest response into the modx log, which should be correctly styled xml.
Seems to work up to this line (240) in modrestclient.class.php:

$this->xml = simplexml_load_string($this->response);

Any thoughts? I’ve also tried the below to get an idea whats failing here:

Returns: nothing (or empty array). But honestly I’m no php developer, so maybe I did something wrong.

Strange. Maybe to simple but you could run the setup of your current modx installation once again.

Seems that I have the same issue with 2.7.1. The setting Locale is emtpy. In the error log the following errors appear:
[2019-04-19 20:15:31] (ERROR in modRestCurlClient::__construct @ /home/[user]/public_html/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-04-19 20:15:31] (ERROR @ /home/[user]/public_html/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at:
[2019-04-19 20:15:31] (ERROR in modTransportProvider::find @ /home/[user]/public_html/core/model/modx/transport/modtransportprovider.class.php : 276) MODX krijgt geen response van de provider. Controleer de service URL en controleer of het de juiste provider is.

This started after an upgrade from 2.7.0 to 2.7.1.

1 Like