owasp-amass/amass · error

unable to parse engine API URI query parameters: %v

Error message

unable to parse engine API URI query parameters: %v

What it means

The engine API URI contains a query string (u.RawQuery != "") but url.ParseQuery failed to decode it — typically malformed percent-encoding or an invalid separator sequence. The query params are meant to be re-encoded into EngAPI.Options; the parse error is wrapped with %v.

Source

Thrown at config/engineapi.go:151

	api := &EngAPI{
		URL:      apiURI,
		Scheme:   u.Scheme,
		Username: u.User.Username(),
		Path:     apiURIPath,
		Host:     u.Hostname(), // Hostname without port
		Port:     u.Port(),     // Get port
	}
	// If a password is set in the URI, it's extracted and stored in the EngAPI object.
	password, isSet := u.User.Password()
	if isSet {
		api.Password = password
	}
	// If there are query parameters present in the URI, they are parsed and encoded as a string,
	// then stored in the EngAPI object's Options field. If parsing fails, an error is returned.
	if u.RawQuery != "" {
		queryParams, err := url.ParseQuery(u.RawQuery)
		if err != nil {
			return fmt.Errorf("unable to parse engine API URI query parameters: %v", err)
		}
		api.Options = queryParams.Encode() // Encode url.Values to a string
	}
	// The Config's EngineAPI field is set to the newly created EngAPI object.
	c.EngineAPI = api
	return nil
}

View on GitHub (pinned to 79299dce87)

Solutions

  1. Percent-encode special characters in the URI query correctly (avoid stray '%' or unencoded separators)
  2. Simplify or remove unnecessary query parameters from the engine URI
  3. Wrap with %w so the underlying url.EscapeError (naming the bad escape) reaches the user
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at config/engineapi.go:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06). Data as JSON: /api/errors/9dfc94c1cd262414. Report an issue: GitHub.