{"record":{"id":"ead3896ff98cd4dd","repo":"owasp-amass/amass","slug":"failed-to-extract-the-ip-address","errorCode":null,"errorMessage":"failed to extract the IP address","messagePattern":"failed to extract the IP address","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/net/addr.go","lineNumber":119,"sourceCode":"\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue loop\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn results, nil\n}\n\nfunc getAddr(ctx context.Context, db repository.Repository, ip *dbt.Entity, since time.Time) (*network.IPAddress, error) {\n\tif entity, err := db.FindEntityById(ctx, ip.ID); err == nil && entity != nil {\n\t\tif ip, ok := entity.Asset.(*network.IPAddress); ok {\n\t\t\treturn ip, nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"failed to extract the IP address\")\n}\n\nfunc oneMoreName(ctx context.Context, db repository.Repository, fqdn *dbt.Entity, since time.Time) (*network.IPAddress, error) {\n\tif edges, err := db.OutgoingEdges(ctx, fqdn, since, \"dns_record\"); err == nil && len(edges) > 0 {\n\t\tfor _, edge := range edges {\n\t\t\tif rel, ok := edge.Relation.(*oamdns.BasicDNSRelation); ok && (rel.Header.RRType == 1 || rel.Header.RRType == 28) {\n\t\t\t\treturn getAddr(ctx, db, edge.ToEntity, since)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, errors.New(\"failed to traverse the FQDN\")\n}\n\nfunc cnameQuery(ctx context.Context, db repository.Repository, fqdn *dbt.Entity, since time.Time) (*network.IPAddress, error) {\n\tset := stringset.New()\n\tdefer set.Close()\n\n\tnext := fqdn","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/internal/net/addr.go#L101-L137","documentation":"getAddr failed to obtain an IPAddress asset: either db.FindEntityById returned an error/no entity, or the entity's Asset could not be asserted to *network.IPAddress. It is a combined lookup-then-type-guard failure, so the ID is stale/unknown or the entity is not an IP address. Callers: NamesToAddrs, oneMoreName, cnameQuery.","triggerScenarios":"Thrown at internal/net/addr.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the entity ID being passed actually refers to a previously stored IPAddress asset","Check that the graph/repository connection is healthy so FindEntityById is not erroring","At call sites, treat this as 'no address resolved' and continue with other DNS edges rather than aborting the traversal"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}