{"record":{"id":"22d4fcaa852cad2b","repo":"owasp-amass/amass","slug":"failed-to-obtain-the-amass-output-directory","errorCode":null,"errorMessage":"failed to obtain the Amass output directory","messagePattern":"failed to obtain the Amass output directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/plugins/api/rdap/plugin.go","lineNumber":70,"sourceCode":"\t\tname:   \"RDAP\",\n\t\trlimit: rate.NewLimiter(limit, 1),\n\t\tsource: &et.Source{\n\t\t\tName:       \"RDAP\",\n\t\t\tConfidence: 100,\n\t\t},\n\t}\n}\n\nfunc (rd *rdapPlugin) Name() string {\n\treturn rd.name\n}\n\nfunc (rd *rdapPlugin) Start(r et.Registry) error {\n\trd.log = r.Log().WithGroup(\"plugin\").With(\"name\", rd.name)\n\n\toutdir := config.OutputDirectory()\n\tif outdir == \"\" {\n\t\treturn errors.New(\"failed to obtain the Amass output directory\")\n\t}\n\n\tc := cache.NewDiskCache()\n\tif c == nil {\n\t\treturn errors.New(\"failed to create the RDAP disk cache\")\n\t}\n\tc.Dir = filepath.Join(outdir, \".openrdap\")\n\n\tbs := &bootstrap.Client{Cache: c}\n\ttlsConfig := &tls.Config{InsecureSkipVerify: true}\n\ttransport := &http.Transport{\n\t\tProxy:           http.ProxyFromEnvironment,\n\t\tTLSClientConfig: tlsConfig,\n\t}\n\tbs.HTTP = &http.Client{\n\t\tTransport: transport,\n\t}\n\thttpClient := &http.Client{","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/api/rdap/plugin.go#L52-L88","documentation":"Returned by rdapPlugin.Start when config.OutputDirectory() yields an empty string, meaning no output directory is configured (or it could not be resolved) for the Amass run. The RDAP plugin refuses to start because its disk cache (outdir/.openrdap) cannot be placed.","triggerScenarios":"Plugin startup (rdapPlugin.Start) when config.OutputDirectory() returns an empty string — typically when the Amass config's output directory setting is unset or resolves to nothing.","commonSituations":"Missing or empty output_directory in the Amass configuration file; running the engine without a loaded config providing default directories; HOME-derived default failing to resolve.","solutions":["Set the output directory in the Amass configuration file so config.OutputDirectory() returns a valid path","Verify the config file is actually being loaded (correct -config path)","Ensure the environment (e.g. HOME) allows deriving the default output directory","Print/log config.OutputDirectory() at startup to confirm it is non-empty"],"exampleFix":"// before\noutdir := config.OutputDirectory()\n// after\noutdir := config.OutputDirectory()\nif outdir == \"\" {\n    outdir = filepath.Join(config.DefaultOutputDirectory(), \"rdap\")\n}","handlingStrategy":"fallback","validationCode":"if cfg.OutputDirectory == \"\" {\n    return errors.New(\"output directory must be set in the Amass config\")\n}","typeGuard":null,"tryCatchPattern":"if err := plugin.Start(registry); err != nil {\n    if strings.Contains(err.Error(), \"output directory\") {\n        log.Warn(\"rdap plugin disabled: no output directory configured\")\n        return // continue without plugin\n    }\n    return err\n}","preventionTips":["Always set the output directory in the Amass configuration file","Verify config file is loaded (correct path passed to the engine)","Log config.OutputDirectory() at startup to catch empty values early"],"tags":["plugin","rdap","config","filesystem"],"backgroundTag":"missing-config-value","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}