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

Two issues Cannot find jq and cannot refresh token #151

Open
donnievawter opened this issue Nov 18, 2021 · 2 comments
Open

Two issues Cannot find jq and cannot refresh token #151

donnievawter opened this issue Nov 18, 2021 · 2 comments

Comments

@donnievawter
Copy link

I am trying to run this from a docker container (network host)
When I run it from the VM which hosts the container everything works.

When I run it inside the container I get two errors

  1. It can't find jq
  2. It says the cookies has expired and it can't renew

jq is there. I put an echo statemant at top of script:

bash-5.0$ ./alexa_remote_control.sh -d "Don's 2nd Echo" -e speak:'Hey Babe'
ls-ltr /data/jq ==> -rwxr-xr-x 1 node-red node-red 30712 Nov 17 19:08 /data/jq
cookie expired, logging in again ...
./alexa_remote_control.sh: line 580: /data/jq: not found
./alexa_remote_control.sh: line 579: /data/jq: not found
ERROR: cookie retrieval with refresh_token didn't work

You can see from the echo statement that /data/jq is present with execute permissions
I have also verified that the ip of host vm and the container are the same if that matters and that is the ip is used from the proxy when generating the token.

@donnievawter
Copy link
Author

The can't find jq is a red herring. I think when the curl response is piped to jq with unexpected results that is the erroneous error message. However today generating new tokens doesn't help. Always the same error

@adn77
Copy link
Collaborator

adn77 commented Nov 20, 2021

Hi @donnievawter what is your JQ version?
I keep hearing from people having trouble with time manipulation in JQ.

  1. comment line line 585
  2. after running any command check if /tmp/.alexa.cookie.json contains some cookies

If the above is fine, try replacing the timestamp creation in line 579
( strptime("%d %b %Y %H:%M:%S %Z") | mktime )
becomes
"2145913200"

Alex

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

2 participants