{"record":{"id":"94ac0daa5b7087fd","repo":"gravitational/teleport","slug":"unexpected-jamf-version-string-q","errorCode":null,"errorMessage":"unexpected jamf version string: %q","messagePattern":"unexpected jamf version string: %q","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/devicetrust/native/device_darwin.go","lineNumber":195,"sourceCode":"\t// See https://learn.jamf.com/bundle/jamf-pro-documentation-current/page/Components_Installed_on_Managed_Computers.html\n\tcmd := exec.Command(\"/usr/local/bin/jamf\", \"version\")\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\t// Jamf binary may not exist. This is alright.\n\t\tpathErr := &fs.PathError{}\n\t\tif errors.As(err, &pathErr) {\n\t\t\tslog.DebugContext(context.Background(), \"Device Trust: Jamf binary not found\", \"binary_path\", pathErr.Path)\n\t\t\treturn \"\", nil\n\t\t}\n\n\t\treturn \"\", trace.Wrap(err, \"running jamf version\")\n\t}\n\n\t// Eg: \"version=10.46.1-t1683911857\"\n\ts := string(bytes.TrimSpace(out))\n\ttmp := strings.Split(s, \"=\")\n\tif len(tmp) != 2 {\n\t\treturn \"\", fmt.Errorf(\"unexpected jamf version string: %q\", s)\n\t}\n\n\treturn tmp[1], nil\n}\n\nfunc getMacosEnrollmentProfiles() (string, error) {\n\tcmd := exec.Command(\"/usr/bin/profiles\", \"status\", \"-type\", \"enrollment\")\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\treturn \"\", trace.Wrap(err, \"running /usr/bin/profiles status -type enrollment\")\n\t}\n\treturn string(bytes.TrimSpace(out)), nil\n}\n\nfunc signChallenge(chal []byte) (sig []byte, err error) {\n\th := sha256.Sum256(chal)\n\tdigC := C.Digest{\n\t\tdata:     (*C.uint8_t)(C.CBytes(h[:])),","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/devicetrust/native/device_darwin.go#L177-L213","documentation":"getJamfBinaryVersion parses the output of 'jamf version' (e.g. 'version=10.46.1-t1683911857'); this error fires when the trimmed output does not match the expected 'version=...' pattern, so the version cannot be extracted. A missing jamf binary is handled separately and is not an error.","triggerScenarios":"Thrown at lib/devicetrust/native/device_darwin.go:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the jamf binary version output manually (/usr/local/bin/jamf version) to see its actual format","Upgrade jamf to a version with the standard output format","Report the unexpected format to Teleport if jamf changed its output"],"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"}