{"record":{"id":"a58deb557739b94b","repo":"netbirdio/netbird","slug":"parse-handshake-sec-w","errorCode":null,"errorMessage":"parse handshake sec: %w","messagePattern":"parse handshake sec: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/configurer/usp.go","lineNumber":487,"sourceCode":"\t\tif p.PersistentKeepaliveInterval != nil {\n\t\t\tsb.WriteString(fmt.Sprintf(\"persistent_keepalive_interval=%d\\n\", int(p.PersistentKeepaliveInterval.Seconds())))\n\t\t}\n\n\t\tif p.ReplaceAllowedIPs {\n\t\t\tsb.WriteString(\"replace_allowed_ips=true\\n\")\n\t\t}\n\n\t\tfor _, aip := range p.AllowedIPs {\n\t\t\tsb.WriteString(fmt.Sprintf(\"allowed_ip=%s\\n\", aip.String()))\n\t\t}\n\t}\n\treturn sb.String()\n}\n\nfunc toLastHandshake(stringVar string) (time.Time, error) {\n\tsec, err := strconv.ParseInt(stringVar, 10, 64)\n\tif err != nil {\n\t\treturn time.Time{}, fmt.Errorf(\"parse handshake sec: %w\", err)\n\t}\n\n\t// If sec is 0 (Unix epoch), return zero time instead\n\t// This indicates no handshake has occurred\n\tif sec == 0 {\n\t\treturn time.Time{}, nil\n\t}\n\n\treturn time.Unix(sec, 0), nil\n}\n\nfunc toBytes(s string) (int64, error) {\n\treturn strconv.ParseInt(s, 10, 64)\n}\n\nfunc getFwmark() int {\n\tif nbnet.AdvancedRouting() && runtime.GOOS == \"linux\" {\n\t\treturn nbnet.ControlPlaneMark","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/configurer/usp.go#L469-L505","documentation":"Error \"parse handshake sec: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/iface/configurer/usp.go:487 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}