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

twofactor_gateway 0.20.0 breaks Nextcloud 31 #624

Open
StodaraHodan opened this issue Feb 27, 2025 · 5 comments · May be fixed by #626
Open

twofactor_gateway 0.20.0 breaks Nextcloud 31 #624

StodaraHodan opened this issue Feb 27, 2025 · 5 comments · May be fixed by #626
Labels

Comments

@StodaraHodan
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. upgrade Nextcloud to Version 31
  2. install and enable twofactor_gateway 0.20.0

Expected behaviour

two factor query after login screen

Actual behaviour

internal server error with error in log:

Image

nextcloud.log

{
  "reqId": "ISzgnBdw1hMzmxpC0RQD",
  "level": 3,
  "time": "February 27, 2025 13:10:54",
  "remoteAddr": "",
  "user": "",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/files/preview-service-worker.js",
  "message": "Could not load two-factor auth provider OCA\\TwoFactorGateway\\Provider\\SignalProvider",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0",
  "version": "31.0.0.18",
  "exception": {
    "Exception": "Exception",
    "Message": "Could not load two-factor auth provider OCA\\TwoFactorGateway\\Provider\\SignalProvider",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Authentication/TwoFactorAuth/Manager.php",
        "line": 108,
        "function": "getProviders",
        "class": "OC\\Authentication\\TwoFactorAuth\\ProviderLoader",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/core/Middleware/TwoFactorMiddleware.php",
        "line": 87,
        "function": "isTwoFactorAuthenticated",
        "class": "OC\\Authentication\\TwoFactorAuth\\Manager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php",
        "line": 73,
        "function": "beforeController",
        "class": "OC\\Core\\Middleware\\TwoFactorMiddleware",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 106,
        "function": "beforeController",
        "class": "OC\\AppFramework\\Middleware\\MiddlewareDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 307,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1018,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php",
    "Line": 49,
    "message": "Could not load two-factor auth provider OCA\\TwoFactorGateway\\Provider\\SignalProvider",
    "exception": {},
    "CustomMessage": "Could not load two-factor auth provider OCA\\TwoFactorGateway\\Provider\\SignalProvider"
  }
}

Server configuration

Web server: Apache/2.4.61 (Debian)

Database: mysql Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu

PHP version: 8.2

Nextcloud version: Nextcloud Hub 10 (31.0.0)

List of activated apps
Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - announcementcenter: 7.1.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - circles: 31.0.0-dev.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - groupfolders: 19.0.3
  - impersonate: 2.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - previewgenerator: 5.8.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.6.1
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.0.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - dashboard: 7.11.0 (installed 7.7.0)
  - encryption: 2.19.0
  - files_external: 1.23.0
  - files_rightclick: 0.15.1 (installed 0.15.1)
  - twofactor_gateway: 0.20.0 (installed 0.20.0)
  - twofactor_nextcloud_notification: 5.0.0
  - user_ldap: 1.22.0
Nextcloud configuration
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            ***REMOVED SENSITIVE VALUE***
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "defaultapp": "files",
        "default_language": "de_DE",
        "default_locale": "de_DE",
        "version": "31.0.0.18",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "log_type": "file",
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "loglevel": "1",
        "logdateformat": "F d, Y H:i:s",
        "remember_login_cookie_lifetime": 36000,
        "session_lifetime": 28800,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "app_install_overwrite": [
            "twofactor_gateway",
            "groupfolders",
            "files_rightclick"
        ],
        "maintenance": false,
        "maintenance_window_start": 1,
        "enable_previews": false,
        "preview_max_x": 512,
        "preview_max_y": 512,
        "versions_retention_obligation": "auto,21",
        "trashbin_retention_obligation": "auto,21",
        "skeletondirectory": ""
    }
}

Browser

Browser name: Firefox

Browser version: 135.0

Operating system: nixos

Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
@FelixBuehler
Copy link

Yes, I can confirm this for me.
Disabled the app for now:
occ app:disable twofactor_gateway

@bovender
Copy link

+1

Had to disable it too. It is really unfortunate that 2FA is not a first-class citizen in the Nextcloud world. What is the reason? Should I rather move my IAM out of NC and use, say Keycloak...? I'm puzzled.

@quorle
Copy link

quorle commented Mar 14, 2025

Same problem here. The app is deactivated.

I absolutely need this app to send codes via Telegram. I haven't found another app yet.

This app hasn't been developed in a long time!

@sh2515
Copy link

sh2515 commented Mar 19, 2025

Same here, had to disable to login.

@serversghost
Copy link

serversghost commented Mar 21, 2025

Same here :(

Also did anyone else get this when they disabled the app?

Failed to construct console command 'OCA\TwoFactorGateway\Command\Configure': Could not resolve OCP\ILogger! Class can not be instantiated
twofactor_gateway 0.20.0 disabled

@dyd0u dyd0u linked a pull request Mar 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants