haiku / haikudepotserver

Haiku Depot Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Agreed usage conditions" not viewable from HaikuDepot app

humdingerb opened this issue · comments

The Terminal output when selecting "View agreed usage conditions..." is:

bad response envelope missing 'result' entry

"View latest usage conditions..." works though.

[Considering these two items... It may be better to have just one "View usage conditions" item and check if there are newer "conditions" every HaikuDepot launch and have the user agree to those.]

Can you please re-run the HaikuDepot binary with the -v trace argument. This argument will cause the HaikuDepot desktop application to generate more precise logging showing exactly what is being transmitted when you choose View agreed usage conditions.... Can you please do this and see what data is coming back from this HTTP request.

Here you go:

~/Desktop> HaikuDepot -v trace
jrpc; will make request to [https://depot.haiku-os.org/__api/v1/user]
jrpc request; {"jsonrpc":"2.0","id":1,"method":"getUser","params":[{"nickname":"humdinger"}]}
jrpc: Resolving https://depot.haiku-os.org/__api/v1/user
jrpc: Hostname resolved to: 104.248.198.131:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: POST /__api/v1/user HTTP/1.1

jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.3
jrpc: Authorization: Basic aHVtZGluZ2VyOmJfdHJhbnNsYXRlKCJXZWxjaGVzIE9TPyIpO09FMTAx
jrpc: Content-Length: 79
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Content-Length: 82
jrpc: Content-Type: application/json
jrpc: Date: Tue, 07 Jan 2020 15:43:33 GMT
jrpc: Server: Jetty(9.4.20.v20190813)
jrpc: Connection: close
jrpc: 5 headers and 0 bytes of data remaining
jrpc; did receive http-status [200] from [https://depot.haiku-os.org/__api/v1/user]
jrpc response; {"jsonrpc":"2.0","id":1,"error":{"code":-32803,"message":"authorizationfailure"}}

bad response envelope missing 'result' entry
unable to get details of the user [humdinger]

I think the problem is that there is an authentication / authorization problem. I have improved the user-feedback in the HaikuDepot application in commit d17c92f7793e726c4a853f528660eaa5bf6830dc and so will close this here. Please check this again once the nightly is available with that change.