# Alexa save cookie to context

**URL:** https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898
**Category:** General
**Created:** [20 May 2022 20:29 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898 "2022-05-20T20:29:05Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![CAL37](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@CAL37](https://discourse.nodered.org/u/CAL37)
#### Post date: [20 May 2022 20:29 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/1 "2022-05-20T20:29:05Z")

</div>

@E1cid I have been using your flow for a while, but lately it's been wanting me to login to the amazon to get the cookie. Then today all of sudden it is giving me a JSON error. I have restarted, made sure it is saving the flow to filestorage context and not memory. Any ideas what else I could check?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb9fc1e7a8e603a3b0f5c4c52b6b0cf789288d77.png)

```auto
[{"id":"e63c03b3.745b48","type":"inject","z":"d629013b.18a518","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"86400","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"alexa","payloadType":"flow","x":100,"y":1460,"wires":[["89e02d64.da77c8"]]},{"id":"89e02d64.da77c8","type":"alexa-remote-init","z":"d629013b.18a518","name":"","account":"c8738129.d902c","option":"initialise","x":290,"y":1460,"wires":[["fc0183e2.5e7c2"]]},{"id":"fc0183e2.5e7c2","type":"change","z":"d629013b.18a518","name":"","rules":[{"t":"set","p":"alexa","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":1460,"wires":[["421c02e9.68fdec"]]},{"id":"c8738129.d902c","type":"alexa-remote-account","name":"alexa remote 2","authMethod":"proxy","proxyOwnIp":"localhost","proxyPort":"3456","cookieFile":"","refreshInterval":"14","alexaServiceHost":"layla.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-GB","userAgent":"","useWsMqtt":"on","autoInit":"off"}]

```

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [20 May 2022 20:33 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/2 "2022-05-20T20:33:39Z")

</div>

What remote2 node are you using?  
I suggest applestrudell, as i have had no issues with it.

---

<div class="post-metadata">

### Author: ![CAL37](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@CAL37](https://discourse.nodered.org/u/CAL37)
#### Post date: [20 May 2022 20:46 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/3 "2022-05-20T20:46:44Z")

</div>

I'm using node-red-contrib-alexa-remote2-applestrudel. Is this the same?

Here is my flow:

```auto
[
    {
        "id": "0d8788030616ce15",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "e63c03b3.745b48",
        "type": "inject",
        "z": "0d8788030616ce15",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "86400",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "alexa",
        "payloadType": "flow",
        "x": 330,
        "y": 200,
        "wires": [
            [
                "89e02d64.da77c8"
            ]
        ]
    },
    {
        "id": "fc0183e2.5e7c2",
        "type": "change",
        "z": "0d8788030616ce15",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "#:(file)::alexa",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 720,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "89e02d64.da77c8",
        "type": "alexa-remote-init",
        "z": "0d8788030616ce15",
        "name": "",
        "account": "247f7a30d23d339b",
        "option": "initialise",
        "x": 520,
        "y": 200,
        "wires": [
            [
                "fc0183e2.5e7c2"
            ]
        ]
    },
    {
        "id": "247f7a30d23d339b",
        "type": "alexa-remote-account",
        "name": "",
        "authMethod": "proxy",
        "proxyOwnIp": "192.168.1.155",
        "proxyPort": "3456",
        "cookieFile": "",
        "refreshInterval": "14",
        "alexaServiceHost": "pitangui.amazon.com",
        "amazonPage": "amazon.com",
        "acceptLanguage": "en-US",
        "onKeywordInLanguage": "on",
        "userAgent": "",
        "useWsMqtt": "on",
        "autoInit": "off",
        "credentials": {}
    }
]

```

---

<div class="post-metadata">

### Author: ![CAL37](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@CAL37](https://discourse.nodered.org/u/CAL37)
#### Post date: [20 May 2022 20:55 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/4 "2022-05-20T20:55:20Z")

</div>

I also set it to store to the local file system.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/6196c7dac29e1105d47b3f146a79a3c688bd04ce.png)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [20 May 2022 21:37 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/5 "2022-05-20T21:37:30Z")

</div>

Is it reading from file in the inject node?  
Yes thats correct remote2 node.  
Have you tried deleting the flow.alexa context storage?  
Also try deleting the remote2 config and starting fresh,

---

<div class="post-metadata">

### Author: ![CAL37](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@CAL37](https://discourse.nodered.org/u/CAL37)
#### Post date: [20 May 2022 21:49 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/6 "2022-05-20T21:49:21Z")

</div>

It was not reading from file in the inject node and I updated that, but still the same error. How do you delete the flow.alexa context storage? I'll also try deleting remote2 this weekend.

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

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [20 May 2022 22:38 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/7 "2022-05-20T22:38:09Z")

</div>

> [@CAL37](#):
>
> How do you delete the flow.alexa context storage?

in the sidebar, select the context tab. There you can see all context and delete context variables.

Just delete the config where you set proxy login details, not the remote2 nodes. You can access that in the sidebar to, under config tab.

---

<div class="post-metadata">

### Author: ![CAL37](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@CAL37](https://discourse.nodered.org/u/CAL37)
#### Post date: [31 May 2022 19:23 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/8 "2022-05-31T19:23:18Z")

</div>

@E1cid not sure what happened, but it seems to have resolved itself. Thank you again for your help!

---

<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: [30 July 2022 19:24 UTC](https://discourse.nodered.org/t/alexa-save-cookie-to-context/62898/9 "2022-07-30T19:24:18Z")

</div>

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