hasura/graphql-engine · error
could not find move targets: %w
Error message
could not find move targets: %w
What it means
moveFiles wraps any failure of findMoveTargets: glob evaluation errors, zero glob matches, path-resolution failures, or disallowed moves (errors 400–406). It is a pure wrapper adding the 'could not find move targets' context, so the real cause is in the wrapped error chain.
Source
Thrown at cli/plugins/move.go:174
)
}
return m, true, nil
}
func isMoveAllowed(fromBase, toBase string, m move) bool {
_, okFrom := IsSubPath(fromBase, m.from)
_, okTo := IsSubPath(toBase, m.to)
return okFrom && okTo
}
func moveFiles(fromDir, toDir string, fo FileOperation) error {
var op errors.Op = "plugins.moveFiles"
moves, err := findMoveTargets(fromDir, toDir, fo)
if err != nil {
return errors.E(op, fmt.Errorf("could not find move targets: %w", err))
}
for _, m := range moves {
err := os.MkdirAll(filepath.Dir(m.to), 0o755)
if err != nil {
return errors.E(
op,
fmt.Errorf("failed to create move path %q: %w", filepath.Dir(m.to), err),
)
}
err = renameOrCopy(m.from, m.to)
if err != nil {
return errors.E(
op,
fmt.Errorf("could not rename/copy file from %q to %q: %w", m.from, m.to, err),
)
}View on GitHub (pinned to 724551b9ae)
Solutions
- Read the wrapped error (%w chain) to identify which underlying failure (400–406) occurred and apply its fix
- Validate the plugin manifest's FileOperations against the actual archive contents before install
- Refresh the plugin index and retry
- If embedding the package, pre-validate From/To with IsSubPath and filepath.Glob
Defensive patterns
Strategy: try-catch
Try / catch
if err := moveFiles(fromDir, toDir, fo); err != nil {
var inner = errors.Unwrap(err)
for inner != nil { log.Println(inner); inner = errors.Unwrap(inner) }
// branch on the root cause (glob, no-match, subpath, abs) before retrying
} Prevention
- Always log the full unwrapped chain for this wrapper
- Pre-validate globs and subpaths (see 400/401/402/406) before install
When it happens
Trigger: Any of: invalid From glob, no glob matches, filepath.Abs/getcwd failure, or a move rejected by isMoveAllowed during a plugin install/move operation.
Common situations: Plugin install failing due to a mismatched manifest; changed archive layout between plugin versions; path traversal guard tripping on a hand-written manifest.
Related errors
- could not get files using a glob string: %w
- no files in the plugin archive matched the glob pattern=%s
- failed moving files: %w
- failed to move files: %w
- failed to create a symlink from %q to %q: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/800a94be500de7ba.
Report an issue: GitHub.