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

Web-based Updater does not update itself #545

Open
wom-bat opened this issue Apr 9, 2024 · 6 comments
Open

Web-based Updater does not update itself #545

wom-bat opened this issue Apr 9, 2024 · 6 comments

Comments

@wom-bat
Copy link

wom-bat commented Apr 9, 2024

For quite while, every time I've upgraded using the web-based tool I've seen:

The following extra files have been found:
composer.json
composer.lock
package.json
package-lock.json

I've deleted those files, and update has succeeded.

On the next upgrade, the same message appears, because even though this issue has been fixed in the updater, the updater has not updated itself --- so I'm running Nextcloud 29 rc3 but the updater in .../var/www/nextcloud/updater/index.php is from nextcloud 24.

@joshtrichards
Copy link
Member

Hi @wom-bat - That's definitely weird. Not sure why you'd be experiencing that.

Can you share a bit more info:

  • What installation method?
  • What OS/distribution?
  • Are your installation and data folders on the same (or different) OS mount point(s)?
  • Can you provide the output of ls -l /var/www/nextcloud
    • any symbolic links within your Nextcloud installation folder?
  • What type of filesystem(s)?
  • Can you provide your updater.log? (the whole thing ideally, but particularly starting from [info] finalize() since that's where the Updater replaces itself) [search and replace any domains/usernames embedded in the file paths for privacy if desired]
  • For completeness, provide your base Nextcloud config (occ config:list system)

Have you ever used the command line mode of the Updater? It should behave the same, but it's possible it would generate some additional output that could provide a clue about what is going on (though hopefully it'll be in updater.log either way).

Thanks!

@wom-bat
Copy link
Author

wom-bat commented Apr 24, 2024

What I usually do is:
--- Use the web based updater to the point it says 'continue with web based updater or use command line'
--- Complete with sudo -u www-data php ./occ upgrade

@wom-bat
Copy link
Author

wom-bat commented Apr 24, 2024

There is no [info: finalize()] in the logs.

@wom-bat
Copy link
Author

wom-bat commented Apr 24, 2024

Log attached.

I'm running Debian stable, XFS file systems; data and nextcloud are on the same partition.
No symlinks.

updater.log

$ ls -l 
-rw-r--r--  1 www-data www-data    2079 Apr 18 19:05 composer.json
-rw-r--r--  1 www-data www-data    3140 Apr 18 19:05 composer.lock
drwxr-xr-x  2 www-data www-data     122 Apr 20 10:23 config
-rw-r--r--  1 www-data www-data    4726 Apr 18 19:05 console.php
-rw-r--r--  1 www-data www-data   34520 Apr 18 19:05 COPYING
drwxr-xr-x 24 www-data www-data    4096 Apr 20 10:22 core
-rw-r--r--  1 www-data www-data    7900 Apr 18 19:05 cron.php
drwxr-xr-x  2 www-data www-data   12288 Apr 20 10:22 dist
-rw-r--r--  1 www-data www-data     156 Apr 18 19:05 index.html
-rw-r--r--  1 www-data www-data    4564 Apr 18 19:05 index.php
drwxr-xr-x  6 www-data www-data     125 Apr 20 10:22 lib
-rw-r--r--  1 www-data www-data     283 Apr 18 19:05 occ
drwxr-xr-x  2 www-data www-data      55 Apr 20 10:22 ocs
drwxr-xr-x  2 www-data www-data      23 Apr 20 10:22 ocs-provider
-rw-r--r--  1 www-data www-data    7032 Apr 18 19:05 package.json
-rw-r--r--  1 www-data www-data 1074100 Apr 18 19:05 package-lock.json
-rw-r--r--  1 www-data www-data    3759 Apr 18 19:05 public.php
-rw-r--r--  1 www-data www-data    5597 Apr 18 19:05 remote.php
drwxr-xr-x  4 www-data www-data     133 Apr 20 10:22 resources
-rw-r--r--  1 www-data www-data      26 Apr 18 19:05 robots.txt
-rw-r--r--  1 www-data www-data    2523 Apr 18 19:05 status.php
drwxr-xr-x  3 www-data www-data      35 Apr 20 10:22 themes
drwxr-xr-x  3 www-data www-data      58 Apr  9 08:32 updater
-rw-r--r--  1 www-data www-data     388 Apr 18 19:11 version.php

@wom-bat
Copy link
Author

wom-bat commented Apr 24, 2024

Config file:

        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "forcessl": false,
        "blacklisted_files": [
            ".htaccess"
        ],
        "overwritehost": "",
        "overwriteprotocol": "",
        "overwritewebroot": "",
        "overwritecondaddr": "",
        "overwrite.cli.url": "***REMOVED_URL***",
        "theme": "",
        "default_language": "en",
        "3rdpartyroot": "",
        "3rdpartyurl": "",
        "defaultapp": "web",
        "knowledgebaseenabled": true,
        "mail_smtpdebug": false,
        "mail_smtpmode": "sendmail",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtptimeout": 10,
        "mail_smtpauthtype": "LOGIN",
        "trashbin_retention_obligation": "180, auto",
        "allow_user_to_change_display_name": true,
        "appcodechecker": "",
        "updatechecker": false,
        "log_type": "file",
        "log_query": true,
        "logfile": "\/var\/nextcloud\/data\/owncloud.log",
        "loglevel": 3,
        "filelocking.enabled": true,
        "filelocking.ttl": 3600,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***"
        },
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
        "xframe_restriction": true,
        "customclient_desktop": "",
        "customclient_android": "",
        "customclient_ios": "",
        "logdateformat": "F d, Y H:i:s",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "version": "29.0.0.18",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita"
        ],
        "appstoreenabled": true,
        "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
        "apps-paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": "false"
            },
            {
                "path": "\/var\/www\/nextcloud\/apps2",
                "url": "\/apps2",
                "writable": "true"
            }
        ],
        "maintenance": false,
        "maintenance_window_start": 1,
        "web.baseUrl": "***REMOVED SENSITIVE VALUE***",
        "web.rewriteLinks": false,
        "htaccess.rewriteBase": "\/",
        "allow_user_to_change_mail_address": true,
        "token_auth_enforced": false,
        "files_external_allow_create_new_local": true,
        "ldapIgnoreNamingRules": false,
        "default_phone_region": "AU",
        "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
        "updater.release.channel": "beta",
        "mysql.utf8mb4": true,
        "enable_file_metadata": true,
        "app_install_overwrite": [
            "impersonate",
            "duplicatefinder",
            "dropit"
        ]
    }
}

@wom-bat
Copy link
Author

wom-bat commented Apr 25, 2024

I updated to the official nextcloud 29 today using sudo -u ww-data php ./updater/updater.phar, and the updater was updated --- I see the finalize line in the updater log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants