# REDIS - global.get results in the ERROR

**URL:** https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857
**Category:** General
**Created:** [21 December 2020 20:20 UTC](https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857 "2020-12-21T20:20:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tombcat](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tombcat/32/33861_2.png) [@Tombcat](https://discourse.nodered.org/u/Tombcat)
#### Post date: [21 December 2020 20:20 UTC](https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857/1 "2020-12-21T20:20:47Z")

</div>

Hello I have changed the default context storage to the REDIS.

Configuration:

```auto
contextStorage: {
    redis: {
        module: require("node-red-context-redis"),
        config: {
        	 host: "**,
                 port:***,
        }
    }
},

```

When fetching the global data using the change node, it works. But with the function node, it shows: "Error: Callback must be a function"

Tried with and without setting the storeName.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [21 December 2020 20:51 UTC](https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857/2 "2020-12-21T20:51:39Z")

</div>

Try the async version

"Writing Functions : Node-RED" [https://nodered.org/docs/user-guide/writing-functions#asynchronous-context-access](https://nodered.org/docs/user-guide/writing-functions#asynchronous-context-access)

Edit...  
Seems this a known issue (and unreleased code)...

> <https://github.com/node-red/node-red-context-redis/issues/3>
>
> When doing context.get, the returned value is undefined. Verified that context.set writes the value into Redis.
> global and flow contexts work as...

---

<div class="post-metadata">

### Author: ![Tombcat](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tombcat/32/33861_2.png) [@Tombcat](https://discourse.nodered.org/u/Tombcat)
#### Post date: [22 December 2020 10:52 UTC](https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857/3 "2020-12-22T10:52:58Z")

</div>

The async function works well but unfortunately this doesn't resolve my issue.

---

<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: [20 February 2021 10:52 UTC](https://discourse.nodered.org/t/redis-global-get-results-in-the-error/37857/4 "2021-02-20T10:52:58Z")

</div>

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