# Can't seem to enable file context storage

**URL:** <https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389>\
**Category:** General\
**Created:** [27 October 2023 09:13 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389 "2023-10-27T09:13:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 October 2023 09:13 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/1 "2023-10-27T09:13:06Z")

</div>

I didn't have file context storage enabled so I un-commented my settings to enable it

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/3/5352a64a46e36d21203ce56aa8a98e2c4d409f59.png)

but getting this warning in log  
`[warn] Unknown context store 'memory' specified. Using default store.`  
and my contexts are not being saved  
What have I done wrong?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 October 2023 09:28 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/2 "2023-10-27T09:28:10Z")

</div>

Have you explicitly used `memory` somewhere in your flows. Try searching for that.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 October 2023 09:34 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/3 "2023-10-27T09:34:15Z")

</div>

Well not deliberately - how would I search for such a thing?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 October 2023 09:49 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/4 "2023-10-27T09:49:04Z")

</div>

You can use Search from the menu, or Ctrl-F is the default hot key.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 October 2023 10:01 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/5 "2023-10-27T10:01:08Z")

</div>

Got a q-gate node that has a field for it but not using it

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a83cb490af653bc9a82440949a159e465dc3ba1.png)

FOund another one with box ticked but nothing selected

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/6/56e3921397f535e13d2213a1f65805c043c337f5.png)  
Changed it to default  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4a9f1e809dbe6c6e6fcd2332cf6c49fd6539cb50.png)  
warning still there on restart  
And I'm using flow context in some Blockly nodes

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/671081f8eb98bd4fbf7c9ad71ec5d269bc111b72.png)

which are transcoded to JS  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4acadfe6d74d8f344b76e3e07f9a77f0373c7d25.png)

So nothing leaping out at me ☹

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 October 2023 10:19 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/6 "2023-10-27T10:19:22Z")

</div>

Can you export those nodes and see if `memory` appears in the export?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 October 2023 10:33 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/7 "2023-10-27T10:33:39Z")

</div>

What a fine piece of detective work Colin 🙂  
The first q-gate (that didn't have saved state selected and field was blank) looked like this with store set to memory

```auto
[
    {
        "id": "f75a09b8711083e7",
        "type": "q-gate",
        "z": "dd7fd44de794158a",
        "name": "",
        "controlTopic": "control",
        "defaultState": "open",
        "openCmd": "open",
        "closeCmd": "close",
        "toggleCmd": "toggle",
        "queueCmd": "queue",
        "defaultCmd": "default",
        "triggerCmd": "trigger",
        "flushCmd": "flush",
        "resetCmd": "reset",
        "peekCmd": "peek",
        "dropCmd": "drop",
        "statusCmd": "status",
        "maxQueueLength": "100",
        "keepNewest": false,
        "qToggle": false,
        "persist": false,
        "storeName": "memory",
        "x": 570,
        "y": 80,
        "wires": [
            [
                "286528e7465f702f",
                "b735b173c6fc2c28",
                "873b855a2735aad2"
            ]
        ]
    }
]

```

So I changed it to select saved state - set it default and then un-checked it and warning went away on restart 🙂  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/796c8a91b0563fd7f2486c705f534649c6b76638.png)

and now my flow context is surviving a restart 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 October 2023 10:37 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/8 "2023-10-27T10:37:36Z")

</div>

Could you submit an issue against the node and link back to this thread for @drmibell to look at please.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 October 2023 10:50 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/9 "2023-10-27T10:50:46Z")

</div>

Will do - I'll try and see if I can make a PR to set the value to default if no context store is defined

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 November 2023 10:51 UTC](https://discourse.nodered.org/t/cant-seem-to-enable-file-context-storage/82389/10 "2023-11-10T10:51:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
