owasp-amass/amass · warning
zero locations found
Error message
zero locations found
What it means
getContactRecordLocations queries the graph DB for outgoing 'location' edges from a contact record entity within 5 seconds. If the query errors or no edges exist, it returns this error since no locations can be derived for the contact record.
Source
Thrown at engine/plugins/horizontals/plugin.go:335
if len(results) == 0 {
return nil, errors.New("failed to extract the organization")
}
return results, nil
}
func (h *horizPlugin) getContactRecordLocations(sess et.Session, cr *dbt.Entity) ([]*dbt.Entity, error) {
since, err := support.TTLStartTime(sess.Config(),
string(oam.ContactRecord), string(oam.Location), h.name)
if err != nil {
return nil, err
}
ctx, cancel := context.WithTimeout(sess.Ctx(), 5*time.Second)
defer cancel()
edges, err := sess.DB().OutgoingEdges(ctx, cr, since, "location")
if err != nil || len(edges) == 0 {
return nil, errors.New("zero locations found")
}
seconds := 5 * len(edges)
lctx, cancel := context.WithTimeout(sess.Ctx(), time.Duration(seconds)*time.Second)
defer cancel()
var results []*dbt.Entity
for _, edge := range edges {
to, err := sess.DB().FindEntityById(lctx, edge.ToEntity.ID)
if err != nil {
continue
}
if _, valid := to.Asset.(*oamcon.Location); valid {
results = append(results, to)
}
}
View on GitHub (pinned to 79299dce87)
Solutions
- Ensure data source plugins that produce location edges run before horizontals
- Retry the enumeration so location data gets collected and stored
- Increase the 5s context timeout if the DB query times out on large graphs
- Handle/skip contact records without locations gracefully in calling code
Defensive patterns
Strategy: try-catch
Try / catch
locs, err := getContactRecordLocations(sess, cr)
if err != nil {
if errors.Is(err, errZeroLocations) {
return nil // no data yet; not fatal
}
return err
} Prevention
- Run location-producing data sources before horizontals processing
- Re-run enumerations so missing graph data accumulates
- Monitor DB query latency; raise the 5s timeout on large graphs
When it happens
Trigger: lookupContactRecordOrgsAndLocations processes a contact record that has no location edges in the graph (nothing emitted a location relation for it), or the OutgoingEdges query fails/times out within 5s.
Common situations: First-time enumeration where location data has not yet been gathered; data sources that do not provide contact locations; database timeouts on large graphs.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- failed to extract the locations
- failed to obtain the Amass output directory
- failed to create the RDAP disk cache
- failed to obtain the subject contact record
- failed to obtain the subject organizations
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/6cb94fba7dce4c60.
Report an issue: GitHub.