d1vanov / quentier

Cross-platform desktop Evernote client
GNU General Public License v3.0
131 stars 16 forks source link

Initial sync seems to be stuck in the middle #183

Closed robert7 closed 6 years ago

robert7 commented 6 years ago

Initial sync seems to be stuck exactly at 50%. Status bar info isn't updating anymore. According to log the app is still doing something (could be all is OK), but the not updated status is confusing.

Also many notes display "Please select some existing note..." - maybe just the header is downloaded (?) - which is also confusing.

..I don't want to post log here as with TRACE level it is very huge and contains my notes; I can try to recreate later with some test data. quentier-initial-sync

robert7 commented 6 years ago

Under crashes you mean the actual crashes of Quentier process,

yes. SEGFAULTs; but I did not run with debugger; I haven't more info now; but I will follow it later.

About getting rid of particular notes blocking the sync

It was remote note, which I edited locally in Quentier. Then it blocked the sync. And I could not get rid of it except by deleting whole ~/.quentier directory. In Nixnote there is workaround for this case: edit the offending remote note e.g. via web client. Then it causes conflict in next sync. And conflicted note then becomes "local note" (in a local notebook called "Conflicts") which can be deleted locally => fixed. Again: if I find steps for reproduction, I will fill issue with details.

d1vanov commented 6 years ago

You built Quentier without Google breakpad as I understand? With breakpad each crash should have generated a minidump which you could then share with me so that I can also examine it.

I'll think of some ways to make it possible to mitigate sync problems. For one thing, "dirty" flag can be removed from locally modified notes thus making it possible to workaround the sync problem. However, I wouldn't like it to become a common practice among user base to use such workarounds i.e. it's better to nail down and fix sync problems. Since most casual users don't alter preferences, these developer & power user oriented tools can be disabled by default and only be possible to enable somewhere deep within the preferences.

if I find steps for reproduction, I will fill issue with details.

That would be great, however, it would be even greater if you just ran Quentier with trace level logs enabled and on each occasion of some sync failure just archived the log and shared it here with me so I can troubleshoot. The trace level logs are pretty explicit most of the time so it would likely be possible to figure out the error from them alone, even without steps to reproduce.

robert7 commented 6 years ago

However, I wouldn't like it to become a common practice among user base to use such workarounds i.e. it's better to nail down and fix sync problems. Since most casual users don't alter preferences, these developer & power user oriented tools can be disabled by default and only be possible to enable somewhere deep within the preferences.

yes. agree.

it would be even greater if you just ran Quentier with trace level logs enabled and on each occasion of some sync failure

so here is next one: infinite sync loop what I did:

  1. start from scratch - login to evernote (test account with ~5 notes)
  2. delete one note (the one was for some reason marked "- conflicting"); but in WebClient seems to be fully normal note in "First Notebook"
  3. click on sync - sync fails with error & restarts => loop now again only thing left is delete everything and start from scratch infinite-sync.zip
robert7 commented 6 years ago

screen_20180720_09 I wonder how we could get conflict, if I just did full-initial sync, then only modified note in Quentier and didn't do anything on remote side..

robert7 commented 6 years ago

developer & power user oriented tools can be disabled by default and only be possible to enable somewhere deep within the preferences

If you can write me some hints how to implement this "local override/emergency" setting - I can try to implement. The thing is, I would like to start using Quentier to edit my real notes, but so far I can't (and thus I'm forced to use nixnote for it). I agree we should fix all sync problems, but meanwhile have some emergency way to workaround around broken local state.

Maybe "setting offending note" to dirty=false, then editing the note via web client & resync would do it as first try?

robert7 commented 6 years ago

..yes I did build without breakpad; as for some reason the breakpad is not found during build

"Google Breakpad was not found, will build without it"

althought I compiled & installed it according to your docs; I didn't yet had time to investigate more

I have breakpad installed in /usr/local/lib

robert7 commented 6 years ago

I did this:

git clone https://chromium.googlesource.com/breakpad/breakpad
cd breakpad
git checkout chrome_64
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss

./configure --prefix=/usr/local
make
sudo make install
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug -DUSE_QT5=1 -DUSE_QT5_WEBKIT=1
-- Using GNU C++ compiler, version 5.4.0

-- This version of GNU C++ compiler supports C++11 standard.
-- Using GNU gold linker
-- Found Qt5 installation, version 5.5.1
-- Found QEverCloud library: /usr/local/lib/libqt5qevercloud.so.4.0.0
-- Found tidy-html5 library: /usr/local/lib/libtidy.so.5.6.0
-- Found libquentier library: /usr/local/lib/libqt5quentier.so.0.4.0
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   program_options
-- Google Breakpad was not found, will build without it
d1vanov commented 6 years ago

Per Evernote documentation, DATA_CONFLICT exception occurs on attempt to update note if it's deleted (i.e. deletion timestamp is present) but is still marked as active (note property). Probably I haven't tried to sync a deleted note myself and thus haven't implemented this properly. So what you see in the log is actually a wrong assumption of what this exception means which is also a bug. What should actually be fixed is setting the note's active property to false along with specifying the deletion timestamp.

If you can write me some hints how to implement this "local override/emergency" setting

I guess I can. I'll file an issue for this with explanations, hopefully over the weekend. Setting the dirty flag to false should actually fix the notes unable to be sent - they should become overridden by their remote versions.

I have breakpad installed in /usr/local/lib

Try to pass -DBREAKPAD_ROOT=/usr/local argument to cmake.

robert7 commented 6 years ago

I'll file an issue for this with explanations, hopefully over the weekend.

OK.

Breakpad is now found. Thx

robert7 commented 6 years ago

Regarding of sync with deleted note => loop. It seems easy to repeat => I'll create separate issue.

d1vanov commented 6 years ago

Pushed one more change to development which creates titles for notes lacking them - either from note content's first phrase or "Untitled note". Seems to work on my test account. Since this issue was originally about the initial sync and since that appears to be somewhat working now and since there are separate issues for further problems, closing this one.

robert7 commented 6 years ago

ok