omnivore-app / logseq-omnivore

Logseq plugin to fetch articles and highlights from Omnivore
MIT License
279 stars 15 forks source link

'loading' setting is not cleared on error, effectively disabling the plugin #82

Closed licquia closed 1 year ago

licquia commented 1 year ago

New user here. When setting up, I believe I made a mistake setting up the plugin; it was probably that I switched the fetch setting to "advanced", but didn't supply a query, but I can't be sure. After switching that back to "highlights only", clicking the manual sync button would only produce the message "Omnivore is already syncing", with the Omnivore page remaining completely empty. Nothing I did would persuade the plugin to work.

After a quick check of the source code and the saved settings file, I discovered the "loading" hidden setting in the preferences was set to "true". I closed logseq, set it to "false" manually with a text editor, and restarted, which got it to sort of work. Unfortunately, I had made another mistake in my setup in my scramble to figure out how to get the plugin to work, and my graph reference was now wrong. I fixed this, only for the plugin to stop working again. Sure enough, the "loading" preference had switched back to "true". After another close/edit/restart cycle, everything now seems to be working.

I'm sure you can imagine how frustrating this is for a new user.

My suggestion: always set the "loading" preference to "false" on startup. I don't know logseq well enough to know if that's possible, though.

darrenstu commented 1 year ago

I am getting the same 'Omnivore is already syncing' message.

I have tried various permutations of 'advanced' with 'label:Sent to Logseq' to 'highlights only' ...but still get the same message.

Can you please proved a bit more information regarding your fix ?

I'm not IT savy enough to know where I can locate this 'source code' and how to update this preference to 'true'

Any help would be appreciated as I am keen to integrate this into logseq ... it looks a fantastic way of getting highlighted text and notes into my PKM.

sywhb commented 1 year ago

Hey @licquia @darrenstu, I'm so sorry for the inconvenience caused.

The loading setting is created to prevent multiple concurrent sync and it is expected to switch to false whenever a sync is completed. Based on your information, I have a feeling that something happened when you changed the settings which caused the plugin to restart or start a new instance so the "old" instance is still trying to sync (loading is still true).

There is an existing problem with Logseq that if you upgrade the plugin, highly likely it will start a "duplicate" instance of the plugin which caused duplicated articles being synced. It looks like to be related to this issue. I'm still trying to figure out a solution to the problem.

@licquia's suggestion is a pretty nice hack. I will incorporate it in the next release of the plugin if I cannot solve it permanently.

cc: @jacksonh

licquia commented 1 year ago

Thanks, @sywhb!

@darrenstu, if you want to fix this yourself, you'll first need to find where your global configuration for logseq is. I'm on Linux, and I find it under .logseq in my home directory. This is different from the path where you load your graph.

Once you've found that, look for settings/logseq-omnivore.json, and edit that file. You'll find a line that says something like "loading": true. Change "true" to "false", and you should be good. Beware of any other changes; if there's commas or quotes, leave them as they are.

If your file contains "loading": false, then you've got a different problem than what I described.

darrenstu commented 1 year ago

Thank Jeff,

I am now up and running. Many thanks from Down Under.

Cheers Darren

On Wed, Mar 22, 2023 at 2:59 AM Jeff Licquia @.***> wrote:

Thanks, @sywhb https://github.com/sywhb!

@darrenstu https://github.com/darrenstu, if you want to fix this yourself, you'll first need to find where your global configuration for logseq is. I'm on Linux, and I find it under .logseq in my home directory. This is different from the path where you load your graph.

Once you've found that, look for settings/logseq-omnivore.json, and edit that file. You'll find a line that says something like "loading": true. Change "true" to "false", and you should be good. Beware of any other changes; if there's commas or quotes, leave them as they are.

If your file contains "loading": false, then you've got a different problem than what I described.

— Reply to this email directly, view it on GitHub https://github.com/omnivore-app/logseq-omnivore/issues/82#issuecomment-1477888246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW3VY2CEAUNIAO3HH3IUJPLW5GX43ANCNFSM6AAAAAAV62IZYU . You are receiving this because you were mentioned.Message ID: @.***>

jacksonh commented 1 year ago

Thanks for this @licquia

sywhb commented 1 year ago

Hi everyone,

I'm happy to announce that I have fixed the issue related to the plugin in #85. If you're experiencing this issue, please upgrade your version of the plugin to the latest version.

Thank you for your patience and understanding.