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

Notes.sqlite tag sync #926

Closed
joeydc opened this Issue Jun 1, 2018 · 28 comments

Comments

Projects
None yet
4 participants
@joeydc

joeydc commented Jun 1, 2018

Let say I have QON opened on 2 PC at the same time.
If I add a tag for one of my note with PC1, Nextcloud on PC2 can't download the new notes.sqlite. It says " Access is denied".
It cause issue because on PC2, I'm not getting the new tag.

Here's a screenshot of Nextcloud on PC2.
image 043

@pbek pbek added the question label Jun 1, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jun 1, 2018

Maybe your Nextcloud client is syncing the file and that's why it's locked... I've never seen that issue. My notes.sqlite constantly gets downloaded while QOwnNotes is running...

@joeydc

This comment has been minimized.

joeydc commented Jun 1, 2018

If I close QON on PC2 and force Nextcloud to sync, everything is fine.. but that's so inconvenient.
That means QON is locking the file and Nextcloud is not able to overwrite the existing notes.sqlite

@pbek

This comment has been minimized.

Owner

pbek commented Jun 2, 2018

What are the operating systems of your PCs? (you didn't post your debug output)

@joeydc

This comment has been minimized.

joeydc commented Jun 2, 2018

I'm sorry about that.
Windows 10 for both PC and Ubuntu inside an LXC container for Nextcloud server.
I have a Laptop running Arch, I'll test tonight if it's doing the same thing.

@joeydc

This comment has been minimized.

joeydc commented Jun 4, 2018

QON for linux is not affected by this. I can change a TAG on any PC and I'll sync correctly even if I have QON opened.
If I change any TAG on my Linux/Win QON, it will not sync correctly on Win PCs if QON is opened, Nextcloud says: Access is denied.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 4, 2018

Strange. Sounds like an implementation detail of Qt on Windows or some special thing on your Windows PC... I wonder if someone else can reproduce this issue.

@stobbsm

This comment has been minimized.

Contributor

stobbsm commented Jun 4, 2018

I have a Windows VM I'm setting up tomorrow. I can try it then.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 5, 2018

Great, @stobbsm! Thanks a lot!

@stobbsm

This comment has been minimized.

Contributor

stobbsm commented Jun 11, 2018

I can confirm this is an issue in my Windows 10 vm.
Sorry for being so late in getting back. Was a hell of a week.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 11, 2018

Thank you for testing. But I'm not sure how to deal with that, since database handling is done by Qt directly (if that is the reason and not the Nextcloud server or client)... I haven't found anything to this topic on the internet...

@thornpw

This comment has been minimized.

thornpw commented Jun 13, 2018

I also have the problem, that a tag I added on a Windows System is not synced to another Linux PC, and wisewerse.

@joeydc

This comment has been minimized.

joeydc commented Jun 13, 2018

@thornpw are you sure it doesn't work both way? Because I've tested adding a TAG on Windows 10 and my Linux QON+Nextcloud get sync perfectly fine. However, the other way around cause an issue.

@thornpw

This comment has been minimized.

thornpw commented Jun 13, 2018

I add on Windows a Note. This was synced. Then I added a tag, this was not synced from Windows to Linux. I use latest QON versions and the ownCloud Client und arch Linux (Manjaro). Also from Linux to Windows it does not work. Maybe a generell Problem with my database?

@thornpw

This comment has been minimized.

thornpw commented Jun 13, 2018

Found out, that on Linux I had a 18.06.1 instead of 18.06.2 on Windows. Also got an update on Windows. Now It works from Window (create note) to Linux. But still not from Linux to Windows. Also adding a tag in windows on a node that was synced without tags from linux to windows does not work

@joeydc

This comment has been minimized.

joeydc commented Jun 13, 2018

Do you get any sync error with your ownCloud client?

@thornpw

This comment has been minimized.

thornpw commented Jun 13, 2018

Sorry, a filter was active. I get the message, that the sourcefile could not be deleted on Windows

@pbek pbek added upstream-problem and removed question labels Jun 13, 2018

@thornpw

This comment has been minimized.

thornpw commented Jun 13, 2018

After uninstalling both the client and the QON not it looks like it works. But only once. I will wait 2 days, maybe there is a fix.

pbek added a commit that referenced this issue Jun 17, 2018

pbek added a commit that referenced this issue Jun 17, 2018

@pbek pbek added the enhancement label Jun 17, 2018

@pbek pbek added this to the 18.06.3 milestone Jun 17, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jun 17, 2018

18.06.3

  • the note folder database will now be explicitly closed for Windows after each
    operation to prevent synchronization problems
@pbek

This comment has been minimized.

Owner

pbek commented Jun 17, 2018

I tested this with Linux, macOS and Windows at the same time.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 17, 2018

There now is a new release, could you please test it and report if it works for you?

@thornpw

This comment has been minimized.

thornpw commented Jun 17, 2018

Tested the new release and it works, thanks for your efforts.

@joeydc

This comment has been minimized.

joeydc commented Jun 17, 2018

Yes, I confirm. Problem fixed.
Thank you !

@pbek

This comment has been minimized.

Owner

pbek commented Jun 17, 2018

Great there was a solution (I hope with no side-effects) ;)
Thank you for testing and reporting!

@pbek pbek closed this Jun 17, 2018

pbek added a commit that referenced this issue Jun 20, 2018

pbek added a commit that referenced this issue Jun 20, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jun 20, 2018

18.06.5

  • disabled note folder database closing feature temporarily, since it breaks
    the application under Windows for new note folders

see #945

@pbek pbek reopened this Jun 24, 2018

pbek added a commit that referenced this issue Jul 3, 2018

pbek added a commit that referenced this issue Jul 6, 2018

pbek added a commit that referenced this issue Jul 6, 2018

pbek added a commit that referenced this issue Jul 6, 2018

pbek added a commit that referenced this issue Jul 6, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jul 6, 2018

18.07.2

  • on Windows there now is a new experimental settings in the General settings
    to automatically close the note folder database to prevent problems with sync
    tools

@pbek pbek modified the milestones: 18.06.3, 18.07.2 Jul 6, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jul 6, 2018

There now is a new release, could you please test it and report if it works for you?

@joeydc

This comment has been minimized.

joeydc commented Jul 6, 2018

Yes, working as expected. Checking the new option in the General tab fix the sync issue.
Thanks !

@pbek

This comment has been minimized.

Owner

pbek commented Jul 6, 2018

Thank you for testing. Let's hope there are no other regressions, it was a lot of work.

@pbek pbek closed this Jul 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment