nextcloud / nextcloud/server

`occ app:enable app` should not install app

Open
#39,578 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback enhancement feature: apps management feature: occ
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

occ app:enable should not install an app that is not already installed, and should instead throw an error message.

Steps to reproduce
  1. check that thisApp is not already installed
  2. occ app:install thisApp
  3. see that thisApp is now installed
Expected behavior

If thisApp is not already installed, then occ app:enable thisApp should not install it but instead report an error.

Installation method

Community Docker image

Nextcloud Server version

25

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "jhaas.cloud.4next.ch"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.7.1",
        "overwrite.cli.url": "https:\/\/jhaas.cloud.4next.ch",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "default_locale": "fr_CH",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "loglevel": 2,
        "maintenance": false,
        "default_phone_region": "CH",
        "skeletondirectory": "\/var\/www\/html\/data\/nouvelUtilisateur\/",
        "oidc_login_provider_url": "https:\/\/auth.4next.ch\/auth\/realms\/jhaas",
        "oidc_login_client_id": "nextcloud",
        "oidc_login_client_secret": "40a7dfa3-4f20-48a4-a707-e82a00c3e8de",
        "oidc_login_logout_url": "https:\/\/auth.4next.ch\/auth\/realms\/jhaas\/protocol\/openid-connect\/logout?redirect_uri=https%3A%2F%2Fjhaas.cloud.4next.ch%2F",
        "oidc_login_disable_registration": false,
        "allow_user_to_change_display_name": false,
        "lost_password_link": "disabled",
        "oidc_login_hide_password_form": true,
        "oidc_create_groups": true,
        "oidc_login_auto_redirect": true,
        "oidc_login_redir_fallback": true,
        "oidc_login_attributes": {
            "id": "preferred_username",
            "mail": "email",
            "groups": "roles"
        },
        "theme": ""
    }
}
List of activated Apps
Enabled:
  - activity: 2.17.0
  - approval: 1.1.0
  - calendar: 4.4.3
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - collectives: 2.6.1
  - comments: 1.15.0
  - contacts: 5.3.2
  - dashboard: 7.5.0
  - dav: 1.24.0
  - deck: 1.8.5
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_downloadactivity: 1.16.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - forms: 3.3.1
  - groupfolders: 13.1.4
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - oidc_login: 2.6.0
  - onlyoffice: 7.8.0
  - password_policy: 1.15.0
  - photos: 2.0.1
  - polls: 5.2.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - quicknotes: 0.8.5
  - related_resources: 1.0.4
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - snappymail: 2.28.4
  - spreed: 15.0.7
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - tasks: 0.15.0
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - welcome: 1.0.8
  - workflowengine: 2.7.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - contactsinteraction: 1.2.0
  - encryption
  - files_external: 1.12.0
  - rainloop: 7.2.6
  - recommendations: 0.8.0
  - suspicious_login
  - twofactor_totp
  - user_ldap
Nextcloud Signing status
No errors have been found.
Nextcloud Logs

No response

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the occ app:enable command entry point and run it with an app that is installed and one that is absent. Compare the resulting behavior with occ app:install; done means enabling never installs a missing app and reports an error instead.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.