Mikescher/AlephNote

Sync error with StandardNotes

Closed this issue · 3 comments

jnsl commented

Execption while syncing notes: Object reference not set to an instance of an object.

System.NullReferenceException:

 Object reference not set to an instance of an object.
   at AlephNote.Plugins.StandardNote.StandardNoteAPI.<>c.<Sync>b__27_1(APIResultItem p)
   at System.Linq.Enumerable.<>c__DisplayClass6_0`1.<CombinePredicates>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at AlephNote.Plugins.StandardNote.StandardNoteAPI.Sync(ISimpleJsonRest web, StandardNoteConnection conn, APIResultAuthorize authToken, StandardNoteConfig cfg, StandardNoteData dat, List`1 allNotes, List`1 notesUpload, List`1 notesDelete, List`1 tagsDelete)
   at AlephNote.Plugins.StandardNote.StandardNoteConnection.StartSync(IRemoteStorageSyncPersistance idata, List`1 ilocalnotes, List`1 localdeletednotes)
   at AlephNote.Common.Repository.SynchronizationThread.DoSync()

Does that error happen on every sync or only once, and are you on the newest version?

I'm a little busy this week and won't have time until the weekend, sorry.

jnsl commented

Latest version of AlephNote, never syncs, even with purged local storage.

Strange - I'm running the StandardNote plugin too and don't encounter that problem.
It kinda seems as if SN is sending you a strange sync response with null items...

Okay, I need you to do something for me:

  1. Exit AlephNote
  2. Start AlephNote with the --debug Parameter (vie the command line or create a link to AlephNote.exe and append --debug to the target field)
  3. Press the sync button or wait for the error to occur normally
  4. Go to Help -> Show Log.
  5. Due to the debug mode you can now check the checkbox (top-right) Show debug events
  6. Scroll through the List - there should be one log entry named DEBUG date+time REST [[something]] SendRequest<GenericTwoWay> [FINISH] (https://n3.standardnotes.org/items/sync :: POST)
  7. Click on it and copy the long text that is displayed in the textbox below - this is the API response. Please post this response here.

If the response contains (private) note content of you, you can (should) anonymize that - or send it to me via mail (mailport[ä]mikescher.de).
You could also click the export button and send that to me - but it there was a auth request in your current session it would contain data of that too (aka your username+password), it's on my todo list to remove them from the log...