Streams don't work #13
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version or commit: 0.111.5
Streams don't work because the HTTP response is copied into
answer
inanswer
.@tastyea Hi, Do you have a schedule to solve this bug? I'm using it.
As I wrote in the e-mail, this project has become too complicated for me to maintain. I made a series of errors which resulted in too much bloat and a hard to follow code structure. In addition, the HTTP library I chose (POCO) doesn't seem to be suited for streams.
Looking at the code, I've found no immediate way to solve this but found other bugs in my streams implementation.
Fixing this properly would involve a major refactoring, streams would have to be newly implemented and maybe even the HTTP library would have to be replaced. I'm not going to do that, sorry.
Sorry, I didn't see your email. Maybe it helps,
mastodon-cpp
sends notifications(stream) after receiving 10 notifications, in addition, I could work with the stream in the previous version.Was the previous version you used before 0.110.0? Because that's when I switched to POCO for HTTP requests.
You could downgrade to 0.106.0. Streams should work fine in that version. The only downside as far as I can see is that you wouldn't have
mastodon-cppConfig.cmake
.@tastytea Thanks for your quick reply.
I'm not sure which version I used. Any way I downgraded to
0.106.0
and for now get another error at startup inget
method. This is the response of themasto.get()
:Do you have any idea?
The error means that the remote TLS certificate couldn't be verified. Which instance are you using? Do you get the same error with mastodon.social? Do you get an error if you do run
curl -I https://<your instance>/api/v1/instance
from a terminal?I just tested
example02_stream
from0.106.0
and it works with mastodon.social.@tastytea I can run the
curl -I https://pantherx.social/api/v1/instance
without error:That's weird. I can
get()
to pantherx.social just fine. Which OS are you using? Can you give me the output ofldd /usr/lib*/libcurl.so
?You can also check if the file returned by
curl-config --ca
exists and if it contains certificates. On my system it is around 200KiB big and was installed by the packageca-certificates
.@tastytea this is the output of
ldd libcurl.so
:Your libcurl is built with GnuTLS and mine with OpenSSL, maybe that is it. 🤔 Although theoretically it shouldn't make a difference. Does the file returned by
curl-config --ca
exist?@tastytea No, the output of
curl-config --ca
is empty. If I use the latest version ofmastodon-cpp
I won't have this error. Also thecurl -I https://pantherx.social/api/v1/instance
worked fine.Seems like libcurl didn't find a certificate bundle when it was compiled. Maybe the command
curl
uses a different libcurl? I don't know how to fix this, maybe reinstalling libcurl helps.