{"record":{"id":"243431f4671caf9e","repo":"tailscale/tailscale","slug":"failed-to-create-audit-log-store-at-q-w","errorCode":null,"errorMessage":"failed to create audit log store at %q: %w","messagePattern":"failed to create audit log store at %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ipn/auditlog/store.go","lineNumber":59,"sourceCode":"\t}\n}\n\n// newDefaultLogStore returns a new [LogStore] for the current platform.\nfunc newDefaultLogStore(logf logger.Logf) (LogStore, error) {\n\tpath, err := storeFilePath.GetErr(DefaultStoreFilePath)\n\tif err != nil {\n\t\t// This indicates that the auditlog package was not omitted from the build\n\t\t// on a platform without a default store path and that [SetStoreFilePath]\n\t\t// was not called to set a platform-specific store path.\n\t\t//\n\t\t// This is not expected to happen, but if it does, let's log it\n\t\t// and use an in-memory store as a fallback.\n\t\tlogf(\"[unexpected] failed to get audit log store path: %v\", err)\n\t\treturn NewLogStore(must.Get(store.New(logf, \"mem:auditlog\"))), nil\n\t}\n\tfs, err := store.New(logf, path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create audit log store at %q: %w\", path, err)\n\t}\n\treturn NewLogStore(fs), nil\n}\n","sourceCodeStart":41,"sourceCodeEnd":63,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/ipn/auditlog/store.go#L41-L63","documentation":"Raised by newDefaultLogStore when the file-backed audit log store cannot be opened at the resolved path. It wraps the filesystem error and names the path.","triggerScenarios":"Thrown at ipn/auditlog/store.go:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the parent directory and grant write permission.","Remove a corrupt audit-log.json so it is recreated."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}