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

Fetching of update-information-XML fails (and does it silently) #200

Closed
te-online opened this issue Dec 4, 2015 · 2 comments
Closed

Fetching of update-information-XML fails (and does it silently) #200

te-online opened this issue Dec 4, 2015 · 2 comments

Comments

@te-online
Copy link
Contributor

Disclaimer: Since this issue seems to be in a file that we have in core, maybe I should open the issue in core? I don't know and would be greatful if you tell me! 😄

The problem with the particular ownCloud instance is, that I can't update it via the updater starting from the last update. I was able to track down the error to the call of the http-client-library / guzzlhttp.

This is the code in https://github.com/owncloud/core/blob/master/lib/private/updater.php#L166

//fetch xml data from updater
$url = $updaterUrl . '?version=' . $versionString;

$tmp = [];
$xml = $this->httpHelper->getUrlContent($url);
if ($xml) {
    $loadEntities = libxml_disable_entity_loader(true);
    $data = @simplexml_load_string($xml);
    libxml_disable_entity_loader($loadEntities);
    if ($data !== false) {
        $tmp['version'] = (string)$data->version;
        $tmp['versionstring'] = (string)$data->versionstring;
        $tmp['url'] = (string)$data->url;
        $tmp['web'] = (string)$data->web;
    }
} else {
    $data = [];
}

// Cache the result
$this->config->setAppValue('core', 'lastupdateResult', json_encode($data));
return $tmp;

I could check that the $url is put together right. I can call the endpoint with the produced URL and get the right answer (update to 8.2.1.4). But the $xml variable is just a false boolean after execution.

What can I do to fix this? Is it a known issue? Maybe an issue with the 3rdparty-library?
Thanks for any ideas. 😊


Steps to reproduce

  1. Permanent problem, no steps.

Expected behaviour

If updater app can't fetch update feed from https://updates.owncloud.com/server/ it won't show that owncloud is up-to-date. Maybe it will throw an error, but for sure it will log the problem.

Actual behaviour

Nothing happens. Updater says installation is up-to-date.

Server configuration

Operating system:
Linux "2.6.32-573.7.1.el6.x86_64" (CentOS, I suppose.)

Web server:
Apache

Database:
MySQL 5.0.11

PHP version:
5.6.15

ownCloud version: (see ownCloud admin page)
8.1.1

@te-online
Copy link
Contributor Author

Okay, dear guys! Everybody seems to be in year's end busy mood 😉 🎅

So I just went crazy replaced this line

$xml = $this->httpHelper->getUrlContent($url);

with

$xml = file_get_contents($url);

If all solutions where so easy...

Had to do the upgrade via command line, though. I suspect a timeout while checking the database. 😞 But now I'm up-to-date again (and will clean up my blown-up database) 😊

@te-online
Copy link
Contributor Author

Ah, by the way: I think, this is related and might be the cause of the problem:
owncloud/core#16255

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

1 participant