projectdiscovery/subfinder · error
timeout cannot be zero
Error message
timeout cannot be zero
What it means
Sanity check in Options.validateOptions: the -timeout value per source query is zero (unset or explicitly 0), which would make every passive-source HTTP request fail or hang immediately. A positive timeout is required before enumeration begins.
Solutions
- Supply a positive timeout such as -timeout 30 (seconds)
- When constructing Options in code, default options.Timeout to a positive value before validation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/runner/validate.go:35 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of projectdiscovery/subfinder@7a0b91f0fa (2026-09-06).
Data as JSON: /api/errors/32f1f59172896d65.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/runner/validate.go:35
// validateOptions validates the configuration options passed
func (options *Options) validateOptions() error {
// Check if domain, list of domains, or stdin info was provided.
// If none was provided, then return.
if len(options.Domain) == 0 && options.DomainsFile == "" && !options.Stdin {
return errors.New("no input list provided")
}
// Both verbose and silent flags were used
if options.Verbose && options.Silent {
return errors.New("both verbose and silent mode specified")
}
// Validate threads and options
if options.Threads == 0 {
return errors.New("threads cannot be zero")
}
if options.Timeout == 0 {
return errors.New("timeout cannot be zero")
}
// Always remove wildcard with hostip
if options.HostIP && !options.RemoveWildcard {
return errors.New("hostip flag must be used with RemoveWildcard option")
}
// The per-source results limit cannot be negative.
if options.MaxResults < 0 {
return fmt.Errorf("max-results cannot be negative")
}
// The response body size limit cannot be negative.
if options.MaxResponseBodySize < 0 {
return fmt.Errorf("response-size-read cannot be negative")
}
if options.Match != nil {View on GitHub (pinned to 7a0b91f0fa)