Hi! I am having an issue with using the HTTP REST ...
# spicedb
d
Hi! I am having an issue with using the HTTP REST module. Any requests return this error response:
connection error: desc = \"transport: Error while dialing dial tcp: missing address\
with status code 503 Looks to me like a small misconfiguration, but I set nothing but
spicedb serve --grpc-preshared-key "<somesecret>" --http-enabled
j
What port are you trying to connect to from http?
d
Port 8443
j
and what request are you making?
d
I get the same result for all of them - but one example would be
http://localhost:8443/v1/schema/read
with the headers
Auhtorization Bearer <token>
and
Content-type application/json
j
what do you get if you go to http://localhost:8443 in your browser?
d
{"code":5,"message":"Not Found","details":[]}
. is the raw response
j
that seems correct
how are you making the requests?
I just tried it and it seems to work
d
I am trying 2 different way with the same results 1. From my elixir application via Finch http client 2. as examplified in the "have you met our http api" blog post via Postman
j
what does this return?
curl -X POST -H "Authorization: Bearer yoursecretkeyhere" http://localhost:8443/v1/schema/read
d
Copy code
curl -X POST -H "Authorization: Bearer aabbccddeeff" http://localhost:8443/v1/schema/read

{"code":14,"message":"connection error: desc = \"transport: Error while dialing dial tcp: missing address\"","details":[]}%
oh no i leaked my super-secret token 😄
j
something is wrong your machine
what version of SpiceDB are you running?
d
no idea....
Copy code
spicedb version
spicedb development build (unknown exact version
this is the version installed from brew (osX)
brew install authzed/tap/spicedb
. I ran yesterday
j
ok
looks like the last version is broken
not sure why
I'll investigate
1.4.0 works
so must be something in 1.5.0
d
unlucky me 😛
how can i install version 1.4?
j
brew install spicedb@1.4.0
might do it
d
nope
Copy code
brew install spicedb@1.4.0
Warning: No available formula with the name "spicedb@1.4.0". Did you mean spicedb?
==> Searching for similarly named formulae...
This similarly named formula was found:
spicedb ✔
To install it, run:
  brew install spicedb ✔
==> Searching for a previously deleted formula (in the last month)...


Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
j
looks like we only export 1.5.0 in brew
d
how about - once your guys fix the isssue and re-release just drop me a line here. then I'll re-install the latest brew version.
j
k
d
thanks ❤️
j
18 Views