projectdiscovery/nuclei · error
cannot load metadata cache into a modified index
Error message
cannot load metadata cache into a modified index
What it means
Error "cannot load metadata cache into a modified index" thrown in projectdiscovery/nuclei.
Source
Thrown at pkg/catalog/index/index.go:265
if err := os.Rename(tmpFile, i.cacheFile); err != nil {
_ = os.Remove(tmpFile)
return err
}
i.dirty = false
return nil
}
// Load loads the cache from disk using gob decoding.
func (i *Index) Load() error {
i.mu.Lock()
defer i.mu.Unlock()
if i.dirty {
return errors.New("cannot load metadata cache into a modified index")
}
file, err := os.Open(i.cacheFile)
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
defer func() { _ = file.Close() }()
var snapshot cacheSnapshot
decoder := gob.NewDecoder(file)
if err := decoder.Decode(&snapshot); err != nil {
_ = file.Close()
_ = os.Remove(i.cacheFile)View on GitHub (pinned to 265b3a3dec)
When it happens
Trigger: Thrown at pkg/catalog/index/index.go:265 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/977e61fb66de7255.
Report an issue: GitHub.