projectdiscovery/nuclei · error

dialers not initialized for %s

Error message

dialers not initialized for %s

What it means

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.

Source

Thrown at pkg/js/libs/oracle/oracle.go:62

// IsOracle checks if a host is running an Oracle server
// @example
// ```javascript
// const oracle = require('nuclei/oracle');
// const isOracle = oracle.IsOracle('acme.com', 1521);
// log(toJSON(isOracle));
// ```
func (c *OracleClient) IsOracle(ctx context.Context, host string, port int) (IsOracleResponse, error) {
	executionId := ctx.Value("executionId").(string)
	return memoizedisOracle(ctx, executionId, host, port)
}

// @memo
func isOracle(ctx context.Context, executionId string, host string, port int) (IsOracleResponse, error) {
	resp := IsOracleResponse{}

	dialer := protocolstate.GetDialersWithId(executionId)
	if dialer == nil {
		return IsOracleResponse{}, fmt.Errorf("dialers not initialized for %s", executionId)
	}

	timeout := 5 * time.Second
	conn, err := dialer.Fastdialer.Dial(ctx, "tcp", net.JoinHostPort(host, strconv.Itoa(port)))
	if err != nil {
		return resp, err
	}
	defer func() {
		_ = conn.Close()
	}()

	oracledbPlugin := oracledb.ORACLEPlugin{}
	service, err := oracledbPlugin.Run(conn, timeout, plugins.Target{Host: host})
	if err != nil {
		return resp, err
	}
	if service == nil {
		return resp, nil

View on GitHub (pinned to 265b3a3dec)

Solutions

  1. Run scripts through the nuclei engine so dialers are initialized per execution
  2. Embedders: protocolstate.Init(&types.Options{ExecutionId: id, ...}) before execution, same id in ctx under 'executionId'
  3. Log and compare the executionId on both the Init side and the script side to rule out mismatch
  4. Initialize protocolstate once in TestMain for library tests
Defensive patterns

Strategy: validation

Validate before calling

// Go embedder guard
if protocolstate.GetDialersWithId(executionId) == nil {
    _ = protocolstate.Init(&types.Options{ExecutionId: executionId})
}

Try / catch

try { const r = oracle.IsOracle(host, port); } catch (e) { if (String(e).includes('dialers not initialized')) { log('run via nuclei engine'); return; } throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: Embedding or unit-testing the oracle lib; ported nuclei snippets executed in other runtimes; contexts reused after the engine rotated execution ids.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/7ea4dee731508c80. Report an issue: GitHub.