linkding icon indicating copy to clipboard operation
linkding copied to clipboard

Even with Singlefile and Linkding extensions configured, adding bookmarks doesn't reliably attach the html snapshot

Open Neurrone opened this issue 4 months ago • 5 comments

I'm on 1.44.1 and Firefox 145.0B3.

I've configured the Singlefile and Linkding extensions to have a snapshot of the page automatically uploaded when I create a bookmark as described in the docs.

However, the html file isn't always attached, despite saving the bookmark always showing the success message.

I only noticed when I went into Linkdings and found that the snapshots are missing.

I found that even for the same web page, I have to delete and recreate the bookmark a couple of times before the html file is actually attached.

Neurrone avatar Oct 19 '25 14:10 Neurrone

I have some problem when I manually deploy on the Nixos. Some websites cannot get preview images.

SingleFile error: <!doctype html> <html lang="en"> <head> <title>Server Error (500)</title> </head> <body> <h1>Server Error (500)</h1><p></p> </body> </html> (RestFormApi)

Image

20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,858 INFO Successfully updated favicon for bookmark. url=https://sspai.com/post/102899 icon=https_sspai_com.png 10月 20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,858 INFO bookmarks.services.tasks._load_favicon_task: fc3298d1-46ff-4229-bec4-aab3bd9d1950 5 retries executed in 0.012s 10月 20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,859 INFO Executing bookmarks.services.tasks._load_preview_image_task: 32d76cb5-7a6b-4781-b729-4f915941c774 5 retries 10月 20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,863 INFO Load preview image for bookmark. url=https://sspai.com/post/102899 10月 20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,866 INFO Successfully updated preview image for bookmark. url=https://sspai.com/post/102899 preview_image_file=None 10月 20 09:18:52 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:18:52,867 INFO bookmarks.services.tasks._load_preview_image_task: 32d76cb5-7a6b-4781-b729-4f915941c774 5 retries executed in 0.007s 10月 20 09:19:08 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:19:08,015 INFO Enqueueing periodic task bookmarks.services.tasks._schedule_html_snapshots_task: d67cae6b-26ae-40a8-864a-1abc85c201b0. 10月 20 09:19:10 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:19:10,232 INFO Executing bookmarks.services.tasks._schedule_html_snapshots_task: d67cae6b-26ae-40a8-864a-1abc85c201b0 10月 20 09:19:10 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:19:10,237 INFO bookmarks.services.tasks._schedule_html_snapshots_task: d67cae6b-26ae-40a8-864a-1abc85c201b0 executed in 0.004s 10月 20 09:20:08 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:20:08,014 INFO Enqueueing periodic task bookmarks.services.tasks._schedule_html_snapshots_task: a0902f9b-b245-4dc4-8599-e40078e4cdee. 10月 20 09:20:12 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:20:12,880 INFO Executing bookmarks.services.tasks._schedule_html_snapshots_task: a0902f9b-b245-4dc4-8599-e40078e4cdee 10月 20 09:20:12 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:20:12,884 INFO bookmarks.services.tasks._schedule_html_snapshots_task: a0902f9b-b245-4dc4-8599-e40078e4cdee executed in 0.004s 10月 20 09:21:08 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:21:08,014 INFO Enqueueing periodic task bookmarks.services.tasks._schedule_html_snapshots_task: c5fb2dfe-cef0-4702-9b6a-7937de9cb8f1. 10月 20 09:21:13 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:21:13,961 INFO Executing bookmarks.services.tasks._schedule_html_snapshots_task: c5fb2dfe-cef0-4702-9b6a-7937de9cb8f1 10月 20 09:21:13 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:21:13,965 INFO bookmarks.services.tasks._schedule_html_snapshots_task: c5fb2dfe-cef0-4702-9b6a-7937de9cb8f1 executed in 0.004s 10月 20 09:22:08 nixn305 linkding-tasks-start[1525057]: 2025-10-20 01:22:08,015 INFO Enqueueing periodic task bookmarks.services.tasks._schedule_html_snapshots_task: b8c24016-581c-4e02-869c-07d530ec7465.

llity avatar Oct 20 '25 00:10 llity

However, the html file isn't always attached, despite saving the bookmark always showing the success message.

Some things that would be helpful:

  • Are there any URLs with which that behavior would be reproducable?
  • Are there any errors in the container logs?
  • What specifically shows the success message? Linkding or Singlefile?
  • No errors reported from the Singlefile extension?
  • Which Docker image are you using?

I found that even for the same web page, I have to delete and recreate the bookmark a couple of times before the html file is actually attached.

That should not be necessary. If a bookmark already exists you can just click the Singlefile extension to add a new snapshot to it.

sissbruecker avatar Oct 21 '25 20:10 sissbruecker

I can reproduce it when uploading larger snapshots. Though there's definitely an error message in the page content if Singlefile fails to upload the file, as mentioned above. From the logs it looks like a server timeout. The request also take rather long to process.

You could try tweaking LD_REQUEST_TIMEOUT and see if that helps.

sissbruecker avatar Oct 21 '25 20:10 sissbruecker

That should not be necessary. If a bookmark already exists you can just click the Singlefile extension to add a new snapshot to it.

Thanks, I didn't realize this - doing this helped me to fix the ones with missing snapshots.

Yeah I think this has to do with the size of the web page. The LinkDing extension also shows successfully saved, but I think this confused me because it means the bookmark got added, but Singlefile hasn't finished its work yet. I was expecting that when the successful save message appeared, it meant the snapshot, along with the bookmark was already uploaded, then I went ahead to close the window.

Neurrone avatar Oct 22 '25 15:10 Neurrone

I was expecting that when the successful save message appeared, it meant the snapshot, along with the bookmark was already uploaded, then I went ahead to close the window.

Not sure if that is technically feasible. In general you want to wait until the Singlefile extension icon shows an "OK" badge. If it fails to upload the snapshot there will be a noticeable banner at the top of the page.

sissbruecker avatar Oct 22 '25 15:10 sissbruecker