{"record":{"id":"61c85aff7db153d2","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-s-61c85a","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/oracledialer.go","lineNumber":27,"sourceCode":"\t\"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate\"\n)\n\n// oracleCustomDialer implements the dialer interface expected by go-ora\ntype oracleCustomDialer struct {\n\texecutionId string\n\tctx         context.Context\n}\n\nfunc (o *oracleCustomDialer) dialWithCtx(ctx context.Context, network, address string) (net.Conn, error) {\n\tif ctx == nil {\n\t\tctx = o.ctx\n\t}\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\tdialers := protocolstate.GetDialersWithId(o.executionId)\n\tif dialers == nil {\n\t\treturn nil, fmt.Errorf(\"dialers not initialized for %s\", o.executionId)\n\t}\n\tif !protocolstate.IsHostAllowed(o.executionId, address) {\n\t\t// host is not valid according to network policy\n\t\treturn nil, protocolstate.ErrHostDenied.Msgf(address)\n\t}\n\treturn dialers.Fastdialer.Dial(ctx, network, address)\n}\n\nfunc (o *oracleCustomDialer) Dial(network, address string) (net.Conn, error) {\n\treturn o.dialWithCtx(o.ctx, network, address)\n}\n\nfunc (o *oracleCustomDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) {\n\tbaseCtx := o.ctx\n\tif baseCtx == nil {\n\t\tbaseCtx = context.Background()\n\t}\n\tctx, cancel := context.WithTimeout(baseCtx, timeout)","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/oracle/oracledialer.go#L9-L45","documentation":"Thrown by oracleCustomDialer.dialWithCtx — the net.Dialer shim that go-ora's connector uses for every connection — when protocolstate.GetDialersWithId(o.executionId) returns nil. The executionId is captured when the OracleClient installs the custom dialer, so the error means that execution has no registered dialer set (protocolstate.Init never ran for it). Because ConnectWithDSN/ExecuteQueryWithDSN skip the IsOracle probe, this is the first dialer-dependent error hit on those paths.","triggerScenarios":"Calling oracle.ConnectWithDSN or ExecuteQueryWithDSN from a JS context whose executionId lacks initialized dialers: standalone goja runtimes, direct Go calls in tests, custom SDK harnesses, or a stale executionId captured by a long-lived OracleClient after the engine rotated ids.","commonSituations":"Embedding the oracle lib outside the nuclei engine; unit tests exercising DSN flows; reusing an OracleClient instance across executions where the dialer map was rebuilt (policy change triggers dialers.Delete + re-Init).","solutions":["Run scripts through the nuclei engine so each execution id has dialers registered via protocolstate.Init","Embedders: call protocolstate.Init(&types.Options{ExecutionId: id, ...}) before any Oracle DSN call, with the same id in ctx","Do not cache OracleClient across different executions — the dialer bakes in the old executionId; create a fresh client per script run","After changing network policy options (RestrictLocalNetworkAccess/ExcludeTargets), ensure Init ran again for the current execution id"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Go embedder: dialers must exist before any DSN-based oracle call\nif protocolstate.GetDialersWithId(executionId) == nil {\n    _ = protocolstate.Init(&types.Options{ExecutionId: executionId})\n}","typeGuard":null,"tryCatchPattern":"try { client.ConnectWithDSN(dsn); } catch (e) { if (String(e).includes('dialers not initialized')) { /* engine-less or stale client: re-init runtime, recreate client */ } else { throw e; } }","preventionTips":["Create a fresh OracleClient per execution — it bakes the executionId into its dialer","Run DSN flows through engine-initialized runtimes only","Re-run protocolstate.Init after network-policy changes rebuild dialers","In tests, init dialers before exercising ConnectWithDSN/ExecuteQueryWithDSN"],"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"}