owasp-amass/amass · error
failed to extract the FQDN asset
Error message
failed to extract the FQDN asset
What it means
This error is thrown by the duckduckgo scrape plugin's check method when an event's Entity.Asset is not an *oamdns.FQDN. The plugin only processes FQDN assets; any other asset type reaching its handler fails the assertion and returns this error. It signals an event-routing/type mismatch rather than a scrape failure.
Source
Thrown at engine/plugins/scrape/duckduckgo.go:78
Transforms: []string{string(oam.FQDN)},
EventType: oam.FQDN,
Callback: d.check,
}); err != nil {
return err
}
d.log.Info("Plugin started")
return nil
}
func (d *duckDuckGo) Stop() {
d.log.Info("Plugin stopped")
}
func (d *duckDuckGo) check(e *et.Event) error {
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
if !ok {
return errors.New("failed to extract the FQDN asset")
}
if !support.HasSLDInScope(e) {
return nil
}
since, err := support.TTLStartTime(e.Session.Config(), string(oam.FQDN), string(oam.FQDN), d.name)
if err != nil {
return err
}
var names []*dbt.Entity
if !support.AssetMonitoredWithinTTL(e.Session, e.Entity, d.source, since) {
names = append(names, d.query(e, fqdn.Name)...)
support.MarkAssetMonitored(e.Session, e.Entity, d.source)
}
if len(names) > 0 {View on GitHub (pinned to 79299dce87)
Solutions
- Ensure the event reaching this plugin carries an *oamdns.FQDN asset (check the producing plugin's output types)
- Verify the event bus/multi-plugin subscription is not routing non-FQDN asset events to this plugin
- Return nil instead of an error for unsupported asset types if the plugin should silently ignore them
- Log the unexpected asset type before failing to identify which producer emits it
Example fix
// before
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
if !ok {
return errors.New("failed to extract the FQDN asset")
}
// after
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
if !ok {
return nil // ignore events without an FQDN asset
} Defensive patterns
Strategy: type-guard
Validate before calling
if fqdn, ok := e.Entity.Asset.(*oamdns.FQDN); !ok {
return nil // not an FQDN; skip
} Type guard
func isFQDN(e *et.Event) (*oamdns.FQDN, bool) {
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
return fqdn, ok
} Try / catch
// Go returns errors; handle at the handler boundary
if err := plugin.Check(e); err != nil {
if strings.Contains(err.Error(), "failed to extract the FQDN asset") {
continue // skip non-FQDN events
}
return err
} Prevention
- Subscribe plugins only to event/asset types they handle
- Use a shared type-guard helper in all check methods
- Return nil instead of errors for unsupported-but-expected asset types
- Log unexpected asset types to detect routing problems
When it happens
Trigger: An event whose Entity.Asset is not *oamdns.FQDN (e.g. *network.IPAddress, Netblock, service assets) is dispatched to the duckduckgo plugin's check via the event bus or a direct handler call.
Common situations: Plugins registered to receive too-broad a set of event/asset types; custom code pushing non-FQDN events directly into the pipeline; misconfigured event subscriptions where the plugin subscribes to events it cannot handle.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/d4f4b6fcd526aaa8.
Report an issue: GitHub.