DTTG 3 is corrupting files

I have now deleted my only ghost file.

sync seems to be active (just by pulling down in the devonthink list without having specifically re-activated it… according to your information I would need to re-activate it, but this seems not to be necessary?)

can we be sure that only zero-file-size files are corrupt files?

if I have deleted the corrupt files (zerosize) on all my devices, is it now safe to switch from icloud legacy to icloud cloudkit, or might this step produce additional corrupt files and might it therefore be safer to wait?

Thank you so much for all your help and risk assessment here… some sleepness nights for @eboehnisch @BLUEFROG and the DT developers I assume? you are doing a great job, such things can happen, I appreciate how you handle it (although I am really nervous about my data despite backups and so)

1 Like

Version 3.0,2 already detects them and shows them to you in a Ghosts smart group. Version 3.0.3 will attempt to repair them. It’s already waiting for review for the App Store.

Yes, files are either empty or not. This at least we can say. If there are no ghosts on any participating device you should be safe to switch to CloudKit.

I’m new to this thread as I’ve only just had this problem.

I’ve been using both DT and DTTG for years. Both applications sync their databases through a custom WebDAV server. Everything has been working flawlessly for the last three years, through every version upgrade.

I’ve updated this week to DT 3.6.2. Today, I’ve updated to the latest DTTG 3.0.2. On launch, I received a message saying that some files are corrupted and can be found in the Ghost smart folder. The message also says that auto syncing has been disabled.

That folder contains four RTF files and one PNG file. All of them show 0 bytes. Tapping any of the RTF files crashes DTTG. Tapping the PNG file shows nothing.

I’ve looked for those files on the desktop application. They all belong to the same database, which resides on an external drive. They all show 0 bytes in the desktop application as well. Revealing the files in the Finder indeed shows 0 byte files. Last time I touched these files was more than 2 years ago.

I didn’t read the entire thread, but I can confirm the following:

  • The issue doesn’t involve PDF files, but rather RTF and TXT file, seemingly at random (files haven’t been touched for years).
  • The issue does seem to have occurred after I’ve added a couple of PDF files using DTTG (iOS share menu from Safari), then sync’ed to DT desktop via the WebDAV server. These PDFs didn’t get corrupted, though.

I’ve managed to recover 4 of my 5 corrupted files but I’m still assessing the damage across multiple databases.

You should always first check Window > Log in DEVONthink when you feel there’s a sync issue

That’s right!

I had the same problem and am sure not happy.

I was migrating to a new WebDAV server while also starting to use DTTG 3.x
Sad coincidence.

The documents I lost were not opened by me at all, since years maybe:

I did not yet check the whole database at the Mac

Sad to say I’ve just discovered the same problem as well.
218 empty files. Many have not been looked at for years but some are newer. I have the problem in PNG, RTF, PDF, TXT, Ebook, and MD file types.

Error has propogated to all devices, iPhone, iPad and 2 Macs.

WebDAV server, never used iCloud sync.

I’m pretty positive there’s a sync issue because the files aren’t propagating to the other devices using the exact same sync store and database.

Window > Log shows no errors or problems, and is usually blank after manually clicking the “Synchronize the current database” or “Synchronize all databases” button in DT on my Mac (that still has the files in question.)

Window > Log is also empty on my iPhone and MacBook (the two devices where the files aren’t showing up.)

Are there other things I can try? Should I drag and drop these files in question to my desktop, transfer them manually to these other two devices manually, and import them into their Global Inboxes to see if that’ll help? If not, what would you recommend?

Edit: Also, not sure if it’s important or not, but any files I add to the Global Inbox on the other two devices are also not syncing back to my iMac.

In case it helps, my experience has been:

After installing 3.0.2 on iPad and iPhone I got the Ghosts messages.

I had two Ghost folders with names, not of my creating.

Both were in the same Database and both empty, no ghost files.

Deleted the folders, emptied trash, resumed automatic syncing.

Before deleting the ghost folders the affected database had a failed verification message which has not recurred.

Think I have got off lightly!

No evidence of any spread to my two Macs.

I have been using only Bonjour syncing for several months, but before that tried both Dropbox and iCloud legacy. No iCloud Cloudkit.

The ghosts detection explicitly excludes groups and feeds. Were these groups maybe special groups, like smart groups synced from the Mac?

The ghosts detection explicitly excludes groups and feeds. Were these groups maybe special groups, like smart groups synced from the Mac?

I don’t know what they were except the folder names were not ones I have ever made, and I haven’t created any special Smart Folders. They do not to appear on the Macs.

The ghosts detection explicitly excludes groups and feeds. Were these groups maybe special groups, like smart groups synced from the Mac?

I have to admit to doubt about whether these two items were Groups or Files. I wish I had taken screenshots now of course. What I recall is my first reaction that they were groups because they had something a bit like a folder icon next to them, but it could have been the DTTG document icon. Also both had a white “0”, to which my first reaction was there are no items in this Group. But I see now that Groups don’t have an item count in the place where I saw the “0”.

So now I think it probable they were ghost files with size zero, which are probably gone now. However when I was emptying the trash I saw that they were in a group which I know to be old and unimportant so don’t believe I have lost anything.

So now I think it probable they were ghost files with size zero, which are probably gone now. However when I was emptying the trash I saw that they were in a group which I know to be old and unimportant so don’t believe I have lost anything.

OK I now have found these Ghost files in a backup I made of all my data before importing to DT in 2019.

There is indeed something odd about them because they were zero size at that time, as in this screenshot:

These are the names I saw in the Ghosts smart groups on iPhone and iPad.

Bottom line: they have been flagged as Ghosts because they were zero size, but the zero size was not caused by DTTG 3.

Thank you very much for digging deeper and investigating. I’m relieved.

Are we 100% sure that DTTG 3 has caused file corruption?

Is it possible that the zero-byte files were caused by DTTG 2 or some other app long ago and the file migration/syncing process of DTTG 3 has naturally resulted in people attempting to access these corrupt files for the first time in a while?

In this thread there are a number of ppl describing files turned to ghost files, and basically having “watched” it happen (i.e., been able to afix a time to the occurrence); there was also a description of a file comparison from a TimeMaching backup over several days, which showed the point in time at which the change had occurred. So my feeling is that it is fair to attribute the situation to DTTG3, although DTTG3 may (as Eric has pointed out; if I understood correctly) only have unmasked a problem in the sync store, which was not apparent (i.e. had not propagated to devices) prior to an action taken by DTTG3.

1 Like

@eboehnisch @BLUEFROG

I’ve re-installed DTTG 3.0.2 on the first iOS device that I upgraded. As expected the ‘ghost’ files are similar to the ones I already identified.

DTTG2 was still on that device and the 50MB zip I mentioned previously shows as 50MB in DTTG2 but as 0-bytes in DTTG3. The UUID of those two are identical and that would allow for the idea coined by @Blanc to replace the 0-byte with the original.

As I understand from your pinned notice, this replacement/restore process should happen automatically, but I haven’t seen it happen yet. Is there anything I can do to trigger it?

Or would you say removing the ‘ghost’ files from the database is a better option and replace them with the ones I retrieved from a Time Machine backup?

Yes, wait for version 3.0.3 (has just entered the review), install it, and launch it. Version 3.0.2 doesn’t have the fix yet. If you are a beta tester, you know where to find the new version.

Hello, my experience has been: I’ve updated my ipad to the latest DTTG 3.0.2 and no ghost files have been found.
Today I’ve updated my iphone and the new update shows me 1 pdf in the “ghost document” group.
Sync is over the local network