{"record":{"id":"e45ca3289c5e9c86","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-s-e45ca3","errorCode":null,"errorMessage":"dialers not initialized for %s","messagePattern":"dialers not initialized for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/pop3/pop3.go","lineNumber":48,"sourceCode":"// IsPOP3 checks if a host is running a POP3 server.\n// @example\n// ```javascript\n// const pop3 = require('nuclei/pop3');\n// const isPOP3 = pop3.IsPOP3('acme.com', 110);\n// log(toJSON(isPOP3));\n// ```\nfunc IsPOP3(ctx context.Context, host string, port int) (IsPOP3Response, error) {\n\texecutionId := ctx.Value(\"executionId\").(string)\n\treturn memoizedisPoP3(ctx, executionId, host, port)\n}\n\n// @memo\nfunc isPoP3(ctx context.Context, executionId string, host string, port int) (IsPOP3Response, error) {\n\tresp := IsPOP3Response{}\n\n\tdialer := protocolstate.GetDialersWithId(executionId)\n\tif dialer == nil {\n\t\treturn IsPOP3Response{}, fmt.Errorf(\"dialers not initialized for %s\", executionId)\n\t}\n\n\ttimeout := 5 * time.Second\n\tconn, err := dialer.Fastdialer.Dial(ctx, \"tcp\", net.JoinHostPort(host, strconv.Itoa(port)))\n\tif err != nil {\n\t\treturn resp, err\n\t}\n\tdefer func() {\n\t\t_ = conn.Close()\n\t}()\n\n\tpop3Plugin := pop3.POP3Plugin{}\n\tservice, err := pop3Plugin.Run(conn, timeout, plugins.Target{Host: host})\n\tif err != nil {\n\t\treturn resp, err\n\t}\n\tif service == nil {\n\t\treturn resp, nil","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/pop3/pop3.go#L30-L66","documentation":"Thrown by the memoized POP3 detection (pop3.IsPOP3) when protocolstate.GetDialersWithId(executionId) returns nil — no dialer set exists for the executionId in the JS context. The POP3 banner grab needs a TCP connection through nuclei's per-execution fastdialer, which is created only by protocolstate.Init keyed on options.ExecutionId; without it the probe fails before dialing and the memoized error is returned to every subsequent call for that host:port.","triggerScenarios":"Executing require('nuclei/pop3') code outside the nuclei engine: standalone goja, Go unit tests calling isPoP3 directly, custom SDK harnesses without engine setup, or an executionId mismatch between the ctx value and the Init-time id.","commonSituations":"Library embedding and testing; ported snippets in foreign runtimes; contexts reused after execution-id rotation or dialer rebuild on policy change.","solutions":["Run scripts through the nuclei engine (CLI / lib/nuclei) which registers dialers per execution id","Embedders: protocolstate.Init(&types.Options{ExecutionId: id, ...}) before execution; identical id under ctx key 'executionId'","Verify the id end-to-end by logging it on both sides","In tests, initialize protocolstate once (TestMain) rather than mocking the dialer"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Go embedder guard\nif protocolstate.ShouldInit(executionId) {\n    _ = protocolstate.Init(&types.Options{ExecutionId: executionId})\n}","typeGuard":null,"tryCatchPattern":"try { const r = pop3.IsPOP3(host, port); } catch (e) { if (String(e).includes('dialers not initialized')) { log('engine not initialized'); return; } throw e; }","preventionTips":["Execute pop3 probes within nuclei engine runs only","Embedders: initialize dialers per execution id before scripts","Note memoization: the failure is cached per host:port for the execution — fix init early","Validate embedding setups with an engine-driven smoke template"],"tags":["pop3","runtime-initialization","configuration","network"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}