nextcloud / nextcloud/twofactor_webauthn
TypeError: this.$refs.field is undefined, when trying to enroll a new security key
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 59
- Forks
- 11
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
Steps to reproduce
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by selecting Add Security Key and inspect the browser trace in custom_apps/twofactor_webauthn/js/settings.js, especially the mounted path reporting that this.$refs.field is undefined. Trace that enrollment path to the relevant source and verify that security key enrollment starts successfully without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100