{"record":{"id":"fd923fc6487c4435","repo":"projectdiscovery/nuclei","slug":"invalid-url-scheme-provided-s","errorCode":null,"errorMessage":"invalid url scheme provided: %s","messagePattern":"invalid url scheme provided: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/websocket/websocket.go","lineNumber":397,"sourceCode":"\nfunc addWebsocketDurationFields(event map[string]interface{}, durations []time.Duration) {\n\tfor i, duration := range durations {\n\t\tseconds := duration.Seconds()\n\t\tevent[\"duration_\"+strconv.Itoa(i+1)] = seconds\n\t\tevent[\"duration\"] = seconds\n\t}\n}\n\n// getAddress returns the address of the host to make request to\nfunc getAddress(toTest string) (string, error) {\n\tparsed, err := url.Parse(toTest)\n\tif err != nil {\n\t\treturn \"\", errors.Wrap(err, parseUrlErrorMessage)\n\t}\n\tscheme := strings.ToLower(parsed.Scheme)\n\n\tif scheme != \"ws\" && scheme != \"wss\" {\n\t\treturn \"\", fmt.Errorf(\"invalid url scheme provided: %s\", scheme)\n\t}\n\tif parsed != nil && parsed.Host != \"\" {\n\t\treturn parsed.Host, nil\n\t}\n\treturn \"\", nil\n}\n\n// Match performs matching operation for a matcher on model and returns:\n// true and a list of matched snippets if the matcher type is supports it\n// otherwise false and an empty string slice\nfunc (request *Request) Match(data map[string]interface{}, matcher *matchers.Matcher) (bool, []string) {\n\treturn protocols.MakeDefaultMatchFunc(data, matcher)\n}\n\n// Extract performs extracting operation for an extractor on model and returns true or false.\nfunc (request *Request) Extract(data map[string]interface{}, matcher *extractors.Extractor) map[string]struct{} {\n\treturn protocols.MakeDefaultExtractFunc(data, matcher)\n}","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/websocket/websocket.go#L379-L415","documentation":"Error \"invalid url scheme provided: %s\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/protocols/websocket/websocket.go:397 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":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}