This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-11
Channels
- # adventofcode (108)
- # announcements (4)
- # aws (11)
- # babashka (39)
- # beginners (199)
- # calva (12)
- # clj-kondo (17)
- # cljs-dev (1)
- # clojure (115)
- # clojure-dev (9)
- # clojure-europe (98)
- # clojure-italy (17)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-seattle (7)
- # clojure-sweden (6)
- # clojure-switzerland (5)
- # clojure-uk (15)
- # clojurescript (41)
- # code-reviews (36)
- # conjure (7)
- # datomic (1)
- # emacs (1)
- # events (1)
- # fulcro (26)
- # graalvm (2)
- # helix (35)
- # jackdaw (2)
- # jobs (9)
- # jobs-discuss (5)
- # lambdaisland (2)
- # meander (24)
- # off-topic (80)
- # pathom (22)
- # pedestal (1)
- # portal (20)
- # re-frame (3)
- # releases (1)
- # reveal (13)
- # rewrite-clj (1)
- # shadow-cljs (8)
- # specter (5)
- # sql (4)
error sounds like xml stuff landing where json expected, wonder if kinesis-video-media wire format is supported via aws-api 😬
Sure, perhaps you will see what I am missing. The aws-cli command works fine.
aws kinesis-video-media get-media --stream-arn "arn:aws:kinesisvideo:eu-west-1:9000ACCOUNT:stream/camera1/1607464961761" --start-selector StartSelectorType="NOW" --p devpl2 --endpoint-url "" cam.mkv
I am able to invoke on the :kinesisvideo client and get Endpoint and StreamArn without any issues. To read from the stream I am creating a :kinesis-video-media client, which is created fine.
(def kvmedia (aws/client {:api :kinesis-video-media :region "eu-west-1" :endpoint kvs-endpoint :credentials-provider (cred/profile-credentials-provider "devpl2")}))
What breaks is invoke on the :kinesis-video-media client
. Whatever I invoke with results in the cryptic json error.
(aws/invoke kvmedia {:op :GetMedia
:request {:StartSelector {:StartSelectorType "EARLIEST"}
:StreamARN stream-arn}})
The json error
{:cognitect.anomalies/category :cognitect.anomalies/fault,
:cognitect.aws.client/throwable
#error
{:cause "JSON error (unexpected character): <",
:trace
[[clojure.data.json$_read invokeStatic "json.clj"
230]
[clojure.data.json$_read invoke "json.clj" 181]
[clojure.data.json$read invokeStatic "json.clj" 276]
[clojure.data.json$read doInvoke "json.clj" 232]
[clojure.lang.RestFn applyTo "RestFn.java" 139]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 660]
[clojure.data.json$read_str invokeStatic "json.clj"
282]
[clojure.data.json$read_str doInvoke "json.clj" 278]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[cognitect.aws.protocols.common$json_parse_error
invokeStatic "common.clj" 42]
[cognitect.aws.protocols.common$json_parse_error
invoke "common.clj" 40]
[cognitect.aws.protocols.rest$parse_http_response
invokeStatic "rest.clj" 261]
[cognitect.aws.protocols.rest$parse_http_response
invoke "rest.clj" 249]
[cognitect.aws.protocols.rest_json$eval32496$fn__32497
invoke "rest_json.clj" 61]
[clojure.lang.MultiFn invoke "MultiFn.java" 239]
[cognitect.aws.client$handle_http_response
invokeStatic "client.clj" 48]
[cognitect.aws.client$handle_http_response invoke
"client.clj" 43]
[cognitect.aws.client$send_request$fn__12219$state_machine__6619__auto____12246$fn__12249
invoke "client.clj" 111]
[cognitect.aws.client$send_request$fn__12219$state_machine__6619__auto____12246
invoke "client.clj" 107]
[clojure.core.async.impl.ioc_macros$run_state_machine
invokeStatic "ioc_macros.clj" 978]
[clojure.core.async.impl.ioc_macros$run_state_machine
invoke "ioc_macros.clj" 977]
[clojure.core.async.impl.ioc_macros$run_state_machine_wrapped
invokeStatic "ioc_macros.clj" 982]
[clojure.core.async.impl.ioc_macros$run_state_machine_wrapped
invoke "ioc_macros.clj" 980]
[clojure.core.async.impl.ioc_macros$take_BANG_$fn__6637
invoke "ioc_macros.clj" 991]
[clojure.core.async.impl.channels.ManyToManyChannel$fn__623$fn__624
invoke "channels.clj" 95]
[clojure.lang.AFn run "AFn.java" 22]
[java.util.concurrent.ThreadPoolExecutor runWorker
"ThreadPoolExecutor.java" 1135]
[java.util.concurrent.ThreadPoolExecutor$Worker run
"ThreadPoolExecutor.java" 635]
[clojure.core.async.impl.concurrent$counted_thread_factory$reify__492$fn__493
invoke "concurrent.clj" 29]
[clojure.lang.AFn run "AFn.java" 22]
[java.lang.Thread run "Thread.java" 844]],
:via [{:at [clojure.data.json$_read invokeStatic
"json.clj" 230],
:message "JSON error (unexpected character): <",
:type java.lang.Exception}]}}
Just guessing here - since it starts with < - that means you're getting an XML/HTML response?
That's the whole errors I am getting in response. What do you meany by logging level by the client?