# Alexa-remote2 giving 'failed to load routines: "no body"'

**URL:** https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343
**Category:** General
**Created:** [9 March 2023 11:24 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343 "2023-03-09T11:24:35Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Eskibrew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eskibrew/32/77315_2.png) [@Eskibrew](https://discourse.nodered.org/u/Eskibrew)
#### Post date: [9 March 2023 11:24 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/1 "2023-03-09T11:24:35Z")

</div>

Hi all, I've used node-red-contrib-alexa-remote2 in the past and it's been great. I've been trying to get it working again, and I've now tried all of the forks, even the most recent node-red-contrib-alexa-remote2-mattl0 by @MattL0 but I am getting 'failed to load routines: "no body"' so I suspect Amazon have changed something recently.

Matt's version uses the most recent alexa-remote2 dependency, ver 5.10.1 so I suspect there is a problem upstream causing the issue.

Any suggestions?

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [9 March 2023 12:45 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/2 "2023-03-09T12:45:08Z")

</div>

I'm using **node-red-contrib-alexa-remote-fork** (not the latest Alexa node) and can report it still works works fine here in the UK. So I doubt if Amazon have changed anything recently.

---

<div class="post-metadata">

### Author: ![Eskibrew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eskibrew/32/77315_2.png) [@Eskibrew](https://discourse.nodered.org/u/Eskibrew)
#### Post date: [9 March 2023 13:07 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/3 "2023-03-09T13:07:09Z")

</div>

Thanks Dave. I'm in the UK too. I've just uninstalled the other one and tried the one you suggest but when I deploy, I get this:

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

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [9 March 2023 14:21 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/4 "2023-03-09T14:21:37Z")

</div>

This is the flow I created to initialise my Alexa node every 12 hours.

 ![alexa_init](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/b/eb5467eda69a678aaff99d70f2f680ffdde34f31.png)

```auto
[{"id":"c32b9be4.96144","type":"group","z":"3c310437.4aee8c","name":"","style":{"fill":"#e3f3d3","label":true},"nodes":["b95ca6c8.ca32b","3428d6a3.d2a0aa","5e63c65f.6a7198","9b50a0ef.5afda8","a4f5011.df8aa8","e518f0bc.1b237","edc7d791.327aa","6b5119bc.7c0098","87cb5282.6a389","e9815c3b.4d76d"],"x":54,"y":39,"w":772,"h":342},{"id":"b95ca6c8.ca32b","type":"catch","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","scope":["e8453fde.71f79"],"uncaught":false,"x":150,"y":260,"wires":[["3428d6a3.d2a0aa","5e63c65f.6a7198"]]},{"id":"3428d6a3.d2a0aa","type":"debug","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"catch alexa error","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":" $moment().format(\"ddd HH:mm:ss\")","statusType":"jsonata","x":370,"y":340,"wires":[]},{"id":"5e63c65f.6a7198","type":"switch","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","property":"_error","propertyType":"msg","rules":[{"t":"eq","v":"Error: no JSON","vt":"str"},{"t":"eq","v":"Error: account must be initialised before refreshing","vt":"str"},{"t":"eq","v":"Error: Error while checking Authentication: Error: no JSON","vt":"str"},{"t":"eq","v":"Error: Account not initialised!","vt":"str"},{"t":"eq","v":"Error: Authentication failed: \"no JSON\"","vt":"str"},{"t":"cont","v":"Error: unexpected response layout:","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":330,"y":260,"wires":[["9b50a0ef.5afda8"],["9b50a0ef.5afda8"],["9b50a0ef.5afda8"],["9b50a0ef.5afda8"],["9b50a0ef.5afda8"],["9b50a0ef.5afda8"]]},{"id":"9b50a0ef.5afda8","type":"change","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"alexa","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":260,"wires":[["a4f5011.df8aa8"]]},{"id":"a4f5011.df8aa8","type":"delay","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":700,"y":260,"wires":[["e9815c3b.4d76d"]]},{"id":"e518f0bc.1b237","type":"inject","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"trigger","props":[{"p":"payload"}],"repeat":"43200","crontab":"","once":true,"onceDelay":"3","topic":"","payload":"alexa","payloadType":"flow","x":160,"y":140,"wires":[["e9815c3b.4d76d"]]},{"id":"edc7d791.327aa","type":"change","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","rules":[{"t":"set","p":"alexa","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":140,"wires":[["6b5119bc.7c0098"]]},{"id":"6b5119bc.7c0098","type":"debug","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":" $moment().format(\"ddd HH:mm:ss\")","statusType":"jsonata","x":710,"y":140,"wires":[]},{"id":"87cb5282.6a389","type":"comment","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"Initialise the Alexa-Remote2-v2 node","info":"","x":240,"y":80,"wires":[]},{"id":"e9815c3b.4d76d","type":"alexa-remote-init","z":"3c310437.4aee8c","g":"c32b9be4.96144","name":"","account":"57e78a27.bf542c","option":"initialise","x":340,"y":140,"wires":[["edc7d791.327aa"]]},{"id":"57e78a27.bf542c","type":"alexa-remote-account","name":"Amazon-Alexa","authMethod":"proxy","proxyOwnIp":"192.168.1.152","proxyPort":"3458","cookieFile":"/home/pi/amazon_alexa.txt","refreshInterval":"3","alexaServiceHost":"alexa.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-UK","userAgent":"","useWsMqtt":"on","autoInit":"off"}]

```

---

<div class="post-metadata">

### Author: ![Eskibrew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eskibrew/32/77315_2.png) [@Eskibrew](https://discourse.nodered.org/u/Eskibrew)
#### Post date: [9 March 2023 15:13 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/5 "2023-03-09T15:13:20Z")

</div>

Thanks for sending me that Dave, I was previously using the auto init but I thought it was worth changing to try it out - it inits fine as you can see in the image but I still get the same error message.  
I should add, I can create a flow with inject and an alexa routine which talks to me through an echo dot - that works fine when I trigger it. The problem is that the "On Device Activity" node does nothing when I activate on the echo dot whereas it always did in the past.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d813fbe93d8892c967370e5e9d9e1bead25b53c.png)

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [9 March 2023 16:21 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/6 "2023-03-09T16:21:36Z")

</div>

No idea what could be wrong.  
Have you tried re-booting the Raspberry Pi ??

When I ask Alexa something like... "Alexa, what time is it" the On Device Act node changes to 'event fired' which I can capture and decode in my flow.

 ![on_device](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/97ee28bb7ceb3cac9fc6af2664978c325dd50551.png)

---

<div class="post-metadata">

### Author: ![Eskibrew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eskibrew/32/77315_2.png) [@Eskibrew](https://discourse.nodered.org/u/Eskibrew)
#### Post date: [10 March 2023 12:54 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/7 "2023-03-10T12:54:12Z")

</div>

Thanks Dave, I wasn't able to reboot until today because it was in use for other things too however after a reboot, it's working correctly 🕶

Just for the record, it's not running on a Rpi, it's running in a container on a Dell Wyse thin client which is also running home assistant, openmediavault and jellyfin - all working perfectly now, thanks 🕶

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [10 March 2023 13:11 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/8 "2023-03-10T13:11:52Z")

</div>

This thread of mine might give you some further ideas of what you can do with Alexa.  
It makes use of [BluePrints](https://blueprints.amazon.co.uk/home) to intercept responses from Alexa.

> [@Pure fun with Alexa and Alexa Skills](https://discourse.nodered.org/t/pure-fun-with-alexa-and-alexa-skills/46867):
>
> Now the authentication problem with various Alexa nodes has been sorted I thought I'd try something new. I used [BluePrints](https://blueprints.amazon.co.uk/home) to create a Q&A skill called 'Give me a status report' then linked that in the flow below. I've arranged for various devices around my home to report their status to a database that is accessed from the flow and sent to the appropriate Alexa device. Here's an example of capturing feedback from Sonoff-S20 switches and writing the status to a dB.

---

<div class="post-metadata">

### Author: ![Eskibrew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eskibrew/32/77315_2.png) [@Eskibrew](https://discourse.nodered.org/u/Eskibrew)
#### Post date: [10 March 2023 15:48 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/9 "2023-03-10T15:48:40Z")

</div>

That looks great! - thanks for the heads up, I will take a look more closely.

---

<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: [24 March 2023 15:49 UTC](https://discourse.nodered.org/t/alexa-remote2-giving-failed-to-load-routines-no-body/76343/10 "2023-03-24T15:49:34Z")

</div>

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