{"record":{"id":"fde5d63f5545af18","repo":"projectdiscovery/subfinder","slug":"could-not-init-passive-session-for-s-s","errorCode":null,"errorMessage":"could not init passive session for %s: %s","messagePattern":"could not init passive session for (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/passive/passive.go","lineNumber":75,"sourceCode":"\tgo func() {\n\t\tdefer close(results)\n\n\t\tvar enumerateOptions EnumerationOptions\n\t\tfor _, enumerateOption := range options {\n\t\t\tenumerateOption(&enumerateOptions)\n\t\t}\n\n\t\tmultiRateLimiter, err := a.buildMultiRateLimiter(ctx, rateLimit, enumerateOptions.customRateLimiter)\n\t\tif err != nil {\n\t\t\tresults <- subscraping.Result{\n\t\t\t\tType: subscraping.Error, Error: fmt.Errorf(\"could not init multi rate limiter for %s: %s\", domain, err),\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tsession, err := subscraping.NewSession(domain, proxy, multiRateLimiter, timeout)\n\t\tif err != nil {\n\t\t\tresults <- subscraping.Result{\n\t\t\t\tType: subscraping.Error, Error: fmt.Errorf(\"could not init passive session for %s: %s\", domain, err),\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tdefer session.Close()\n\t\tsession.MaxResults = enumerateOptions.maxResults\n\t\tsession.MaxResponseBodySize = enumerateOptions.maxResponseBodySize\n\n\t\tctx, cancel := context.WithTimeout(ctx, maxEnumTime)\n\n\t\twg := &sync.WaitGroup{}\n\t\t// Run each source in parallel on the target domain\n\t\tfor _, runner := range a.sources {\n\t\t\twg.Add(1)\n\t\t\tgo func(source subscraping.Source) {\n\t\t\t\tdefer wg.Done()\n\t\t\t\tctxWithValue := context.WithValue(ctx, subscraping.CtxSourceArg, source.Name())\n\t\t\t\tsourceResults := source.Run(ctxWithValue, domain, session)\n\t\t\t\tfor resp := range sourceResults {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/projectdiscovery/subfinder/blob/7a0b91f0fac01b62c65328bd771a3560ae611d6a/pkg/passive/passive.go#L57-L93","documentation":"Runtime error emitted on the results channel by Agent.EnumerateSubdomainsWithCtx when subscraping.NewSession fails for the given domain — usually because an HTTP client/proxy (the -proxy URL) could not be constructed. Enumeration for that domain stops; the error is wrapped with the domain name for context.","triggerScenarios":"Thrown at pkg/passive/passive.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the interpolated cause; most often it is an invalid or unreachable -proxy URL","Fix or omit the proxy setting so subscraping.NewSession can build its client","Handle subscraping.Error results when consuming the channel so this failure is reported instead of silently ending output"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a0b91f0fac01b62c65328bd771a3560ae611d6a","analyzedAt":"2026-09-06T23:52:02.109Z","contentChangedAt":"2026-09-06T23:52:02.109Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}