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

TypeError: this.$refs.field is undefined, when trying to enroll a new security key #492

Open
afflux opened this issue Nov 28, 2023 · 2 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@afflux
Copy link

afflux commented Nov 28, 2023

Steps to reproduce

  1. Click Add Security Key

Expected behaviour

Security Key Enrollment starts

Actual behaviour

Nextcloud says Please use your security key to authorize. but nothing else happens.

Server configuration

Operating system: Debian

Web server: nginx

Database: mariadb

PHP version:

Version: Nextcloud 27.1.3, Two-Factor WebAuthn 1.3.0

Updated from an older version or fresh install: updated

List of activated apps
Enabled:
  - activity: 2.19.0
  - bruteforcesettings: 2.7.0
  - calendar: 4.5.3
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.4.2
  - contactsinteraction: 1.8.0
  - cookbook: 0.10.2
  - dav: 1.27.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_fulltextsearch: 27.0.1
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.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
  - fulltextsearch: 27.0.2
  - fulltextsearch_elasticsearch: 27.0.4
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - 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
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_webauthn: 1.3.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
**The content of config/config.php:**
{
    "system": {
        "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
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "myhostname"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.1.3.2",
        "overwrite.cli.url": "https:\/\/myhostname",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "default_phone_region": "DE",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 60",
        "loglevel": 0,
        "app_install_overwrite": [
            "cookbook",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "files_fulltextsearch"
        ],
        "theme": ""
    }
}

Client configuration

Browser: tested both on recent Firefox Desktop and Chrome for Android

Logs

Web server error log
irrelevant
Server log (data/nextcloud.log)
irrelevant
Browser log
TypeError: this.$refs.field is undefined
    mounted https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    It https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Mt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    promise callback*St https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    It https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    notify https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    set https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    set https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    start https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    kt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    n https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    click https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    kt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    n https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _wrapper https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Ge https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Wa https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    A https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    init https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    m https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    init https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    m https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
settings.js:2:1663630
    xt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    wt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Et https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    It https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Mt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    (Async: promise callback)
    St https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    It https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    notify https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    set https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    set https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    start https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    kt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    n https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    click https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    kt https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    n https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _wrapper https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    (Async: EventListener.handleEvent)
    $a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Ge https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    Wa https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    A https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    init https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    m https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    init https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    m https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    p https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    jr https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    _update https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    a https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    get https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    e https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    $mount https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
    <anonymous> https://myhostname/custom_apps/twofactor_webauthn/js/settings.js?v=947b932f-0:2
@st3iny
Copy link
Member

st3iny commented Nov 28, 2023

I just tried to reproduce it and it works for me.

Did you just recently update the app? If so, please try to disable/clear the browser cache, reload the personal settings page and try again. There might be some cached scripts present.

@st3iny st3iny added bug Something isn't working 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Nov 28, 2023
@afflux
Copy link
Author

afflux commented Nov 28, 2023

I guess you are right. Clearing cache alone did not help, but "clear cookies and site data" did. I'd still argue that's a bug, but if it really is in twofactor_webauthn, I do not know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants