tailscale/tailscale · error
NewFileStore(%q): %w
Error message
NewFileStore(%q): %w
What it means
Raised in maybeMigrateLocalStateFile when migrating a plaintext state file to TPM-sealed form, and the existing plaintext file at path cannot be opened as a FileStore. The source of the migration is unreadable or malformed, so the migration is aborted before any TPM store is created.
Source
Thrown at ipn/store/stores.go:302
if isTPM == toTPM {
// No migration needed.
return nil
}
newTPMStore, ok := knownStores[TPMPrefix]
if !ok {
return errors.New("this build does not support TPM integration")
}
// Open from (old format) and to (new format) stores for migration. The
// "to" store will be at tmpPath.
var from, to ipn.StateStore
tmpPath := path + ".tmp"
if toTPM {
// Migrate plaintext file to be TPM-sealed.
from, err = NewFileStore(logf, path)
if err != nil {
return fmt.Errorf("NewFileStore(%q): %w", path, err)
}
to, err = newTPMStore(logf, TPMPrefix+tmpPath)
if err != nil {
return fmt.Errorf("newTPMStore(%q): %w", tmpPath, err)
}
} else {
// Migrate TPM-selaed file to plaintext.
from, err = newTPMStore(logf, TPMPrefix+path)
if err != nil {
return fmt.Errorf("newTPMStore(%q): %w", path, err)
}
to, err = NewFileStore(logf, tmpPath)
if err != nil {
return fmt.Errorf("NewFileStore(%q): %w", tmpPath, err)
}
}
defer os.Remove(tmpPath)
View on GitHub (pinned to 6e0912f979)
Solutions
- Creating the file-backed state store failed; check the state file path is writable and the directory exists.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at ipn/store/stores.go:302 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tailscale/tailscale@6e0912f979 (2026-08-18).
Data as JSON: /api/errors/9975c25185ce3645.
Report an issue: GitHub.