nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
108 stars 64 forks source link

User backend \OCA\UserExternal\IMAP not found #235

Open Flowneee opened 1 year ago

Flowneee commented 1 year ago

I just installed fresh Nextcloud AIO (version 27), and was unable to setup IMAP due to User backend \OCA\UserExternal\IMAP not found error. But \OCA\UserExternal\FTP seems to work (at least no such errors, only complain about user count smth).

Steps to reproduce

  1. Install Nextcloud AIO
  2. Install External user authentication app
  3. Add \OCA\UserExternal\IMAP to user_backends

Expected behaviour

It works and allow to login via IMAP

Actual behaviour

Doesn't work, logs is flooded with User backend \OCA\UserExternal\IMAP not found. in Administrator setting in GUI.

Affected Authentication backend

IMAP

Server configuration

User External App version: 3.2

Operating system: Arch Linux

Web server: Apache/2.4.57 (behind reverse proxy nginx/1.24.0)

Database: PostgreSQL 15.3

PHP version: 8.1.20

Nextcloud version: 27.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Fresh

Where did you install Nextcloud from: All-In-One docker image

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` $ sudo docker exec -u 33 -it nextcloud-aio-nextcloud bash 0d61fdcdea31:/var/www/html$ php occ app:list Enabled: - activity: 2.19.0 - admin_audit: 1.17.0 - calendar: 4.4.3 - circles: 27.0.0 - cloud_federation_api: 1.10.0 - comments: 1.17.0 - contacts: 5.3.2 - contactsinteraction: 1.8.0 - dashboard: 7.7.0 - dav: 1.27.0 - deck: 1.10.0 - federatedfilesharing: 1.17.0 - federation: 1.17.0 - files: 1.22.0 - files_pdfviewer: 2.8.0 - files_rightclick: 1.6.0 - files_sharing: 1.19.0 - files_trashbin: 1.17.0 - files_versions: 1.20.0 - firstrunwizard: 2.16.0 - logreader: 2.12.0 - lookup_server_connector: 1.15.0 - nextcloud-aio: 0.4.0 - nextcloud_announcements: 1.16.0 - notes: 4.8.0 - notifications: 2.15.0 - notify_push: 0.6.3 - oauth2: 1.15.0 - password_policy: 1.17.0 - photos: 2.3.0 - privacy: 1.11.0 - provisioning_api: 1.17.0 - recommendations: 1.6.0 - related_resources: 1.2.0 - richdocuments: 8.1.0 - serverinfo: 1.17.0 - settings: 1.9.0 - sharebymail: 1.17.0 - support: 1.10.0 - survey_client: 1.15.0 - systemtags: 1.17.0 - tasks: 0.15.0 - text: 3.8.0 - theming: 2.2.0 - twofactor_backupcodes: 1.16.0 - twofactor_totp: 9.0.0 - user_external: 3.2.0 - user_status: 1.7.0 - viewer: 2.1.0 - weather_status: 1.7.0 - workflowengine: 2.9.0 Disabled: - bruteforcesettings: 2.7.0 - encryption: 2.15.0 - files_external: 1.19.0 - suspicious_login: 5.0.0 - user_ldap: 1.17.0 ```

Nextcloud configuration:

Config report ``` $ sudo docker exec -u 33 -it nextcloud-aio-nextcloud bash 0d61fdcdea31:/var/www/html$ php occ config:list system { "system": { "one-click-instance": true, "one-click-instance.user-limit": 100, "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 } ], "check_data_directory_permissions": false, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "password": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "overwritehost": "nextcloud.flowneee.dev", "overwriteprotocol": "https", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "..." ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "27.0.0.8", "overwrite.cli.url": "https:\/\/nextcloud.flowneee.dev\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "updater.release.channel": "stable", "updatedirectory": "\/nc-updater", "loglevel": "2", "app_install_overwrite": [ "nextcloud-aio" ], "log_type": "file", "logfile": "\/var\/www\/html\/data\/nextcloud.log", "log_rotate_size": "10485760", "log.condition": { "apps": [ "admin_audit" ] }, "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "enabledPreviewProviders": { "1": "OC\\Preview\\Image", "2": "OC\\Preview\\MarkDown", "3": "OC\\Preview\\MP3", "4": "OC\\Preview\\TXT", "5": "OC\\Preview\\OpenDocument", "6": "OC\\Preview\\Movie", "7": "OC\\Preview\\Krita", "0": "OC\\Preview\\Imaginary" }, "enable_previews": true, "upgrade.disable-web": true, "mail_smtpmode": "smtp", "trashbin_retention_obligation": "auto, 30", "versions_retention_obligation": "auto, 30", "activity_expire_days": "30", "simpleSignUpLink.shown": false, "share_folder": "\/Shared", "tempdirectory": "\/mnt\/ncdata\/tmp\/", "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/", "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726", "htaccess.RewriteBase": "\/", "files_external_allow_create_new_local": false, "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "allow_local_remote_servers": true, "preview_imaginary_url": "http:\/\/nextcloud-aio-imaginary:9000", "user_backends": [ { "class": "\\OCA\\UserExternal\\IMAP", "arguments": [ "...", 993, "ssl", "...", true, true ] } ] } } ```

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Nothing related to user backend in .log file. ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
rototom commented 1 year ago

+1

joshtrichards commented 1 year ago

Restart your web app/NC container - the problem will probably go away. This is usually a caching issue post-update from what I've seen elsewhere IIRC (not specific to this app). Just needs a bump to the PHP/FPM processes.

bobobo1618 commented 9 months ago

FWIW I found that somehow the app had been disabled:

>occ app:list
[...]
Disabled:
  - user_external: 3.2.0 (installed 3.2.0)

I re-enabled it with occ app:enable user_external and the issue disappeared.

The disabling happened without any action on my part. I'm guessing restarting the container (and maybe upgrading to 28 as a result?) actually triggered the breakage and no amount of restarting it again would fix it.