{"record":{"id":"f0b22c53986b4bba","repo":"gravitational/teleport","slug":"failed-to-open-security-keys","errorCode":null,"errorMessage":"failed to open security keys","messagePattern":"failed to open security keys","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/auth/webauthncli/fido2.go","lineNumber":780,"sourceCode":"\t\t\t// immediately followed by assertion (in a single process).\n\t\t\t// This is largely safe to ignore, as opening is fairly consistent in\n\t\t\t// other situations and failures are likely from a non-chosen device in\n\t\t\t// multi-device scenarios.\n\t\t\tfidoLog.DebugContext(context.Background(), \"Device failed to open, skipping\",\n\t\t\t\t\"device\", path,\n\t\t\t\t\"error\", err,\n\t\t\t)\n\t\t\tcontinue\n\t\t}\n\n\t\tfidoDevs = append(fidoDevs, dev)\n\t\topenDevs = append(openDevs, &openedDevice{\n\t\t\tpath: path,\n\t\t\tdev:  dev,\n\t\t})\n\t}\n\tif len(fidoDevs) == 0 {\n\t\treturn nil, nil, errors.New(\"failed to open security keys\")\n\t}\n\n\t// Prompt touch, it's about to begin.\n\tackTouch, err := prompt.PromptTouch()\n\tif err != nil {\n\t\tcloseAll()\n\t\treturn nil, nil, trace.Wrap(err)\n\t}\n\t//nolint:ineffassign // closeAll not meant to be used from here onwards.\n\tcloseAll = nil\n\n\terrC := make(chan error, len(fidoDevs))\n\tdevices = &openedDevices{\n\t\tdevices: openDevs,\n\t}\n\n\t// Fire device handling goroutines.\n\t// From this point onwards devices are owned by their respective goroutines,","sourceCodeStart":762,"sourceCodeEnd":798,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/auth/webauthncli/fido2.go#L762-L798","documentation":"startDevices attempts to open every discovered FIDO2 device path; devices that fail to open are logged and skipped (common in multi-device scenarios where only the chosen device accepts the operation). This guard fires only when zero devices could be opened at all.","triggerScenarios":"Thrown at lib/auth/webauthncli/fido2.go:780 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Unplug and reinsert the security key, then retry","Try a different USB port or cable","Check the key works with other FIDO2 clients (e.g. browser WebAuthn)","On Linux, verify udev permissions for the security key"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}