{"record":{"id":"9f065a9b9fc50b61","repo":"henrygd/beszel","slug":"no-fingerprint-in-response","errorCode":null,"errorMessage":"no fingerprint in response","messagePattern":"no fingerprint in response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/hub/transport/transport.go","lineNumber":66,"sourceCode":"func unmarshalLegacyResponse(resp common.AgentResponse, action common.WebSocketAction, dest any) error {\n\tswitch action {\n\tcase common.GetData:\n\t\td, ok := dest.(*system.CombinedData)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetData: %T\", dest)\n\t\t}\n\t\tif resp.SystemData == nil {\n\t\t\treturn errors.New(\"no system data in response\")\n\t\t}\n\t\t*d = *resp.SystemData\n\t\treturn nil\n\tcase common.CheckFingerprint:\n\t\td, ok := dest.(*common.FingerprintResponse)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for CheckFingerprint: %T\", dest)\n\t\t}\n\t\tif resp.Fingerprint == nil {\n\t\t\treturn errors.New(\"no fingerprint in response\")\n\t\t}\n\t\t*d = *resp.Fingerprint\n\t\treturn nil\n\tcase common.GetContainerLogs:\n\t\td, ok := dest.(*string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetContainerLogs: %T\", dest)\n\t\t}\n\t\tif resp.String == nil {\n\t\t\treturn errors.New(\"no logs in response\")\n\t\t}\n\t\t*d = *resp.String\n\t\treturn nil\n\tcase common.GetContainerInfo:\n\t\td, ok := dest.(*string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetContainerInfo: %T\", dest)\n\t\t}","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/internal/hub/transport/transport.go#L48-L84","documentation":"unmarshalLegacyResponse returns this when a CheckFingerprint response has resp.Fingerprint == nil, so no FingerprintResponse can be written to dest. The legacy agent answered but omitted the fingerprint data.","triggerScenarios":"UnmarshalResponse on a CheckFingerprint request whose legacy AgentResponse lacks the Fingerprint field.","commonSituations":"Agent/hub version mismatch during first connection/fingerprint verification; custom or very old agent that doesn't implement fingerprint checks; corrupted response producing empty fields.","solutions":["Update the agent on the host to a hub-compatible version","Delete the stored fingerprint for the host and reconnect so it is re-established","Confirm you're not mixing transports/agent types","Inspect agent logs to see why it didn't return a fingerprint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// ensure a compatible agent is reachable before fingerprint check\nv, err := client.Request(common.GetVersion, new(string))\nif err != nil { return fmt.Errorf(\"agent not compatible: %w\", err) }","typeGuard":null,"tryCatchPattern":"if err := UnmarshalResponse(resp, common.CheckFingerprint, dest); err != nil {\n    if strings.Contains(err.Error(), \"no fingerprint\") {\n        // clear stored fingerprint and reconnect\n    }\n    return err\n}","preventionTips":["Update agents before upgrading the hub","Reset fingerprints when rebuilding hosts","Use official agent builds, not custom forks"],"tags":["go","protocol","fingerprint","legacy-agent"],"backgroundTag":"missing-payload-in-response","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}