thorsten-gehrig/alexa-remote-control

Two issues Cannot find jq and cannot refresh token

Opened this issue · 2 comments

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.

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 commented

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