projectdiscovery/nuclei · error

no navigation action found

Error message

no navigation action found

What it means

extractBaseURLFromActions derives a template's base URL by scanning its steps for an ActionNavigate action and taking the scheme+host of its url arg. A headless template whose steps contain no navigate action yields no base URL, so request compilation fails with 'no navigation action found'.

Source

Thrown at pkg/protocols/headless/request.go:131

		}
	}

	return nil
}

// This function extracts the base URL from actions.
func extractBaseURLFromActions(steps []*engine.Action) (string, error) {
	for _, action := range steps {
		if action.ActionType.ActionType == engine.ActionNavigate {
			navigateURL := action.GetArg("url")
			url, err := urlutil.Parse(navigateURL)
			if err != nil {
				return "", errors.Errorf("could not parse URL '%s': %s", navigateURL, err.Error())
			}
			return fmt.Sprintf("%s://%s", url.Scheme, url.Host), nil
		}
	}
	return "", errors.New("no navigation action found")
}

func (request *Request) executeRequestWithPayloads(input *contextargs.Context, payloads map[string]interface{}, previous output.InternalEvent, interactshURLs []string, callback protocols.OutputEventCallback) error {
	instance, err := request.options.Browser.NewInstance()
	if err != nil {
		request.options.Output.Request(request.options.TemplatePath, input.MetaInput.Input, request.Type().String(), err)
		request.options.Progress.IncrementFailedRequestsBy(1)
		return errors.Wrap(err, errCouldNotGetHtmlElement)
	}
	defer func() {
		_ = instance.Close()
	}()

	instance.SetInteractsh(request.options.Interactsh)

	if _, err := url.Parse(input.MetaInput.Input); err != nil {
		request.options.Output.Request(request.options.TemplatePath, input.MetaInput.Input, request.Type().String(), err)
		request.options.Progress.IncrementFailedRequestsBy(1)

View on GitHub (pinned to 265b3a3dec)

Solutions

  1. Add a first step `action: navigate` with `url: '{{BaseURL}}'`
  2. Validate the template to confirm the navigate action parses correctly

Example fix

# before
steps:
  - action: extract
    selector: 'h1'

# after
steps:
  - action: navigate
    url: '{{BaseURL}}'
  - action: extract
    selector: 'h1'
Defensive patterns

Strategy: validation

Validate before calling

hasNavigate := false
for _, a := range request.Steps {
    if a.ActionType.ActionType == engine.ActionNavigate {
        hasNavigate = true
        break
    }
}
if !hasNavigate {
    return errors.New("headless template needs a navigate action")
}

Prevention

When it happens

Trigger: A headless template whose steps start with extract/click/script etc. but never include `action: navigate` with a `url` arg. Nuclei does not imply an initial navigation.

Common situations: Assuming the browser opens the target implicitly; refactoring a workflow and deleting the navigate step as 'redundant'; building headless steps by copying fragment examples.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/e5c2d56dd75b6230. Report an issue: GitHub.