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

FR wait for file sync #36

Open
mickahouan opened this issue Feb 9, 2023 · 4 comments
Open

FR wait for file sync #36

mickahouan opened this issue Feb 9, 2023 · 4 comments
Labels
enhancement New feature or request recorded response

Comments

@mickahouan
Copy link

Hello,
I have obsidian on both windows and mac and I use obsidian sync.
I ran smart connections correctly 48 hours ago on windows, but it was not working on mac.
Then when I went back to windows, it told me that there were failed files.
Now it tells me that my API key is not working correctly when I do the API key test from Obsidian.
To have the file on the mac properly addressed, I tried to copy my .smart-connections file from windows to my macbook.
Also, in the sync settings, do I have to sync all other file types for it to work correctly (the option was disabled in my case)?
Also, in the Api key test it tells me that: Api key is not working as expected.
Knowing that there was an update on 07.02.23, I wonder if there is not an error somewhere. Before the update in any case, everything was working correctly on my windows computer.
I restarted a sync to see by deleting all the files and starting again on new (restarting the embedding).
Oh and thank you for this great Plugin, I can't wait to see the rest.

@pinuke
Copy link
Contributor

pinuke commented Feb 10, 2023

@brianpetro I think it would be best to start a new issue for to address all sync errors. Seems like this is platform agnostic lol.

@brianpetro
Copy link
Owner

Thanks for starting this issue.

Yes, if you are using sync, you should enable the all file types setting to make it sync the embeddings.json file.

In my own vault, I explicitly exclude my smart-connections folder from syncing because I only sync to mobile devices, and this plugin is desktop only. So I haven't had much experience related to the syncing desktop to desktop. But I do know, when I open my mobile device, I usually have to wait for it to "catch up" before editing existing notes.

Waiting for sync to complete was mentioned in another issue's comment. I found this snippet in the plugin-dev discord so I'm saving it here for future reference in developing a wait function at startup.

let sync = this.app.internalPlugins.plugins.sync.instance;
sync.on("status-change", () => { console.log("sync status is", sync.syncStatus) })

I've also had some ideas about segmenting the Embeddings into multiple files, but that's still in the experimental phase.

If there was a bug in the latest updates, based on the updates that were made, you should be able to find errors in your console log. Please screenshot them and let me know if you see any.

The failed files could be related to the API key failing and the API key failing should be unrelated to the syncing. So if you continue to have problems with it, please open another issue so we can focus on that. But don't hesitate to "retry failed files" in the settings. I often get some failed files simply when the WiFi disconnects or when OpenAI has temporary outages. And people with free OpenAI accounts may get them even more often if they hit the rate limits.

I'll be keeping my eye on this. Thanks for everyone's help in figuring out these issues!

@brianpetro brianpetro changed the title file synchronization error and bugs FR wait for file sync Mar 1, 2023
@brianpetro
Copy link
Owner

@mickahouan version 1.2.4 fixes a bug that may have negatively affected your issue.

@brianpetro brianpetro added enhancement New feature or request recorded response labels Jun 27, 2024
@brianpetro
Copy link
Owner

Recorded response https://youtu.be/gcCIFV0pLI0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request recorded response
Projects
None yet
Development

No branches or pull requests

3 participants