# Context Store damaged after Windows update

**URL:** <https://discourse.nodered.org/t/context-store-damaged-after-windows-update/17973>\
**Category:** General\
**Tags:** windows\
**Created:** [14 November 2019 22:17 UTC](https://discourse.nodered.org/t/context-store-damaged-after-windows-update/17973 "2019-11-14T22:17:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [14 November 2019 22:17 UTC](https://discourse.nodered.org/t/context-store-damaged-after-windows-update/17973/1 "2019-11-14T22:17:02Z")

</div>

Hello,

last night my windows server rebooted after the November update. After restart Node-RED did not started:

```auto
Welcome to Node-RED
===================

14 Nov 07:27:22 - [info] Node-RED version: v1.0.1
14 Nov 07:27:22 - [info] Node.js version: v10.15.1
14 Nov 07:27:22 - [info] Windows_NT 10.0.17763 x64 LE
14 Nov 07:27:23 - [info] Loading palette nodes
14 Nov 07:27:24 - [info] node-red-contrib-milight-2@1.0.8 started
14 Nov 07:27:25 - [info] Dashboard version 2.17.1 started at /ui
14 Nov 07:27:26 - [info] node-red-contrib-ccu version: 3.0.0
14 Nov 07:27:26 - [info] Settings file : \Users\cmeinert\.node-red\settings.js
14 Nov 07:27:26 - [info] Context store : 'memoryOnly' [module=memory]
14 Nov 07:27:26 - [info] Context store : 'file' [module=localfilesystem]
14 Nov 07:27:26 - [error] Failed to start server:
14 Nov 07:27:26 - [error] Error: Error loading context store: SyntaxError: Unexpected token in JSON at position 0
    at C:\Users\cmeinert\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\context\index.js:177:15

```

I opened the ".json" files and 2 from 3 where filled with `null`s. Ups. I‘m running NodeRED as a service and reboots did not caused any problems. I don`t know how these files are written but perhaps the old method of writing a new one and then rename the old to an .bak-file and then rename the new to .json can a) prevent this and b) allways provide a recent backup.

I thought modern OSes have overcome this problem but ... I don`t want to stop windows from autoupdates as they keep an headless server as protected as possible.

Deleting this files made the server start again but I lost all my recent configurations stored there ...

Any Ideas what I can do to prevent this in the future (beside "save often save early", "allways have a backup on hand" or "switch over to linux" 😉

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [16 June 2022 12:04 UTC](https://discourse.nodered.org/t/context-store-damaged-after-windows-update/17973/2 "2022-06-16T12:04:59Z")

</div>


