drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

Repeatedly shows old files as unsaved even if they were actually saved

Open larsch opened this issue 2 years ago • 12 comments

Nearly every time I open drawio-desktop on Windows 10, it pops up with the previous file that I have worked on and shows it as "Unsaved", and even sometimes "Untitled", even though I have saved it previously. The issue happens to me on a daily basis, and it is nerve-wrecking because I become unsure if I have actually saved the diagram, but every time i check, I actually have.

I can't figure out what the steps are to reproduce this, because when I either just close and discard the supposedly "unsaved" file or actually save a new copy somewhere and close drawio-desktop, it opens just fine the next time with the standard Create New / Open Existing diagram. The only thing I can think of is that if it could be related to having the diagram open (but unchanged) some time after it was saved, and then closing the window (e.g. Alt-F4) without any further save.

I'm up to 20 different c:\temp\unsaved*.drawio backups over the last couple of months due to this.

Version; 20.3.0, but problem has existed for some time. My first 'unsaved' backup are from April 2022, with more in June, and it didn't appear to be a problem before an update around that time.

larsch avatar Sep 23 '22 06:09 larsch

I have this same issue on mac osx

macasas avatar Dec 12 '22 12:12 macasas

Same here, and quite annoying. Clearly a significant bug, and has been around for a long time.

bulentkucuk avatar Sep 29 '23 09:09 bulentkucuk

Can you please provide specific steps to reproduce?

m-mohamedin avatar Sep 29 '23 16:09 m-mohamedin

I'm experiencing the same problem with v22.0.3.

What happens on my system is the following:

  1. I open the file Communication overview.drawio.
  2. After waiting for like 10 seconds, I make one change (move a line segment).
  3. Immediately the red Unsaved changes. Click here to save. notice appears.
  4. 5 seconds after step 3 the file .$Communication overview.drawio.dtmp gets created.

Situation 1

If I click on the red Unsaved changes. Click here to save. notice before the file .$Communication overview.drawio.dtmp gets created, the following happens:

  • The file Communication overview.drawio gets updated.
  • 5 seconds after step 3 the file .$Communication overview.drawio.dtmp still gets created.

When I now close draw.io, and reopen the file Communication overview.drawio, it will show the Unsave changes dialog.

Situation 2

If I click on the red Unsaved changes. Click here to save. notice after the file .$Communication overview.drawio.dtmp gets created, the following happens:

  • The file Communication overview.drawio gets updated.
  • The file .$Communication overview.drawio.dtmp gets removed.

When I now close draw.io, and reopen the file Communication overview.drawio, it will not show the Unsave changes dialog.

Draw.io preferences

My draw.io preferences:

{
  "language": "en",
  "configVersion": null,
  "customFonts": [],
  "libraries": "general;uml;er;bpmn;flowchart;basic;arrows2",
  "customLibraries": [
    "L.scratchpad"
  ],
  "plugins": [],
  "recentColors": [
    "FFFFFF",
    "FF6666",
    "FF0000",
    "FF4444",
    "FF7777",
    "FF3333",
    "FF9999",
    "FFCCCC",
    "CCCCCC",
    "E6E6E6"
  ],
  "formatWidth": 240,
  "createTarget": false,
  "pageFormat": {
    "x": 0,
    "y": 0,
    "width": 1169,
    "height": 827
  },
  "search": true,
  "showStartScreen": false,
  "gridColor": "#e0e0e0",
  "darkGridColor": "#6e6e6e",
  "autosave": false,
  "resizeImages": null,
  "openCounter": 159,
  "version": 18,
  "unit": 2,
  "isRulerOn": false,
  "ui": "simple",
  "darkMode": false,
  "sketchMode": false,
  "pages": true
}

JeroenOortwijn avatar Nov 08 '23 10:11 JeroenOortwijn

Workaround

Setting Draft save interval [sec] (0 to disable): from 5 to 0 causes the .$Communication overview.drawio.dtmp to not appear anymore and "fixes" this bug.

Draw.io preferences

My new draw.io preferences:

{
  "language": "en",
  "configVersion": null,
  "customFonts": [],
  "libraries": "general;uml;er;bpmn;flowchart;basic;arrows2",
  "customLibraries": [
    "L.scratchpad"
  ],
  "plugins": [],
  "recentColors": [
    "FFFFFF",
    "FF6666",
    "FF0000",
    "FF4444",
    "FF7777",
    "FF3333",
    "FF9999",
    "FFCCCC",
    "CCCCCC",
    "E6E6E6"
  ],
  "formatWidth": 240,
  "createTarget": false,
  "pageFormat": {
    "x": 0,
    "y": 0,
    "width": 1169,
    "height": 827
  },
  "search": true,
  "showStartScreen": false,
  "gridColor": "#e0e0e0",
  "darkGridColor": "#6e6e6e",
  "autosave": false,
  "resizeImages": null,
  "openCounter": 162,
  "version": 18,
  "unit": 2,
  "isRulerOn": false,
  "ui": "simple",
  "darkMode": false,
  "sketchMode": false,
  "pages": true,
  "draftSaveDelay": 0
}

JeroenOortwijn avatar Nov 08 '23 10:11 JeroenOortwijn

Setting Draft save interval [sec] (0 to disable)

Autosave is a disabled menu item, so how would I go about setting the interval to 0?

On 8 Nov 2023, at 10:35, Jeroen Oortwijn @.***> wrote:

Workaround

Setting Draft save interval [sec] (0 to disable): from 5 to 0 causes the .$Communication overview.drawio.dtmp to not appear anymore and "fixes" this bug.

— Reply to this email directly, view it on GitHub https://github.com/jgraph/drawio-desktop/issues/1127#issuecomment-1801583969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG6GAUSI5DNY5XPIKMRAF3YDNN6XAVCNFSM6AAAAAAQTV4KVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGU4DGOJWHE. You are receiving this because you commented.

macasas avatar Nov 08 '23 10:11 macasas

Autosave and Draft save are two different things apparently.

In the Simple theme UI, you can find the Draft option here: image ( Click on: (...) → Settings → Drafts... )

Setting Draft save interval [sec] (0 to disable) Autosave is a disabled menu item, so how would I go about setting the interval to 0?

JeroenOortwijn avatar Nov 09 '23 09:11 JeroenOortwijn

Many thanks, now sorted.

On 9 Nov 2023, at 09:26, Jeroen Oortwijn @.***> wrote:

Autosave and Draft save are two different things apparently.

In the Simple theme UI, you can find the Draft option here: https://user-images.githubusercontent.com/51476918/281680928-2eb335a9-a871-48ca-8b27-c4faa5e8b9dd.png ( Click on: (...) → Settings → Drafts... )

Setting Draft save interval [sec] (0 to disable) Autosave is a disabled menu item, so how would I go about setting the interval to 0? … x-msg://1/# On 8 Nov 2023, at 10:35, Jeroen Oortwijn @.***> wrote: Workaround Setting Draft save interval [sec] (0 to disable): from 5 to 0 causes the .$Communication overview.drawio.dtmp to not appear anymore and "fixes" this bug. — Reply to this email directly, view it on GitHub <#1127 (comment) https://github.com/jgraph/drawio-desktop/issues/1127#issuecomment-1801583969>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG6GAUSI5DNY5XPIKMRAF3YDNN6XAVCNFSM6AAAAAAQTV4KVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGU4DGOJWHE https://github.com/notifications/unsubscribe-auth/AAG6GAUSI5DNY5XPIKMRAF3YDNN6XAVCNFSM6AAAAAAQTV4KVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGU4DGOJWHE. You are receiving this because you commented.

— Reply to this email directly, view it on GitHub https://github.com/jgraph/drawio-desktop/issues/1127#issuecomment-1803461456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG6GARE675NHCFH4LH7GMTYDSOTXAVCNFSM6AAAAAAQTV4KVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTGQ3DCNBVGY. You are receiving this because you commented.

macasas avatar Nov 09 '23 09:11 macasas

Will be fixed in the next release Thanks @JeroenOortwijn for the detailed analysis

m-mohamedin avatar Dec 28 '23 15:12 m-mohamedin

In desktop release 22.1.16.

davidjgraph avatar Dec 29 '23 09:12 davidjgraph

This just occurred for me in v23.0.2. I get an "unsaved diagram" every time I open draw.io desktop with an earlier version of the diagram that I have definately saved. I can even save it, close draw.io, and then when I open it, draw.io shows the same unsaved diagram again.

I repeated this 6 times, but then i removed Documents\.$myfile.drawio.bkp, and the problem stopped. Shouldn't draw.io be removing this file?

Note: My Documents folder is in OneDrive. Maybe there is some interaction going on here.

larsch avatar Feb 09 '24 09:02 larsch

@davidjgraph can you reopen this please? I'm getting this issue in v23.1.5 all the time.

I have a feeling that it is related to files being stored in OneDrive, but I am unsure.

If I get the unsaved file, saved it locally, then close the file in draw.io, and close draw.io fully, I still get the same "unsaved" file if I reopen draw.io.

larsch avatar Feb 26 '24 12:02 larsch

The original issue is fixed, I'm going to close this.

We're aware that there are significant problems when saving to a OneDrive sync'ed folder, but all other cloud storage syncs work fine, I think there's something wrong with OneDrive's implementation.

davidjgraph avatar Jun 04 '24 15:06 davidjgraph