Skip to content

coolwsd restart: expVer is 10 chars long but only 8 chars are expected #295

@gcoretech

Description

@gcoretech

After updating to nextcloud 30.0.3 today the internal CODE server does not work reliably.

PHP log shows:
[06-Dec-2024 08:19:40 UTC] Old server found, restarting. Expected hash a4b67a7664 but found a4b67a76.

I don't know where COOLWSD_VERSION_HASH is coming from but the comment after $actVer = substr ... says expVer is at most 8 characters long whereas it currently is 10 characters long.

$expVer = '%COOLWSD_VERSION_HASH%';

The local richdocuments/proxy.php file shows:

        $response = file_get_contents("http://localhost:9983/hosting/capabilities", 0, stream_context_create(["http"=>["timeout"=>1]]));
        if ($response) {
            // Version check.
            $obj = json_decode($response);
            $actVer = substr($obj->{'productVersionHash'}, 0, 8); // expVer is at most 8 characters long
            $expVer = 'a4b67a7664';
            if ($actVer !== $expVer && $expVer !== '%' . 'COOLWSD_VERSION_HASH' . '%') { // deliberately split so that sed does not touch this during build-time
                // Old/unexpected server version; restart.
                error_log("Old server found, restarting. Expected hash $expVer but found $actVer.");
                stopCoolwsd();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions