Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto saving bookmarks that aren't already displayed captures incorrectly #1620

Open
sam-a9 opened this issue Nov 14, 2024 · 5 comments
Open

Comments

@sam-a9
Copy link

sam-a9 commented Nov 14, 2024

Describe the bug
When 'Option: save the page of a newly created bookmark' is selected but the page to be saved is not already displayed in a tab SingleFile will open temporarily a new tab to save the page. In my case this happens when saving bookmarks on mobile which are then synced to chrome desktop. The issue is the new tab is only opened briefly, and is opened in the background so it doesn't fully load for one of these reasons, so single-file doesn't correctly capture the page. This happens especially on complex sites like youtube or tiktok (often nothing is captured at all). I tested on both chrome and firefox.

To Reproduce
Steps to reproduce the behavior:

  1. turn 'Option: save the page of a newly created bookmark' on
  2. save a bookmark eg on chrome or firefox on a phone which is synced to the desktop
  3. a background tab is opened, singlefile saves it then it's closed after a few seconds
  4. page is not fully captured

Expected behavior
page is fully captured

Environment

  • OS: [Win11 Pro]
  • Browser: [Chrome Version 131.0.6778.70, Firefox Version 132.0.2]

Additional context
Tried on both chrome and Firefox in incognito and without other extensions. Tried changing options eg dispatch "scroll" event, zoom out the page, auto-save delay or turning off save in background but nothing effects it. Tried disabling memory saver/performance options in chrome

@sam-a9 sam-a9 changed the title Auto saving synced bookmark is captured incorrectly Auto saving bookmarks that aren't already displayed captures incorrectly Nov 15, 2024
@sam-a9
Copy link
Author

sam-a9 commented Nov 15, 2024

Using an extension that forces tabs to open in the foreground helps, but it still doesn't save correctly when multiple bookmarks are synced and try to save at the same time. An option to add a delay or save one at a time might work. Unless I'm missing something

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Nov 18, 2024

Did you try to set the hidden option processInForeground to true, see https://github.com/gildas-lormeau/SingleFile/wiki/Hidden-options? This should fix this issue.

@sam-a9
Copy link
Author

sam-a9 commented Nov 20, 2024

Amazing I missed those, between that, max workers 1 and delay by x seconds it works. It is quite a drag having to have them on all the time - an option to only turn them on when saving a bookmark that isn't already opened would be ideal, I expect for quite a few other people too, but at least it saves. Thanks for the work

@gildas-lormeau
Copy link
Owner

Did you feel the need to set processInForeground back to false?

@sam-a9
Copy link
Author

sam-a9 commented Dec 2, 2024

Hi sorry but chasing this up some pages are still saving incorrectly (and some not at all) even after testing in incognito, on a new account with a new extension etc. With processInForeground on, if a bookmark is saved on another device and chrome on desktop is open there's no issue, and if chrome is closed there's no issue (bookmarks save when chrome next opens). But if chrome is minimised but not closed, some pages such as youtube save incorrectly, and some pages (usually the first if multiple bookmarks are saved) don't save at all. I tried with 'save pages in background' off etc but no difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants