nextcloud / bookmarks

🔖 Bookmark app for Nextcloud
https://apps.nextcloud.com/apps/bookmarks
GNU Affero General Public License v3.0
980 stars 172 forks source link

cURL error 28 (timeout) when using pagereres for creating screenshots #2191

Open ramon-roca opened 1 week ago

ramon-roca commented 1 week ago

Describe the bug get error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for ... (url)

To Reproduce Steps to reproduce the behavior (on ubuntu 22.04 running ob proxmox VM, using starlink satellite internet):

  1. Install pageres-cli as snap
  2. Create bookmark
  3. See error "cURL error 28..." at cron execution for bookmarks application at the nexcloud log reader. No screenshot has been generated.

Expected behavior Get the screenshot for the bookmark just added

Desktop (please complete the following information):

Nextcloud log (nextcloud/data/nextcloud.log)

{"reqId":"Xb1X57d9GDcUTwVYYKuA","level":2,"time":"2024-06-22T03:45:13+00:00","remoteAddr":"","user":"--","app":"bookmarks","method":"","url":"--","message":"cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for **BOOKMARK_URL**/","userAgent":"--","version":"29.0.2.2","data":{"app":"bookmarks"}}
github-actions[bot] commented 1 week ago

Hello :wave:

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

marcelklehr commented 1 week ago

I think this might be unrelated to pageres. It seems that the app simply cannot connect to the bookmarked URL

ramon-roca commented 1 week ago

Hi Marcel,

Thanks for your kind comments, sure I understand the circumstances and very happy to be patient and if somehow I can help/contribute/cooperate on improving this brilliant code/software.

In the meantime and after reading your comments, I've seen that pageres is able to connect to the bookmarked url by executing pageres from the terminal, I do see that the image is being produced correctly as expected, but never in less than 10 seconds, always 20 secs or even more. Typically betweeen 20 and 30 secs.

time pageres https://google.com

✔ Generated 1 screenshot from 1 url and 1 size

real    0m21.376s
user    0m1.501s
sys 0m0.442s

So looks just a timeout issue because of having a fixed 10 secs.

The servers are located in a very remote location (a school in a rural area at southeast Asia) with very poor connectivity, so using satellite. That might explain higher-than-expected execution time.

So maybe the question is just about that timeout for that cURL being set to 10 seconds... where it comes from? There is any way to change/customize it?.