{"record":{"id":"e39446a91dd5d4a9","repo":"gatsbyjs/gatsby","slug":"error-persisting-state-err-err-message","errorCode":null,"errorMessage":"Error persisting state: ${(err && err.message) || err}","messagePattern":"Error persisting state: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/save-state.js","lineNumber":12,"sourceCode":"const report = require(`gatsby-cli/lib/reporter`)\nconst redux = require(`./`)\n\nlet saveInProgress = false\nasync function saveState() {\n  if (saveInProgress) return\n  saveInProgress = true\n\n  try {\n    await redux.saveState()\n  } catch (err) {\n    report.warn(`Error persisting state: ${(err && err.message) || err}`)\n  }\n\n  saveInProgress = false\n}\n\nmodule.exports = {\n  saveState,\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/save-state.js#L1-L21","documentation":"Non-fatal warning from Gatsby's redux persistence layer: serializing the app state (redux.saveState) to disk failed. The caught error's message is inlined. Builds continue with in-memory state, but the next cold start loses .cache state and must rebuild it.","triggerScenarios":"Thrown at packages/gatsby/src/redux/save-state.js:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and write permissions on the .cache directory","Run `gatsby clean` and rebuild"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}