Old Linux Distri with jq 1.4 and curl 7.38 script error with solution ;-)
Closed this issue · 0 comments
Error:
cookie does not exist. logging in ...
error: map_values is not defined
.response.tokens.cookies | to_entries[] | .key as $domain | .value[] | map_values(if . == true then "TRUE" elif . == false then "FALSE" else . end) | .Expires |= ( strptime("%d %b %Y %H:%M:%S %Z") | mktime ) | [(if .HttpOnly=="TRUE" then ("#HttpOnly_" + $domain) else $domain end), "TRUE", .Path, .Secure, .Expires, .Name, .Value] | @TSV error: strptime is not defined
.response.tokens.cookies | to_entries[] | .key as $domain | .value[] | map_values(if . == true then "TRUE" elif . == false then "FALSE" else . end) | .Expires |= ( strptime("%d %b %Y %H:%M:%S %Z") | mktime ) | [(if .HttpOnly=="TRUE" then ("#HttpOnly_" + $domain) else $domain end), "TRUE", .Path, .Secure, .Expires, .Name, .Value] | @TSV error: mktime is not defined
.response.tokens.cookies | to_entries[] | .key as $domain | .value[] | map_values(if . == true then "TRUE" elif . == false then "FALSE" else . end) | .Expires |= ( strptime("%d %b %Y %H:%M:%S %Z") | mktime ) | [(if .HttpOnly=="TRUE" then ("#HttpOnly_" + $domain) else $domain end), "TRUE", .Path, .Secure, .Expires, .Name, .Value] | @TSV 3 compile errors
jq: error: null has no keys
ERROR: cookie retrieval with refresh_token didn't work
Hi have add the ref token and on a new distri and it works perfect.
- download the new jq v1.6 from the website (linux_x32) and replace the old jq version file or change in the alexa...sh the jq path
Source: https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux32 - download a static compiled curl and the same (replace or change path in .sh script)
https://github.com/moparisthebest/static-curl/releases/latest/download/curl-armhf
now on my old jessie works again.
thanks for your script and work