{"record":{"id":"cc0797452fddbd01","repo":"owasp-amass/amass","slug":"failed-to-create-the-rdap-disk-cache","errorCode":null,"errorMessage":"failed to create the RDAP disk cache","messagePattern":"failed to create the RDAP disk cache","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/plugins/api/rdap/plugin.go","lineNumber":75,"sourceCode":"\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{\n\t\tTransport: transport,\n\t}\n\trd.client = &rdap.Client{\n\t\tHTTP:      httpClient,\n\t\tBootstrap: bs,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/api/rdap/plugin.go#L57-L93","documentation":"Returned by rdapPlugin.Start when cache.NewDiskCache() returns nil, i.e. the RDAP bootstrap disk cache could not be constructed. It is a generic nil-guard on the cache constructor, so the underlying cause (filesystem or environment problem) is not captured in the error itself.","triggerScenarios":"rdapPlugin.Start calls cache.NewDiskCache() and it returns nil — e.g. the cache library fails to allocate/initialize its default configuration.","commonSituations":"Incompatible or broken openrdap/cache dependency version where NewDiskCache can return nil; resource/permission problems at default cache location; defective build.","solutions":["Check the openrdap cache dependency version and update/rebuild","Verify the process can write to the default cache directory before plugin start","Fall back to an in-memory cache if disk cache construction fails","Report upstream if NewDiskCache nil-returns with valid inputs"],"exampleFix":"// before\nc := cache.NewDiskCache()\n// after\nc := cache.NewDiskCache()\nif c == nil {\n    c = cache.NewMemoryCache()\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":"func cacheReady(c *cache.DiskCache) bool { return c != nil }","tryCatchPattern":"if err := plugin.Start(registry); err != nil {\n    if strings.Contains(err.Error(), \"disk cache\") {\n        log.Warn(\"rdap plugin disabled: cache init failed\")\n        return\n    }\n    return err\n}","preventionTips":["Pin and test the openrdap cache dependency version","Ensure the process has write access to the intended cache directory","Fall back to a memory cache when disk cache creation fails"],"tags":["plugin","rdap","cache","initialization"],"backgroundTag":"module-init-failed","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}