fatedier/frp · error · configmgmt.ErrApplyConfig
apply config failed: visitor %q not found in store after mut
Error message
apply config failed: visitor %q not found in store after mutation
What it means
Internal consistency check in withStoreVisitorMutationAndReload: after mutating and reloading, GetVisitor(name) still returns nil, so it errors with ErrApplyConfig. Means the visitor written moments earlier disappeared from the store — concurrent mutation or a flaky store backend.
Source
Thrown at client/config_manager.go:437
) (v1.VisitorConfigurer, error) {
m.svr.reloadMu.Lock()
defer m.svr.reloadMu.Unlock()
storeSource := m.svr.storeSource
if storeSource == nil {
return nil, fmt.Errorf("%w: store API is disabled", configmgmt.ErrStoreDisabled)
}
if err := fn(storeSource); err != nil {
return nil, err
}
if err := m.svr.reloadConfigFromSourcesLocked(); err != nil {
return nil, fmt.Errorf("%w: failed to apply config: %v", configmgmt.ErrApplyConfig, err)
}
persisted := storeSource.GetVisitor(name)
if persisted == nil {
return nil, fmt.Errorf("%w: visitor %q not found in store after mutation", configmgmt.ErrApplyConfig, name)
}
return persisted.Clone(), nil
}
func (m *serviceConfigManager) validateStoreProxyConfigurer(cfg v1.ProxyConfigurer) error {
if cfg == nil {
return fmt.Errorf("invalid proxy config")
}
runtimeCfg := cfg.Clone()
if runtimeCfg == nil {
return fmt.Errorf("invalid proxy config")
}
runtimeCfg.Complete()
return validation.ValidateProxyConfigurerForClient(runtimeCfg)
}
func (m *serviceConfigManager) validateStoreVisitorConfigurer(cfg v1.VisitorConfigurer) error {
if cfg == nil {View on GitHub (pinned to 6c8a8d0a97)
Solutions
- Retry the mutation
- Serialize visitor mutations in your tooling
- Ensure a single frpc instance owns the store file
Defensive patterns
Strategy: retry
Prevention
- Single writer for visitor mutations
- One frpc process per store file
When it happens
Trigger: Concurrent admin API writes racing on the same visitor; an external process modifying the store file at common.store.path between write and read-back.
Common situations: Parallel automation jobs; shared store file across processes; storage corruption.
Related errors
- apply config failed: proxy %q not found in store after mutat
- invalid argument: visitor name in URL must match name in bod
- store disabled: store API is disabled
- apply config failed: failed to apply config: %v
- invalid proxy config
AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15).
Data as JSON: /api/errors/01204967a25c1b4e.
Report an issue: GitHub.