Open sal0max opened 1 month ago
CURLE_WRITE_ERROR (23)
An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.
full disk?
read-only fs?
Yeah... the error message baffles me, too.
No, all other bridges run flawlessly.
the explosm bridge caches for 2 hours. you are probably seeing a cache result?
or does the error continue to persist?
if error is only for explosm it is very strange.
TLDR: libcurl is unable to write to fs
I tested some stuff and in that process set the cache time to 0. And as mentioned: The problem exists since 2024-04-04.
At first, I thought the error is due to changes on the website. It seems, that the CSS selectors wouldn't work any more, as classes have changed. But the error message clearly states to look in lib/http.php.
the stack trace has this message:
Message: cURL error : 23
there is a curl error message missing here. did you modify it?
rss-bridge throws like this:
$curl_error = curl_error($ch);
$curl_errno = curl_errno($ch);
throw new HttpException(sprintf(
'cURL error %s: %s (%s) for %s',
$curl_error,
$curl_errno,
'https://curl.haxx.se/libcurl/c/libcurl-errors.html',
$url
));
anyways i think problem is in curl_setopt($ch, CURLOPT_HEADERFUNCTION
which returns 0 due to bug in rss-bridge.
if you are able to reproduce you can try this patch:
diff --git a/lib/http.php b/lib/http.php
index 39f0c727..0c8a3896 100644
--- a/lib/http.php
+++ b/lib/http.php
@@ -116,6 +116,9 @@ final class CurlHttpClient implements HttpClient
$responseHeaders = [];
curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($ch, $rawHeader) use (&$responseHeaders, &$responseStatusLines) {
$len = strlen($rawHeader);
+ if ($len === 0) {
+ throw new \Exception('wtf? ' . $rawHeader);
+ }
if ($rawHeader === "\r\n") {
return $len;
}
I tried the patch, but the if-clause doesn't catch. Still the same error message:
Message: cURL error : 23 (https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://explosm.net/comics/latest#comic
I removed the if-clause and just threw the Exception. Result:
Message: wtf? HTTP/2 307
Describe the bug Since quite some time (2024-04-04), ExplosmBridge doesn't work any more. However, I suspect the reason being somewhere in the rss-bridge libs. This is the error I get:
To Reproduce Steps to reproduce the behavior: Add ExpolsmBridge and try to get the feed.
Expected behavior Getting the feed.