Can't save on Windows version

Bug report

Environment

  • Platform: Windows
  • Platform version: 11
  • App Version: 5.11.6

How to reproduce

  1. Edit a note.
  2. Click sync and wait for it to finish.
  3. Switch notes and back.
  4. Notice that the edits from (1) have disappeared.

Since about two days ago my edits from Windows simply do not save. It doesn’t even try to save as far as I can tell.

I am using the vim bindings and previously if I typed :w it would trigger a sync but it no longer does.

I’ve checked the developer tools and there are no errors shown.

Everything was working fine until a few days ago. I don’t think anything about my computer changed in that time.

There is plenty of space on my hard disk. Edits from my Android phone sync as expected.

I’m really stuck because I lost quite a bit of data that I wrote over the weekend that got subsequently replaced when I synced the version from the server.

After fiddling with this for quite some time it now just started working again. I have no idea why.

Hi Brian,

Sorry for the trouble.
If you encountered the issue again, please check out the Developer Console and if there are any error logs.
I’ll try my best to reproduce it and fix it.
Good to hear that it is working fine now.
Let me know if it happens again.
Also, please try pressing Ctrl-S to manually save the currently editing note.

Thanks Takuya,

When it happened I checked the Developer Console and there were no errors there.

I didn’t try Ctrl+S but I did use :w which normally saves and syncs but it didn’t. I’ll try Ctrl+S if it happens again.

Thanks!

1 Like

It happened again today. It’s saving now but I lost all today’s work since I didn’t notice it hadn’t saved and when I touched another note it synced an old version over all my changes.

The app saves the editing note when opening another note, but it is randomly not working in your setup, which sounds significantly strange.
It also saves when the app loses focus.
The app tries its best not to lose your work.

I suspect one of the installed plugins is causing it, since it happens randomly.
I have never had such an issue, even though I use it every day.

I touched another note it synced an old version over all my changes

What does your revision history of the note look like? You can check old revisions:

Also, if you’re interested, please try the v6 canary version:

Yes, unfortunately I don’t have any steps to reliably reproduce it yet. It’s possible I just never switched notes and it didn’t save when closing and then something caused a sync with overwrote it.

I don’t think that’s it because I only have the built-in plugins (export-as-html etc.) plus the vim one.

There are no revisions for the period where it failed to save. Only the revisions coming from the server. It appears it simply didn’t save. Even when I typed :w it would not save, the sync would not run, and the “last updated” time next to the note would not update.

Thanks. I might try that later. I’ll see if the problem reproduces in the next few days first and see if I can identify any possible reasons.

1 Like

Just happened again. Two days of work lost. It was clearly saved somewhere because the content was there after restarting my computer. But then after I touched another note the note that wasn’t syncing just got clobbered by whatever was on the server. When I check the revision history there are no revisions for that note from the last two days.

Do you store the user directory on an external drive or cloud drive?
What you reported sounds like your local database has been entirely rolled back randomly.

No, I haven’t done anything particularly special—I’ve hardly touched the settings at all.

When this problem has occurred the changes are visible in the buffer and persisted even when I restart the machine, but they just don’t sync. When I change another document, however, everything syncs and the changes to the original document are lost with no revisions shown.

I think I encountered a “[conflicted]” document a few days ago and deleted the conflicted version. Maybe Inkdrop got confused and was trying to sync to the conflicted document ID?

  1. The note X is stored in the local database properly
  2. You can open the note X after restarting the app/machine
  3. X does not have a revision history
  4. X is not synced with the Inkdrop server
  5. Other notes are synced properly
  6. When you change another note Y, X is lost

Is that correct?
Inkdrop duplicates the conflicted note with a different note id. So it should have nothing to do with this issue.

  1. I assume so. It’s stored somewhere.
  2. Yes.
  3. I’m not sure. After my changes for the last 2 days were lost, I checked the revision history for X and the previous revision was 2 days ago. I can’t say if it had revision history before it got clobbered, however.
  4. Yes. I tried manually choosing “Synchronize Notes” and it would appear to sync but when I looked at X on my phone it clearly hadn’t been updated, even after restarting the app on my phone.
    6.Yes, the changes to X were lost.
  1. I think it was stored in the cache, which is for improving the launch speed
  2. That’s because the note was only cached.
  3. The note has never been saved in the database
  4. Because of 3
  5. You lost the note X when opening another note because the cache was updated. That makes sense.

Let me check: Have you ever opened another note while editing X? I assume no.

So, we need to know what actually prevents a new note from being saved.
How do you create a new note? By pressing Ctrl-N?
Are there any common points in your notes that have been lost? For example, title length, number of tags, special characters usage, etc.

I tried to create a new note with a long title exceeding the limit (>256). When opening another note, it properly displayed an error. So, the note validation works fine at least.

That certainly seems to fit what I experienced.

I don’t think I ever opened another node while editing X. X is my daily TODO / scratchpad which I work on heavily. I haven’t reached into my other notes recently.

I haven’t been creating new notes recently. When I do I press the icon in the top-right of the notes panel but I assume that’s irrelevant because I haven’t done that recently.

The previous time this occurred I think it was X as well. The title is short (“Today”), the document is quite long and has a lot of checkboxes, and it has a mix of English (90%) and Japanese (10%) plus a few emoji. It has no tags but is Active.

I’ve been using X for months so I don’t think it’s an existing problem with X but maybe I typed something odd in there 2 days ago that triggered something.

Do you mean that it happened to the existing note?
You’ve been editing X for months, but it’s occasionally not being saved. So, you lost two days of work in X. You haven’t lost the entire note of X. Is that correct? Is X properly saved now after making some changes?

Yes, that’s right. It happened to the existing note.

I think the last time I faced data loss it was the same note.

Yes, I lost two days of work on X, not the entire note. Yes, it is properly saving now.

Got it. Sorry for the trouble.
I’m afraid that it is super tricky to identify the culprit from what you reported at the moment. I use the app every day, but I have never lost my notes due to this issue.
Can you try creating a new note to avoid the possibility of a note-specific issue in X?

I hope it doesn’t happen on v6 with a new editor.

Sure, I can try creating a new note. I wonder if the issue is Windows-specific.

For what it’s worth, I frequently encounter conflicts (several times a week) but I suspect that is because sync doesn’t finish before I close the app. Having the diff feature on desktop would save me so much time manually comparing conflicted files to work out what to keep.

Getting conflicts so frequently also sounds weird.
I’m not sure, but there may be something wrong in the process of saving notes, probably in your setup/environment.
Conflicts happen only when a note has another revision created before saving the current edit.
It could happen if a plugin tries to override the saving behavior or you customize the core:save-note command in your init.js.
When getting a new revision made on another client, the app automatically reloads the note. But it doesn’t reload when you already made some changes.
It might have something to do with the unsaved note issue.

I’ll check