Closed plasterer41 closed 3 years ago
I have the same problem as of yesterday. I get Authentication failed: “no body”. Occasionally it seems to succeed.
Same here, Authentication failed: “no body” most of the time after Node-Red restart or Re-innitialised.
Same here. Tested with varoius port. I have compared an old session file and a new, there r differences. The old on work as normal (second amazon acc on 3457).
With "node-red-contrib-alexa-remote-fork" & "node-red-contrib-alexa-remote2-v2" same problems. No body
Same problems. I need to reply the process about 15 times until I get ready/success on my init nodes. Appeared two days ago for the first time.
Having the same issue. Have to set my initialize flow on a catch error loop until it starts working. Sometimes it takes several hours before it is successful
@kmorrow429 if you don't want to wait for hours I found that if you edit the account, don't change any setting, just update then redeploy it eventually works again after 5-10 minutes, roughly 10-15 attempts maybe more
If it's initialized, you have the cookie in a textfile and everything is ok, how long will it stay in this state? Anyone knows?
@andesse for me it stays initialised unless I restart Node Red, Deploy any of the Alexa Remote2 nodes or Reinitialise (I've got a flow that réinitialises automatically if some speak routines don't work anymore), usually happens every 3 days
@notownblues I had tried that, but when it didn't work immediately I tried deleting the auth file and a couple of restarts. If it happens again, I'll try that and leave it for a while to see if it works
Same problem here (in the UK) for the last couple of days. Authenticates fine after several manual restart flows and manual injected initialise attempts. But the next time it tries to refresh (I have it timed for once an hour) it fails again.
Errors I see are mostly "Authentication failed: "no body"" and separately "failed to load routines: "routines.map is not a function""
EDIT: Interestingly clicking update on the account details (without changing anything) and then restarting seems to work more often than not doing it.
Exactly the same Problem in Germany (Service Host: layla.amazon.de)
In Italy too.
Question: Does it appear maybe when you run two alexa accounts in node red? I just added a second one to Node-Red one day before this problem happened. I am not at home since three days, so I can't try it out. Btw, I'm from Germany.
Question: Does it appear maybe when you run two alexa accounts in node red? I just added a second one to Node-Red one day before this problem happened. I am not at home since three days, so I can't try it out. Btw, I'm from Germany.
No, I am only using one account and have the same problem. I am from germany, too.
Updating the alexa-remote2 dependency to v3.8 should do the trick.
Question: Does it appear maybe when you run two alexa accounts in node red?
No, I have only one alexa account. Same Error after Deactivation of 2fa in Alexa. Setting "Auto Init" to off in Node-RED-Alexa Configuration-Node and Using Node "Alexa init" solves the problem only one times.
Updating the alexa-remote2 dependency to v3.8 should do the trick.
Wich contrib do you use?
Updating the alexa-remote2 dependency to v3.8 should do the trick.
I'm using "node-red-contrib-alexa-cakebaked" V. 4.0.2. On GitHub this Version is commented with "Updates dependency alexa-remote2 to v3.7.1". I alredy searched for newer Versions, but I didn't found one. Where can I get v3.8?
Updating the alexa-remote2 dependency to v3.8 should do the trick.
I'm using "node-red-contrib-alexa-cakebaked" V. 4.0.2. On GitHub this Version is commented with "Updates dependency alexa-remote2 to v3.7.1". I alredy searched for newer Versions, but I didn't found one. Where can I get v3.8?
There is one alexa contrib with "forked" at the end. I think that's the 3.8, but I wouldn't change to this one cause the developer said "don't expect any updates"
Thank you, andesse. If no one will find a workaround, I wait and hope, the developer resolves the problem.
3.8: https://www.npmjs.com/package/alexa-remote2
Made a PR to update the dependency. I don't know whether it solves the problem here, but usually this kind of errors are all coming from alexa-remote2 and the first thing to try should be to update to the latest available version.
https://github.com/cakebake/node-red-contrib-alexa-remote-cakebaked/pull/24
I dont think 3.8 fixes it.
I've been running it over a week have been experiencing the same "Authenication Failed: No Body" errors, started couple of days ago.
I tried "3.8" today without success.
So I've debugged the Authentication HTTP Requests and they suddenly respond with 503 Service Unavailable
on /api/bootstrap?version=0
.
Not sure if this is because they've changed something in their API or because it really is unavailable, but I'm afraid it's the former.
Found the issue. The Accept header is not sent in the request. As suspected, the issue is in alexa-remote2
not here. I'll make a PR there shortly.
If you don't want to wait find this file .node-red/node_modules/alexa-remote2/alexa-remote.js
and add 'Accept': 'application/json',
to the headers. That would be in line 797. After adding this and restarting node-red (so that it picks up the changes) it works again for me.
Example:
let options = {
host: flags.host || this.baseUrl,
path: '',
method: 'GET',
timeout: flags.timeout || 10000,
headers: {
'User-Agent' : this._options.userAgent,
'Content-Type': 'application/json; charset=UTF-8',
'Accept': 'application/json',
'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`,
'Origin': `https://alexa.${this._options.amazonPage}`,
//'Content-Type': 'application/json',
//'Connection': 'keep-alive',
'csrf' : this.csrf,
'Cookie' : this.cookie,
'Accept-Encoding': 'gzip,deflate'
}
};
@bbindreiter thanks! Awesome you figured it out!
Found the issue. The Accept header is not sent in the request. As suspected, the issue is in
alexa-remote2
not here. I'll make a PR there shortly.If you don't want to wait find this file
.node-red/node_modules/alexa-remote2/alexa-remote.js
and add'Accept': 'application/json',
to the headers. That would be in line 797. After adding this and restarting node-red (so that it picks up the changes) it works again for me.Example:
let options = { host: flags.host || this.baseUrl, path: '', method: 'GET', timeout: flags.timeout || 10000, headers: { 'User-Agent' : this._options.userAgent, 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, //'Content-Type': 'application/json', //'Connection': 'keep-alive', 'csrf' : this.csrf, 'Cookie' : this.cookie, 'Accept-Encoding': 'gzip,deflate' } };
Just did the above and it now works perfect again. Thank you so much @bbindreiter!
@bbindreiter thanks
Confirm working with above Accept header change here too. Cheers @bbindreiter
What I am really curious about is, why did it worked for a quiet long time and now was suddenly broken...
I'd guess it'll be down to Amazon changing their services causing the original requests the remote2 lib made to fail.
Hmm, think I was too quick to say the header change works for me. It may have just worked once. Will look at doing a clean install in the next few days to see if that helps.
UPDATE: I had switched back to the regular alexa-remote2 a few months ago which didn't work with this change. Removing that and adding cakebaked and making the mod, seems to work now.
@bbindreiter Thank you so much!
@bbindreiter Thank you!
@bbindreiter Thank you so much, been fighting with this for a few days :-)
@bbindreiter thanks a lot my man, If it weren't for you guys I wouldn't have a smart home, ty really
Thank you, it works like a charm!
@bbindreiter you are a hero!
alexa-remote 3.8.1 is coming to npm just now. Have fun and thank you @bbindreiter
@bbindreiter Großen Dank auch von mir!
Gruß Matten Matten
Thank you very much everyone. Let's hope for an updated version soon.
Unfortunately, for me it's not working.
I still get the Authentication failed: "No body"
message.
After I go to the IP:3456 to authenticate with my credentials, it seems that it does not create the cookie file and after Initialise
, I get again the message to go the IP:3456 page
@woody4165 Nodered restartet?
Yes, I have NR in a Proxmox Container and I did first a service nodered restart
and also a reboot
after.
strange, you are also sure that the files (3) have been overwritten?
Gruß Matten Matten
Ops.....
I was modifying a copy of the alexa-remote.js
file and not the one in the .node-red/node_modules/alexa-remote2
So, now all is working fine!
I also have the same problem Accaunt Alexa Italia in addition to me when I restart even before it does not keep me authenticating I have Domoticz and red node on a raspberry and as a path I went to /home/pi/cookie/alexa.cookie
I also have the same problem Accaunt Alexa Italia in addition to me when I restart even before it does not keep me authenticating I have Domoticz and red node on a raspberry and as a path I went to /home/pi/cookie/alexa.cookie
Have you followed the instructions here ? https://github.com/cakebake/node-red-contrib-alexa-remote-cakebaked/issues/22#issuecomment-853171093
Have you followed the instructions here ?
No sorry I'm Italian and I'm using google translator to understand and maybe I missed something
I don't use alexa-remote2 but node-red-contrib-alexa-cakebaked 4.0.2 i believed that solution was for remote2 not cakebaked
@saviothecnic follow the instructions, I'm using cakebaked and it's worked for me
EDIT:
Translate the following, these are the instructions
Found the issue. The Accept header is not sent in the request. As suspected, the issue is in
alexa-remote2
not here. I'll make a PR there shortly.If you don't want to wait find this file
.node-red/node_modules/alexa-remote2/alexa-remote.js
and add'Accept': 'application/json',
to the headers. That would be in line 797. After adding this and restarting node-red (so that it picks up the changes) it works again for me.Example:
let options = { host: flags.host || this.baseUrl, path: '', method: 'GET', timeout: flags.timeout || 10000, headers: { 'User-Agent' : this._options.userAgent, 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, //'Content-Type': 'application/json', //'Connection': 'keep-alive', 'csrf' : this.csrf, 'Cookie' : this.cookie, 'Accept-Encoding': 'gzip,deflate' } };
Any thoughts or any similar experiences?
thanks,
Irwin