cobalt-cli icon indicating copy to clipboard operation
cobalt-cli copied to clipboard

invalid character '<' looking for beginning of value

Open casper opened this issue 1 year ago • 2 comments

I get the above error running cobalt on most instances. Is the current release incompatible or how can I get it to work? Thank you.

casper avatar Oct 09 '24 11:10 casper

It was a bug on the gobalt library, just fixed it. I'll release a new version of cobalt-cli tomorrow (at my timezone)

lostdusty avatar Oct 09 '24 22:10 lostdusty

Awesome. Thank you! :)

casper avatar Oct 10 '24 09:10 casper

Hi, I also experience this issue image

jasursadikov avatar Oct 11 '24 20:10 jasursadikov

Also, this issue happens because cobalt.tools doesnt offer a free api anymore, while I fix this, you guys can change the instance used. Use cobalt instances to see other instances, and use the flag -i to change the instance used. Remeber to use a instance running version 7.x

lostdusty avatar Oct 11 '24 22:10 lostdusty

The documentation on the API is very confusing. On one hand it says there is no API, on the other hand they tell us if we wish to use the latest API, all we need is to read the documentation.

Currently, there is no publicly accessible main api. we plan on providing a public api for cobalt 10 in some form in the future. we recommend deploying your own instance if you wish to use the latest api. you can access the documentation for it here.

If I look at the docs, it seems like the root URL has changed from /api/json to just /. Have you tried if that would work?

casper avatar Oct 12 '24 11:10 casper

Yes, I've changed it on the library with the new api version 10 (https://github.com/lostdusty/gobalt/commit/b9c106c0d3d8ca1985d9fbc95784a95c087003ed), but this only supports servers running cobalt version 7.15 and below. There is no public api from cobalt anymore, but rather from the community

lostdusty avatar Oct 12 '24 12:10 lostdusty

Should work now (https://github.com/lostdusty/cobalt/commit/4cadf7c79f40f197753e18490ecbe39523d4becb), please tell me if you find any more issues.

lostdusty avatar Oct 15 '24 18:10 lostdusty

On one hand it says there is no API, on the other hand they tell us if we wish to use the latest API, all we need is to read the documentation.

currently, there is no publicly accessible main api [...] we recommend deploying your own instance if you wish to use the latest api

i can easily understand that they're trying to say something like: host your own instance if you want to use the latest api but if you don't want to host your own instance then use the old api, which is https://api.cobalt.tools/api/serverInfo and the docs are linked above; probably because i do a lot of stuff with cobalt

i don't recommend using the old api since it'll get removed soon[1]

also, the documentation has improved now and it doesn't say that anymore so it's less confusing now[2]

KwiatekMiki avatar Oct 16 '24 14:10 KwiatekMiki