Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: no crsf found #102

Open
ThomasPoett opened this issue Feb 15, 2020 · 29 comments
Open

Error: no crsf found #102

ThomasPoett opened this issue Feb 15, 2020 · 29 comments

Comments

@ThomasPoett
Copy link

since the last two versions i experience the following wired issue.
Reproduceable:

  • refresh cookie - (result: working between 1-3 days)
  • it stops working
  • initiate account - (no crsf found error)
  • refresh cookie: (no crsf found error)
    Workaround:
    a) reinitiate and or refresh cookie a few time over again
    b) restart node red
    No CRSF found

Environment:
Raspberry 3
RaspMatic: 3.47.22.20191026
Node Red: 5.2.3
Alexa Remote 2: 3.9.0

@zkniebel
Copy link

I've just started experiencing this as well over the last couple of days. It didn't start after updating versions (which I did minutes after you released 3.9.0), but rather seems to have cropped up some time over the last two days.

I attempted the following code-less workarounds to no avail:

  • Restarting Node-Red
  • Reinitializing the account
  • Setting the account to use a different file path

Not sure what's wrong here just yet, but still looking.

@zkniebel
Copy link

After some more experimenting, I was not able to circumvent this while using the "proxy" authentication mode. I was, however, able to work around it by using Cookie authentication and copying my cookie in from one of the requests I made while logged into https://alexa.amazon.com.

@ThomasPoett
Copy link
Author

@zkniebel well with the cookie I experimented too. The problem with this on Raspmatic is, that the cookie never get refreshed proper. Meaning, after approx. 5 days I need a manual refresh and then, after a few more days i need to apply a new cookie manually. So the Proxy Auth was working literally better. That why it should be proxy Auth.

@ThomasPoett
Copy link
Author

Maybe, I found with Raspmatic a tiny workaround working approx. 50%. after restarting node-red i get a DNS error for amazon.com for about 1-2 min, after this the initialization is working and the crsf is gone for the next 1-3 days. So is very unpredictive when the crsf error appears exactly again. @zkniebel could you test this with restarting node-red

@zkniebel
Copy link

I’m on Hassio, and confirmed that the restart-wait (gave it 30 minutes) workaround is not working for me. Odd.

@stoneobscurity
Copy link

i am also getting this error.

@smcgann99
Copy link

Me too - I'm guessing Amazon changed something ?

@ThomasPoett
Copy link
Author

Hi folks, I guess we Need to wait for @586837r providing us with an answer. I'm not fit enough reading the source Code anymore :(

@586837r
Copy link
Owner

586837r commented Feb 21, 2020

Hey, there are a lot of open issues about reliability of the authentication. It's probably about the dependency "alexa-remote" or how i interact with it.
Thing is i don't use these nodes anymore at the moment so i would appreciate if someone else could look into that.

@586837r 586837r pinned this issue Feb 21, 2020
@ThomasPoett
Copy link
Author

Well, I would help, only my DevOps skills are a little outdated. Sure if someone wants to work together on it, please ping me.

@ljpaff
Copy link

ljpaff commented Feb 26, 2020

If you want a workarround to refresh amazon auth cookie this are the steps.

  • Look for a file called authFile. If you are using docker it is located at your home when you get into your instance.
  • Remove it
  • Restart NodeRed and make the proxy validation. It will copy a new fresh cookie from amazon in the authFile

Regards

@grumpazoid
Copy link

I have not been able to get the cookie working for some time by using the appropriate URL of my raspberry pi. I tried again today and now get the csrf not found.
@ljpaff will authFile be located on my PC (that I browse with) or the pi that runs node-red

@ljpaff
Copy link

ljpaff commented Mar 6, 2020

@ljpaff will authFile be located on my PC (that I browse with) or the pi that runs node-red

On the pi

@bunnosaurusrex
Copy link

bunnosaurusrex commented Mar 7, 2020

@ljpaff will authFile be located on my PC (that I browse with) or the pi that runs node-red

On the pi

could you give a detailed step by step for the linux/docker noobs and illiterate for how to find and delete the authfile please?

thanks in advance

@grumpazoid
Copy link

I have searched the entire pi file structure (using filezilla) and cannot find authFile?
I have found folders /home/pi/.node-red/node_modules/alexa-cookie2 and /home/pi/.node-red/node_modules/alexa-remote2.

Any clues please?

@ThomasPoett
Copy link
Author

@grumpazoid same with me. I'm using PI3 with RaspMatic, even I told the node where to store the Auth-File but I never saw or found any. My programming skills are a little outdated, so I can't find the where to save function in the source code.

@ThomasPoett
Copy link
Author

I just worked on it a little right now. Wired, I didn't restart node-red, neither I injected refresh nor Initialize - after typing in the proxy credentials, it work without crsf error.
I will now observe what it behaves. I had a time, injecting refresh every 48 hrs.

@ljpaff
Copy link

ljpaff commented Mar 10, 2020

Dear,

in my case you have to do a "docker exec -it <instance-name> /bin/bash" and them in the same directory making a "ls" command you see "authFile"

image

Then you only have to do a "docker restart <instance-nodered>"

Regards

@dfgas
Copy link

dfgas commented Mar 20, 2020

i keep getting this as well and i can not find the authFile anywhere. i do know this is a hass.io that was installed on proxmox. there was a script that was ran. node red is installed and running on docker.

@IFTTD
Copy link

IFTTD commented Mar 25, 2020

Solution:

Choose a path like /home/echo/ and create a empty file named cookie.txt in the echo folder. You end up with /home/echo/cookie.txt then set this as the File Path. It will complain about Empty Json but it will initialize and work.

@grumpazoid
Copy link

grumpazoid commented Mar 25, 2020

@TheCookieMonster70 I was just about to try your solution. I just tried getting the cookie again by going to local address and logging in to Amazon and this time it worked !!! ?

I've now added the path as you suggested. Got cookie again. Still working. Thanks for this.

@ghayne
Copy link

ghayne commented Mar 28, 2020

I have tried the suggestions above but still get the "no csrf found" error!

@ctyd
Copy link

ctyd commented Mar 29, 2020

the solution dont work for me

@dfgas
Copy link

dfgas commented Mar 29, 2020 via email

@scobby
Copy link

scobby commented Apr 1, 2020

for me this is not working.

@scobby
Copy link

scobby commented Apr 1, 2020

what worked for me is just restarting node-red. lets see how long this helps.

@grumpazoid
Copy link

After creating the cookie file I put the refresh to 5 days. 8 days later the nodes still say ready!!

@dfgas
Copy link

dfgas commented May 6, 2020

mine will say ready sometimes but they surely are not doing what is commanded.

@Prog72
Copy link

Prog72 commented May 6, 2020

mine will say ready sometimes but they surely are not doing what is commanded.

It definitely seems to fail silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests