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

Often App Upgrades Fail When They InstallTo app/app #11641

Closed
mwaeckerlin opened this issue Oct 5, 2018 · 7 comments
Closed

Often App Upgrades Fail When They InstallTo app/app #11641

mwaeckerlin opened this issue Oct 5, 2018 · 7 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: apps management

Comments

@mwaeckerlin
Copy link

Often when I upgrade Apps from the GUI, the upgrade fails and Nextcloud goes to maintenance mode.

When I then look into the App's directory, I see, that the app is inside the app, e.g. currently it happens e.g. to contacts, calendar and notes. Then there is e.g. a directory /var/www/nextcloud/apps/contacts/contacts.

To fix the issue, I remove the app, e.g. /var/www/nextcloud/apps/contacts, then call occ app:install contacts.

Since it happens often, I wrote a script. APPSDIR is set to /var/www/nextcloud/apps:

echo "**** repair broken apps"
for app in $(ls $APPSDIR); do
    if test -d ${APPSDIR}/${app}/${app}; then
        echo "---- broken app: ${app}"
        rm -rf ${APPSDIR}/${app}
        sudo -u www-data ./occ app:install ${app}
    fi
done
sudo -u www-data ./occ maintenance:mode --off

Steps to reproduce

Currently it happened in two installations with the following steps:

  1. Upgrade existing Server to Nexcloud 14 from 13
  2. Do the upgrade for e.g.: contacts, calendar or notes
  3. Problem occurs.

Expected behaviour

Upgrade should work without problems from the GUI.

Actual behaviour

New app is installed into the wrong directory.

Server configuration

Operating system: Ubuntu 18.04

Web server: Apache

Database: MySQL

PHP version: 7

Nextcloud version: 14.0.1 (also happened in 13)

Updated from an older Nextcloud/ownCloud or fresh install: update from 13

Where did you install Nextcloud from: latest.tar.gz, docker image mwaeckerlin/nextcloud

Client configuration

Browser: Firefox Quantum

Operating system: Ubuntu 18.04

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #5515 (Upgrade fails 10.0.5 to 11.0.3 ), #3168 (Failed Upgrade to 11), #3175 (Failed to enable app workflowengine), #5531 (Upgrade fails from NC11-12), and #5024 (Update fails with OAuth2 app).

@mwaeckerlin
Copy link
Author

GitMate.io thinks possibly related issues are #5515 (Upgrade fails 10.0.5 to 11.0.3 ), #3168 (Failed Upgrade to 11), #3175 (Failed to enable app workflowengine), #5531 (Upgrade fails from NC11-12), and #5024 (Update fails with OAuth2 app).

Nope.

@cvandesande
Copy link

I get hit by exactly this. Just got again today with the contacts 2.1.8 update.

My apps setup is a little non-stock since my Nextcloud is in a Docker container, but the Apps folder is stored on a NFS share and mounted into /apps2/. Either way, when I click "update" the app appears in nextcloud/apps2/contacts/contacts. Then I get an error that Nextcloud can't read the appinfo file, followed by Nextcloud getting left in maintenance mode.

I didn't write a script to fix it, but I just rm -rf the app, turn off maintenance mode and just download the app again. The data in SQL remains fine.

My config.php

'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/share/nginx/html/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/usr/share/nginx/html/nextcloud/apps2',
      'url' => '/apps2',
      'writable' => true,
    ),
  ),

@mwaeckerlin
Copy link
Author

Thank you @cvandesande. I wonder why no one of the team cares about this annoying problem?!?

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv
Copy link
Member

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@Waltibaba
Copy link

This just happened to me with calendar:2.0.3 on nextcloud 19.0.0.12. Thank you for the diagnosis and fix!

@cvandesande
Copy link

Since this issue happened, I've learned that my NFS mount options seem to have an effect. Switching my NFS mounts from sync to async seemed to prevent this, however there have been consequences with upgrades. After a NC update, I run "occ upgrade", which turns off maintenance mode when complete. However maintenance still appears on after when I refresh NC. Fixing seems to be a simple PHP restart, (or docker restart in my case). Restarting PHP after an upgrade bothers me less than app errors, but I'm still interested in discovering what NFS mount options are the best for Nextcloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: apps management
Projects
None yet
Development

No branches or pull requests

5 participants