Comments (14)
Iām getting this:
core-ssh alexa]$ ./alexa_remote_control.sh -a
cookie expired, logging in again ...
date: invalid date '24 Feb 2043 02:55:39 GMT'
date: invalid date '24 Feb 2043 02:55:39 GMT'
date: invalid date '24 Feb 2043 02:55:39 GMT'
date: invalid date '2 Mar 2023 02:55:39 GMT'
date: invalid date '2 Mar 2023 02:55:39 GMT'
trying to get CSRF from handlebars
trying to get CSRF from devices-v2
ERROR: no CSRF cookie received
from alexa-remote-control.
hi there, I also get this sometimes when I login using refresh token:
date: invalid date '15.09.2042 22:45:43 GMT'
I got this on 15.09.2022 22:45:43 GMT, so it seems someone added 20 years ...
Despite error message, all is working fine and seems to have no impact.
I assume it is an error at Amazon and not an error in the great script here ...
Regards,
Horst
from alexa-remote-control.
The errors are thrown by the function "toEpoch()" which calls the "date" command multiple times with wrong parameters.
from alexa-remote-control.
Iām getting this:
core-ssh alexa]$ ./alexa_remote_control.sh -a cookie expired, logging in again ... date: invalid date '24 Feb 2043 02:55:39 GMT' date: invalid date '24 Feb 2043 02:55:39 GMT' date: invalid date '24 Feb 2043 02:55:39 GMT' date: invalid date '2 Mar 2023 02:55:39 GMT' date: invalid date '2 Mar 2023 02:55:39 GMT' trying to get CSRF from handlebars trying to get CSRF from devices-v2 ERROR: no CSRF cookie received
Same issue here. Started about a month ago, have not found a solution yet.
from alexa-remote-control.
Hi there,
please note again that I am just another very happy user of this wonderful script.
My system is still working fine. I did get and I may still do get the error of the year 2043-ish. In my system, it is only a nuisance but does not cause any real problem. All is working fine.
Are you using the refresh_token? I am using it. Perhaps you create a new refresh_token?
It may be that you got two issues: a real one that is causing "no cookie received" plus the fake one of 2043 messages?
Regards,
Horst
from alexa-remote-control.
macOS and few other platforms do not have a '-d' option for the date command.
date: illegal option -- d
usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]
[-I[date | hours | minutes | seconds]]
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
So the last update is not going work on some platforms. They will need to keep using the prior version.
Do you need to perform the toEpoch() function on all systems?
Also...like the previous person...extremely happy with this project.
from alexa-remote-control.
We're receiving a JSON string with cookie expiration dates in the form 24 Feb 2043 02:55:39 GMT
I first tried using JQ's strptime for converting that to a Unix timestamp (as curl expects it in its cookie jar).
If that worked for you - stick with v0.20d. Unfortunately this was dependent on JQ's version.
If somebody has a more portable approach, let's try that š
from alexa-remote-control.
So the solution is simple as that?
# date -d "24 Feb 2043 02:55:39 GMT" -u +"%s"
date: invalid date '24 Feb 2043 02:55:39 GMT'
# date -D "24 Feb 2043 02:55:39 GMT" -u +"%s"
1687427313
from alexa-remote-control.
Neither "-d" nor "-D" are available in macOS and other BSD-based systems. Below is the equivalent command.
:date -j -f "%d %b %Y %H:%M:%S %Z" "24 Feb 2043 02:55:39 GMT" +"%s"
2308359339
:date -d "24 Feb 2043 02:55:39 GMT" -u +"%s"
date: illegal option -- d
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
[-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
[[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt]
:date -D "24 Feb 2043 02:55:39 GMT" -u +"%s"
date: illegal option -- D
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
[-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
[[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt]
:
from alexa-remote-control.
I added a detection for OSX and BSD.
@nodev11 what OS are you using? I don't find date -D
anwhere...
from alexa-remote-control.
I added a detection for OSX and BSD.
Sadly this doesn't work for me (same errors), so I modified v0.21 (using jq's strptime function again).
@nodev11 what OS are you using? I don't find
date -D
anwhere...
BusyBox v1.29.2 multi-call binary.
Usage: date [OPTIONS] [+FMT] [TIME]
Display time (using +FMT), or set time
[-s,--set] TIME Set time to TIME
-u,--utc Work in UTC (don't convert to local time)
-R,--rfc-2822 Output RFC-2822 compliant date string
-I[SPEC] Output ISO-8601 compliant date string
SPEC='date' (default) for date only,
'hours', 'minutes', or 'seconds' for date and
time to the indicated precision
-r,--reference FILE Display last modification time of FILE
-d,--date TIME Display TIME, not 'now'
-D FMT Use FMT for -d TIME conversion
Recognized TIME formats:
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead
from alexa-remote-control.
I tried something different now.
In theory we can instruct the shell not to exit on error. Next I simply try all the different date commands we know.
https://raw.githubusercontent.com/adn77/alexa-remote-control/master/alexa_remote_control.sh
If it works, I will PR this later today.
from alexa-remote-control.
https://raw.githubusercontent.com/adn77/alexa-remote-control/master/alexa_remote_control.sh
If it works, I will PR this later today.
Works for me. No errors were thrown. Well done!
from alexa-remote-control.
Problem fixed by adn77
Thanks a lot!
from alexa-remote-control.
Related Issues (20)
- how to use "sound:<soundeffect_name>" HOT 4
- Tunein Jingle HOT 8
- "Phantom" device, how to remove?
- Seems answer from "-lastalexa" is changed by Amazon HOT 2
- 20220617 - "Strange" REFRESH_TOKEN generated by alexa-cookie-cli HOT 2
- Trouble Installing HOT 1
- setting default device to: ERROR: unknown device dev: HOT 10
- <InternalFailure/> from Play & Pause // parse error from jq? HOT 6
- Can't get the script to speak HOT 5
- Old Linux Distri with jq 1.4 and curl 7.38 script error with solution ;-)
- Initial login page has changed HOT 2
- Failed writing body HOT 2
- ERROR: cookie retrieval with refresh_token didn't work HOT 2
- Error -lastalexa and -last command HOT 20
- Login procedure does not work anymore (even with new uri) HOT 2
- alexa_remote_control.sh dosn't recieve a cookie anymore... HOT 2
- Return code for commands given to alexa-remote-control HOT 1
- no idea how to use it
- ERROR: no CSRF cookie received HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexa-remote-control.