gravitational/teleport · error
webauthn error code %v: %v
Error message
webauthn error code %v: %v
What it means
getErrorNameOrLastErr formats failures from the native Windows WebAuthn API: if WebAuthNGetErrorName cannot produce a message for the HRESULT, the raw error code (plus syscall error, if any) is formatted into this message.
Source
Thrown at lib/auth/webauthnwin/webauthn_windows.go:227
AttestationResponse: wantypes.AuthenticatorAttestationResponse{
AuthenticatorResponse: wantypes.AuthenticatorResponse{
ClientDataJSON: in.jsonEncodedClientData,
},
AttestationObject: bytesFromCBytes(out.cbAttestationObject, out.pbAttestationObject),
},
}, nil
}
func getErrorNameOrLastErr(in uintptr, lastError error) error {
ret := webAuthNGetErrorName(in)
if ret == 0 {
if lastError != syscall.Errno(0) {
return fmt.Errorf("webauthn error code %v and syscall err: %v", in, lastError)
}
return fmt.Errorf("webauthn error code %v", in)
}
errString := windows.UTF16PtrToString((*uint16)(unsafe.Pointer(ret)))
return fmt.Errorf("webauthn error code %v: %v", in, errString)
}
func isUVPlatformAuthenticatorAvailable() (bool, error) {
var out bool
ret, err := webAuthNIsUserVerifyingPlatformAuthenticatorAvailable(&out)
if err != nil {
return false, getErrorNameOrLastErr(ret, err)
}
return out, nil
}
// bytesFromCBytes gets slice of bytes from C type and copies it to new slice
// so that it won't interfere when main objects is free.
func bytesFromCBytes(size uint32, p *byte) []byte {
if p == nil {
return nil
}
if *p == 0 {View on GitHub (pinned to 1283425b60)
Solutions
- Look up the WebAuthn HRESULT code in Microsoft's WebAuthN documentation to identify the failure
- Verify the authenticator and Windows version support WebAuthn
- Retry the operation; some codes are transient (e.g. user cancellation or timeout)
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at lib/auth/webauthnwin/webauthn_windows.go:227 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gravitational/teleport@1283425b60 (2026-09-02).
Data as JSON: /api/errors/53a72a7c7f3d9da3.
Report an issue: GitHub.