File on disk has changed annoying message


Hello, today the IDE is returning very often messages that the file I am editing has changed on the disk and asks whether I want to reload. When I reload the file it is the same as I have just edited only it may not contain the last few characters edited. I am the only one working and accessing the project, I only have the project open in a single window in a single browser so it would appear that there is a sync problem when recording the changes I make to the file.

Is anyone else experiencing this problem? Any hint on how to avoid?

Changes On Disk - Load File - Show Difference

We released a collab update today which may cause this happen once for a file but then should not happen again. You should click no to reloading from disk to keep your current changes. This is due to it trying to sync old and new collab data. Is this happening multiple times for the same file? Could you please let me know what workspace this is in and what the path is to the file and I’ll take a look at our logs and investigate.


Hi Tim. Yeah, it is happening constantly, at least once every two minutes. Workspace is ‘kkk’ and the file I am working on ‘post-jobs.html’.


Thanks. Also have you been saving the file?


I work with auto-save on


Ah, try turning that off and see if the messages stop.


OK. But does that mean I can not use auto-save in the future? It is one of the main reasons i work on c9…


There may be a bug with autosave and the new collab system. I’m investigating now and will fix it if there is one. We do want to have auto-save working correctly. Please let me know if it goes away when autosave is disabled.


yeah, seems to be auto-save related which is what I suspected. I would guess it compares the just edited file -the contents on the client’s browser- before the changes have been made on the server copy.


Yep you’re correct. I’ve tracked it down to a race condition when saving. Here’s what’s happening:

  • Autosave saves the file
  • While the file is saving you make a change in the editor
  • After the save is complete the system detects that the file has changed.
  • The system then compares the timestamp on the saved file, and the timestamp of your last edit, determines that the file is newer (because you made the edit while it was still saving) and displays the prompt saying the file has changed on disk.
  • If you click reload from disk it loses those changes you made while the file was saving.

I’m working on a fix for this now, unfortunately it’s a hard problem to solve because we don’t want to accidentally miss file updates on disk if they’re made at roughly the same time an edit is made in the editor (say if one collaborator changes a file in the editor while another checks out a different version of that file in git at the same time).


Hi! Dont know how the system really works, but perhaps checking who made the last change on the server copy will solve it. As long as the last change was made by the the same user editing then go and autosave without prompting. Just my 2 cents.

In any case, it has always worked smooth until now. I used to use Koding and this problem would also appear from time to time but on c9 this is the first time I face it.

Fortunately I work on my own but the idea of two people editing a single file simultaneously without a protocol to relinquish control from one to the other appears unappealing to me.


@periperi - Same user AND same instance, lest you overwrite your changes on a different device or even just a different browser tab. :slight_smile:


Is there any way to turn off the collaborative feature that is causing this problem and instead choose to use the wonderful autosave feature?

I lean heavily on autosave, but very seldom if ever use collab.


You can turn off collab by adding ?collab=0 to the url.


We’ve found and fixed the bug and have just deployed the patch to production. You can use autosave again and shouldn’t see these prompts.


Thanks Tim. Let me congratulate and thank you for your service.


This is happening to me today. I working with a remote ssh workspace. It was not happening yesterday but today I created a new file and started editing and now I’m getting this popup at least once a minute, while typing.

I have auto-save off and I’m not collaborating. Workspace name: cricket


I’m having this annoying bug for 2 days on 2 different machines. Any new update causing it maybe? I’m using chrome app