{"record":{"id":"81114cf5f9f056de","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-execution-id-executi","errorCode":null,"errorMessage":"dialers not initialized for execution id: {ExecutionId}","messagePattern":"dialers not initialized for execution id: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/protocols/http/httpclientpool/clientpool.go","lineNumber":257,"sourceCode":"\t\t\tbuilder.WriteString(c.Connection.CustomMaxTimeout.String())\n\t\t}\n\t}\n\tbuilder.WriteString(\"r\")\n\tbuilder.WriteString(strconv.FormatInt(int64(c.ResponseHeaderTimeout.Seconds()), 10))\n\thash := builder.String()\n\treturn hash\n}\n\n// HasStandardOptions checks whether the configuration requires custom settings\nfunc (c *Configuration) HasStandardOptions() bool {\n\treturn c.Threads == 0 && c.MaxRedirects == 0 && c.RedirectFlow == DontFollowRedirect && c.DisableCookie && c.Connection == nil && !c.NoTimeout && c.ResponseHeaderTimeout == 0\n}\n\n// GetRawHTTP returns the rawhttp request client\nfunc GetRawHTTP(options *protocols.ExecutorOptions) *rawhttp.Client {\n\tdialers := protocolstate.GetDialersWithId(options.Options.ExecutionId)\n\tif dialers == nil {\n\t\tpanic(\"dialers not initialized for execution id: \" + options.Options.ExecutionId)\n\t}\n\n\t// Lock the dialers to avoid a race when setting RawHTTPClient\n\tdialers.Lock()\n\tdefer dialers.Unlock()\n\n\tif dialers.RawHTTPClient != nil {\n\t\treturn dialers.RawHTTPClient\n\t}\n\n\trawHttpOptionsCopy := *rawhttp.DefaultOptions\n\tif options.Options.AliveHttpProxy != \"\" {\n\t\trawHttpOptionsCopy.Proxy = options.Options.AliveHttpProxy\n\t} else if options.Options.AliveSocksProxy != \"\" {\n\t\trawHttpOptionsCopy.Proxy = options.Options.AliveSocksProxy\n\t} else if dialers.Fastdialer != nil {\n\t\trawHttpOptionsCopy.FastDialer = dialers.Fastdialer\n\t}","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/http/httpclientpool/clientpool.go#L239-L275","documentation":"GetRawHTTP panicked because no dialers were registered for options.Options.ExecutionId. HTTP raw requests go through the per-execution Dialers struct; GetDialersWithId returning nil means protocolstate.Init(types.Options) was never called with that ExecutionId (or the entry was deleted). The panic also guards a LazyLock-protected RawHTTPClient cache further down, but firing here means initialization ordering is wrong.","triggerScenarios":"Calling a raw-HTTP request path (e.g. unsafe/raw requests in templates) as an SDK consumer before protocolstate.Init registered dialers for the active ExecutionId; mixing execution ids between options used at Init time and options passed to GetRawHTTP.","commonSituations":"Embedding nuclei via lib/ and constructing protocol executors manually; reusing Configuration/ExecutorOptions objects across runs with fresh execution ids; refactors that changed where Init happens relative to first raw request compilation.","solutions":["Call protocolstate.Init(options) with the same Options whose ExecutionId is later found in ExecutorOptions.Options before issuing raw HTTP requests.","Use the standard runner (internal/runner) which performs Init up front.","Validate with protocolstate.ShouldInit(options.Options.ExecutionId) at the SDK boundary.","Never build ExecutorOptions with an ad-hoc ExecutionId that was never registered."],"exampleFix":"// before\nclient := httpclientpool.GetRawHTTP(exOpts) // panics\n\n// after\nif protocolstate.ShouldInit(exOpts.Options.ExecutionId) {\n    if err := protocolstate.Init(exOpts.Options); err != nil { return err }\n}\nclient := httpclientpool.GetRawHTTP(exOpts)","handlingStrategy":"validation","validationCode":"if protocolstate.ShouldInit(exOpts.Options.ExecutionId) {\n    if err := protocolstate.Init(exOpts.Options); err != nil { return err }\n}\nclient := httpclientpool.GetRawHTTP(exOpts)","typeGuard":null,"tryCatchPattern":"// panic by contract: validating dialer registration beforehand is the only correct guard.","preventionTips":["Init before first raw-HTTP use.","ExecutorOptions must carry the same ExecutionId used at Init.","In SDK flows, wrap the whole run (Init -> execute) so ordering is structural."],"tags":["panic","http","dialers","client-pool","sdk"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}