Menu

#92 Sync Error On Deleted Notes

v1.0 (example)
closed-out-of-date
nobody
5
2012-06-25
2012-03-10
Anonymous
No

After deleting several notes in NixNote, synchronization hangs and now nothing will synchronize. It was working until today. I'm using version 1.2.

I enabled extreme debugging, but it really didn't tell me anything more than I already knew.

Sample from the error log:
2012-03-10 18:53:27.331 Entering SyncRunner.syncNotes
2012-03-10 18:53:27.332 Active dirty note found - non newf9a9769f-2b1e-4e01-828a-eff9c8f34367
2012-03-10 18:53:27.332 Fetching note content
2012-03-10 18:53:27.335 Updating note : f9a9769f-2b1e-4e01-828a-eff9c8f34367
2012-03-10 18:53:27.865 *** EDAM User Excepton syncLocalNotes EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
2012-03-10 18:53:27.866 EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
2012-03-10 18:53:27.866 Leaving SyncRunner.syncLocalNote
2012-03-10 18:53:27.866 Entering SyncRunner.syncNotes
2012-03-10 18:53:27.866 Active dirty note found - non newfa1f5757-151a-4f2d-af23-313c8c50681b
2012-03-10 18:53:27.867 Fetching note content
2012-03-10 18:53:27.867 Updating note : fa1f5757-151a-4f2d-af23-313c8c50681b
2012-03-10 18:53:28.149 *** EDAM User Excepton syncLocalNotes EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
2012-03-10 18:53:28.151 EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
2012-03-10 18:53:28.152 Leaving SyncRunner.syncLocalNote
2012-03-10 18:53:28.152 Entering SyncRunner.syncNotes
2012-03-10 18:53:28.156 Leaving SyncRunner.evernoteSync
2012-03-10 18:53:28.157 Sync finished
2012-03-10 18:53:28.157 Signaling refresh finished. refreshNeeded=false
2012-03-10 18:53:28.157 Blocking until work is found

Discussion

  • Randy Baumgarte

    Randy Baumgarte - 2012-03-12

    The easiest thing to do is to empty the trash in NixNote and delete the trash in your Evernote account via the web interface, then try synchronizing again.

     
  • Anonymous

    Anonymous - 2012-03-12

    Thanks. I had read that in one of the other reports, but it didn't work. The sync log I posted above is after emptying both trash bins.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-03-12

    Ok. Do you know if the notes it is failing on should be deleted, or if they should not be deleted?

    Typically this error means that there is a note that has not been set to inactive (it isn't deleted) but it has a deleted date populated. Look for notes that are not synchronized (they have the dot in the sync column). If they are not deleted then delete them and un-delete them again. That might reset the flags properly.

    If they are already deleted, try restoring them from the trash and seeing if they will then synchronize.

    If neither works I can try to create a special patch to fix the problem, but I need to know if the notes that are failing should be deleted or if they are still good notes.

     
  • Anonymous

    Anonymous - 2012-03-13

    I have notes that won't sync that are not supposed to be deleted. For grins I deleted one and restored it. It did not help.

    The notes that I did delete I cannot restore, since I had tried the other method you mentioned. I emptied the trash in NixNote and Evernote so there is nothing to restore.

    It appears that the notes I deleted are the notes causing the sync to fail and should be deleted. There are others, not just the couple listed above.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-03-15

    Correcting this is going to be tricky. If there are unsaved changes that you need to keep the easiest thing would be to install H2. When that is done I can try to walk you through the SQL commands to correct the problem directly.

    If you don't have anything you need to keep then the easiest thing to do would be to delete ~/.nevernote/db and resync. It will pull everything down again.

     
  • Anonymous

    Anonymous - 2012-03-17

    Unfortunately there are updates I want to save. Things had been syncing well, so I started making some of my updates in NixNote, and then this happened.

    Although I know which ones didn't sync, so I could manually update those. Remembering which ones I deleted may take a little longer.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-03-18

    Ok. The easiest thing then would be to install H2 database (www.h2database.com). When that is installed I can send you some commands that may help correct the situation. Thanks for your patience. Correcting them may be a little tricky.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-03-23

    Ok. Now comes the fun part...

    First, backup your ~/.nevernote/db directory.

    Next, open H2. The database you want to connect to is NeverNote database locate in your ~/.nevernote/db directory.

    Perform this query:

    SELECT * FROM NOTE WHERE GUID='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    It should bring up one of the notes it is having troubles with. Depending upon what you want to do with the note, you need to pay attention to these fields:

    DELETED --- This is the date the note was deleted. If it says 1969-12-31 19:00:00.00 then no date is set.
    ACTIVE -- If this value is 1, then this is an active (i.e. non-deleted) note.

    If a note is not active, then a DELETED date must be set. If a DELETED date has anything other than the default value of 1969 then the active value must be set to 0. You can't have an active note with a deleted date. My guess is somehow these two values are in conflict.

    Option 1:
    -------------
    If you want to keep the note, issue this command:
    update note set active=1, deleted='1969-12-31 19:00:00', isdirty=1 where guid='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    Option 2:
    ------------
    If you want to mark the note as deleted try this command:
    update note set active=0, deleted='2012-01-01 00:00:00', isdirty=1 where guid='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    Option 3 (and the longest). This will NOT delete anything in Evernote.
    --------------
    If you want to just delete the note completely, issue these commands:
    DELETE FROM NOTETAGS WHERE NOTEGUID='f9a9769f-2b1e-4e01-828a-eff9c8f34367';
    DELETE FROM NOTE WHERE GUID='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    Disconnect from the NeverNote database and connect to the Resources database. Issue this command:
    SELECT GUID FROM NOTERESOURCES WHERE NOTEGUID='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    You need to write down each GUID returned. When you are done you can issue this command:
    DELETE FROM NOTERESOURCES WHERE GUID='f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    Disconnect from the Resources database and connect to the Index database and issue this command:
    DELETE FROM WORDS WHERE GUID= 'f9a9769f-2b1e-4e01-828a-eff9c8f34367';

    Issue the same command for each GUID you found in the Resources query.

    The above commands should delete the note completely, but it is a good deal of work.

    ------------------------------------------------------------------------------

    You should try and synchronize next and see if it gets around the problem. To see which notes are in need of synchronization issue this command :

    SELECT GUID,TITLE,DELETED,ACTIVE,CONTENT from note where ISDIRTY=1;

    Sorry if this is confusing, but please let me know if this helps.

     
  • Anonymous

    Anonymous - 2012-04-06

    baumgarr,

    I just wanted to let you know I haven't forgot about this. I've doing some traveling and haven't had a chance to work on this. Hopefully, this weekend.

     

    Last edit: Anonymous 2014-09-05
  • Anonymous

    Anonymous - 2012-04-06

    Ok. I can connect, but I get an error: Table "NOTE" not found;

    I can test the connection, and it says successful.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-04-09

    What tables are available? H2 will create a new database if one doesn't exist so the fact that you can connect doesn't necessarily mean you are connected to the Nixnote database. Can you paste your connect string?

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-04-27

    Are you still having issues or can I close this ticket?

    Thanks!

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-06-25

    No respose. Closing ticket. Please let me know if you still need help.

     
  • Randy Baumgarte

    Randy Baumgarte - 2012-06-25
    • status: open --> closed-out-of-date
     
  • Andrew Byrd

    Andrew Byrd - 2012-08-13

    Hi, and thanks for all your work on bringing Evernote to a wider range of operating systems. I'm just adding another data point on this sync issue.

    I am running Ubuntu 12.04, and using the binary Nixnote package provided with that distribution. In my case, I did not delete the notes in question. In fact, I definitely do not want them to be deleted. In the status bar, I saw "Error synchronizing - see log for details." The log window available under the help menu contains the line: "Error sending local note: Note.deleted". I then set debugging message level to "extreme" and re-ran the sync.

    Examining ~/.nevernote/logs/syncRunner.log I see:
    2012-08-13 14:19:31.215 Entering SyncRunner.syncNotes
    2012-08-13 14:19:31.215 Active dirty note found - non new57c10a16-c521-440e-ae06-2d61ddf05ff5
    2012-08-13 14:19:31.215 Fetching note content
    2012-08-13 14:19:31.215 Updating note : 57c10a16-c521-440e-ae06-2d61ddf05ff5 <title>Music Notes</title>
    2012-08-13 14:19:31.433 *** EDAM User Excepton syncLocalNotes EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
    2012-08-13 14:19:31.434 EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted)
    2012-08-13 14:19:31.434 Leaving SyncRunner.syncLocalNote

    I then installed H2, and examined this note via the console using the following SQL:
    select * from note where guid = '57c10a16-c521-440e-ae06-2d61ddf05ff5'

    The row contains the following values:
    DELETED = 1969-12-31 19:00:00.0
    ACTIVE = 1
    note is dirty

    According to the Nixnote documentation and your previous comments, DATA_CONFLICT "Note.deleted" indicates "deleted time set on active note". Here, this does not seem to be the case. I am planning to save the offending notes in a text file, then wipe out the database, resync from the server, and hand-update the notes.

    Hope this can help identify the problem.
    -Andrew

     
  • cg122

    cg122 - 2012-09-03

    Hi, I got the similar issue.

    After reading evennote API documentation and testing with the API, I found that the EDAMUserException(errorCode:DATA_CONFLICT, parameter:Note.deleted) could be rasied if the attribute "isSetDeleted" of Note type is 'true', even the "deleted" is "1969-12-31 19:00:00.0" and "active" is "true".

    What I have done is to change the value of "isSetDeleted" to "false" via the evernote API and the Nixnote could sync without error populated afterwards. The side-effect of this walkaround is a "conflicting changes" appeared in my Nixnote.

    So I guess, the restore operation should probably consider the attribute "isSetDeleted" as well besides "deleted" and "active".

    Hope this piece of information helps.

     

Log in to post a comment.