{"record":{"id":"fbd42fbbe7b28bbb","repo":"cloudflare/cloudflared","slug":"unabled-to-parse-connector-id-flag-into-a-valid","errorCode":null,"errorMessage":"unabled to parse 'connector-id' flag into a valid UUID: %w","messagePattern":"unabled to parse 'connector-id' flag into a valid UUID: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/tail/cmd.go","lineNumber":237,"sourceCode":"\tclaims, err := management.ParseToken(token)\n\tif err != nil {\n\t\treturn url.URL{}, fmt.Errorf(\"failed to determine if token is FED: %w\", err)\n\t}\n\n\tvar managementHostname string\n\tif claims.IsFed() {\n\t\tmanagementHostname = credentials.FedRampHostname\n\t} else {\n\t\tmanagementHostname = c.String(cfdflags.ManagementHostname)\n\t}\n\n\tquery := url.Values{}\n\tquery.Add(\"access_token\", token)\n\tconnector := c.String(\"connector-id\")\n\tif connector != \"\" {\n\t\tconnectorID, err := uuid.Parse(connector)\n\t\tif err != nil {\n\t\t\treturn url.URL{}, fmt.Errorf(\"unabled to parse 'connector-id' flag into a valid UUID: %w\", err)\n\t\t}\n\t\tquery.Add(\"connector_id\", connectorID.String())\n\t}\n\treturn url.URL{Scheme: \"wss\", Host: managementHostname, Path: \"/logs\", RawQuery: query.Encode()}, nil\n}\n\nfunc printLine(log *management.Log, logger *zerolog.Logger) {\n\tfields, err := json.Marshal(log.Fields)\n\tif err != nil {\n\t\tfields = []byte(\"unable to parse fields\")\n\t\tlogger.Debug().Msgf(\"unable to parse fields from event %+v\", log)\n\t}\n\tfmt.Printf(\"%s %s %s %s %s\\n\", log.Time, log.Level, log.Event, log.Message, fields)\n}\n\nfunc printJSON(log *management.Log, logger *zerolog.Logger) {\n\toutput, err := json.Marshal(log)\n\tif err != nil {","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/tail/cmd.go#L219-L255","documentation":"Raised in buildURL for `cloudflared tail` when the --connector-id flag is non-empty but cannot be parsed by uuid.Parse. The management URL can only be built with a well-formed connector UUID, so the tail command stops before connecting to the management websocket.","triggerScenarios":"Running `cloudflared tail --connector-id my-connector <tunnel-id>` — any value that is not a canonical or accepted UUID format (e.g. missing dashes, extra characters, empty braces).","commonSituations":"Passing a connector name instead of its UUID, copying a connector ID truncated or with surrounding text from the dashboard URL.","solutions":["Use the connector's UUID (RFC 4122 format, e.g. 123e4567-e89b-12d3-a456-426614174000)","Find the connector ID in the Cloudflare Zero Trust dashboard or via the API","Omit --connector-id if you want logs from all connectors","Normalize the UUID (add dashes) if you have a 32-hex-character string"],"exampleFix":"# before\ncloudflared tail --connector-id my-tunnel-connector <tunnel-id>\n# after\ncloudflared tail --connector-id 123e4567-e89b-12d3-a456-426614174000 <tunnel-id>","handlingStrategy":"validation","validationCode":"if id := os.Args[flagIdx+1]; id != \"\" {\n\tif _, err := uuid.Parse(id); err != nil {\n\t\treturn fmt.Errorf(\"--connector-id must be a UUID\")\n\t}\n}","typeGuard":"func validConnectorID(s string) bool { _, err := uuid.Parse(s); return err == nil }","tryCatchPattern":"if _, err := uuid.Parse(connectorFlag); err != nil {\n\treturn fmt.Errorf(\"--connector-id must be a UUID, got %q\", connectorFlag)\n}","preventionTips":["Copy connector UUIDs from the Zero Trust dashboard exactly","Insert dashes into 32-char hex strings before use","Drop the flag entirely to tail all connectors"],"tags":["cli","validation","uuid","flags"],"backgroundTag":"invalid-identifier-format","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}