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

IpcRenderer.tsx:50 Error: bookmarkDataIsStale - try recreating the bookmark #732

Open
ksdavidc opened this issue Aug 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ksdavidc
Copy link

ksdavidc commented Aug 27, 2024

Bug Report

Important

Please follow this template strictly when reporting bugs.

Reports that do not adhere to this template will not be addressed and will be closed.

App Version: 2.0.14

Platform: macOS Sonoma 14.6.1

Installation Method: App Store / Direct Download / Other

Expected Behavior:
my todo.txt file is a file that is being synced by Syncthing to other devices.
If the file changes locally due to a local (this computer) edit, the edit is reflected in Sleek and externally almost instantaneously.
If the local file changes due to a sync from a change on an external device, the change should also get reflected in Sleek.

Actual Behavior:
The change does not happen in Sleek and I get an error. The change does happen externally.

From the console:

IpcRenderer.tsx:50 Error: bookmarkDataIsStale - try recreating the bookmark
h @ IpcRenderer.tsx:50
o @ VM5:2
emit @ VM4 sandbox_bundle:2
onMessage @ VM4 sandbox_bundle:2

and i have to remove and reopen the file to get it right.

each time I switch to a different todo tab and back to that tab, a new error msg appears.
closing and reopening does not work.

Steps to Reproduce:
see part 1.

Screenshots:
Screenshot 2024-08-28 at 3 07 45 AM

@ksdavidc
Copy link
Author

@msdisme
Copy link

msdisme commented Dec 19, 2024

Any workaround for this?

@ransome1
Copy link
Owner

@msdisme you could install it via brew. The app will still be signed and auto updated, but won't have the stale bookmark issue.

@ransome1 ransome1 moved this from Backlog to Bugs in sleek 2.x Jan 15, 2025
@ransome1
Copy link
Owner

@msdisme @msdisme I've continued investigating this, and I'm afraid I don’t have good news—at least for the Mac App Store version of Sleek in combination with Syncthing (or likely any other sync app that modifies the file).

If the Mac App Store build of Sleek needs to work with a file on your computer, you must select it within Sleek. Doing so creates what’s called a Security Scoped Bookmark, which is essentially a hash that Sleek saves in your config file. Then, every time Sleek wants to read from or write to this file, it needs to prove it has the necessary permissions. Since Sleek knows the bookmark, it can verify that it has access.

As far as I can tell, this process works reliably with files that are not altered by external sources. However, when Syncthing changes the file, the bookmark no longer matches the file. macOS will then refuse to allow Sleek access to the file, as it expects a different bookmark hash, which Sleek no longer has. To regain access, Sleek needs to recreate the bookmark. The only way to do this is by reopening the file via the file chooser.

I was able to reproduce this issue with Syncthing, and as far as I understand, there’s nothing we can do on our end to resolve it. The only workaround is to install Sleek from outside the Mac App Store, which is fine because the releases on GitHub (or via Homebrew) are signed and notarized by Apple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Bugs
Development

No branches or pull requests

3 participants