{"record":{"id":"7ea4dee731508c80","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-s-7ea4de","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/oracle/oracle.go","lineNumber":62,"sourceCode":"// IsOracle checks if a host is running an Oracle server\n// @example\n// ```javascript\n// const oracle = require('nuclei/oracle');\n// const isOracle = oracle.IsOracle('acme.com', 1521);\n// log(toJSON(isOracle));\n// ```\nfunc (c *OracleClient) IsOracle(ctx context.Context, host string, port int) (IsOracleResponse, error) {\n\texecutionId := ctx.Value(\"executionId\").(string)\n\treturn memoizedisOracle(ctx, executionId, host, port)\n}\n\n// @memo\nfunc isOracle(ctx context.Context, executionId string, host string, port int) (IsOracleResponse, error) {\n\tresp := IsOracleResponse{}\n\n\tdialer := protocolstate.GetDialersWithId(executionId)\n\tif dialer == nil {\n\t\treturn IsOracleResponse{}, 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\toracledbPlugin := oracledb.ORACLEPlugin{}\n\tservice, err := oracledbPlugin.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":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/oracle/oracle.go#L44-L80","documentation":"Thrown by the memoized Oracle detection (oracle.IsOracle) when protocolstate.GetDialersWithId(executionId) returns nil — no dialer set is registered for the executionId in the JS context. The TNS probe needs a TCP connection through nuclei's per-execution fastdialer (created by protocolstate.Init keyed on ExecutionId), so without initialization the probe fails before dialing.","triggerScenarios":"Running require('nuclei/oracle') code outside the nuclei engine: standalone goja, direct Go calls in unit tests, or custom SDK harnesses that never call protocolstate.Init; also an executionId in ctx that differs from the initialized one.","commonSituations":"Embedding or unit-testing the oracle lib; ported nuclei snippets executed in other runtimes; contexts reused after the engine rotated execution ids.","solutions":["Run scripts through the nuclei engine so dialers are initialized per execution","Embedders: protocolstate.Init(&types.Options{ExecutionId: id, ...}) before execution, same id in ctx under 'executionId'","Log and compare the executionId on both the Init side and the script side to rule out mismatch","Initialize protocolstate once in TestMain for library tests"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Go embedder guard\nif protocolstate.GetDialersWithId(executionId) == nil {\n    _ = protocolstate.Init(&types.Options{ExecutionId: executionId})\n}","typeGuard":null,"tryCatchPattern":"try { const r = oracle.IsOracle(host, port); } catch (e) { if (String(e).includes('dialers not initialized')) { log('run via nuclei engine'); return; } throw e; }","preventionTips":["Run oracle probes inside engine-managed executions","Embedders: protocolstate.Init per execution id before scripts","Keep executionId consistent between Init and the JS context","Cover the happy path with one engine-driven smoke test in CI"],"tags":["oracle","runtime-initialization","configuration","network"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}