Go fileserver breaks sub folder sharing with Seadrive

Using Seafile Pro 9.0.5 with Go fileserver enabled, subfolders shared in read/write doesn’t work anymore. (no problem with full lib sharing, only sub folders, and no problem with seahub, only Seadrive is affected). After sharing a sub folder with a user, the user can see it in “Shared with me”, and can read files without problem. But when trying to write (eg, creating a new file), Seadrive will display a sync error. The PUT request fails with a 500 error

[04/26/22 16:06:59] Upload with HTTP sync protocol version 2.
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'init') --> ('normal', 'check')
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'check') --> ('normal', 'commit')
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'commit') --> ('normal', 'fs')
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'fs') --> ('normal', 'data')
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'data') --> ('normal', 'update-branch')
[04/26/22 16:06:59] Bad response code for PUT https://seafile.test.local/seafhttp/repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/?head=3ee4c11c6e511a37eeef841c3b7bd1eb724067bb: 500.
[04/26/22 16:06:59] Failed to update branch of repo d906f52a.
[04/26/22 16:06:59] Transfer repo 'd906f52a': ('normal', 'update-branch') --> ('error', 'finished')
[04/26/22 16:06:59] Repo 'Presse' sync state transition from uploading to 'error': 'Error occured in upload.'.

No error visible in the server’s log file.

Disabling the Go fileserver makes everything working again

What’s the error output in your fileserver.log?

I have errors like those

[2022-04-26 16:04:55] path /repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/ internal server error: Fast forward merge for repo d906f52a-3153-4c8a-8aae-4858816a9243 is failed: Head branch update for repo d906f52a-3153-4c8a-8aae-4858816a9243 conflicts with GC.

[2022-04-26 16:05:26] path /repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/ internal server error: Fast forward merge for repo d906f52a-3153-4c8a-8aae-4858816a9243 is failed: Head branch update for repo d906f52a-3153-4c8a-8aae-4858816a9243 conflicts with GC.

[2022-04-26 16:05:57] path /repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/ internal server error: Fast forward merge for repo d906f52a-3153-4c8a-8aae-4858816a9243 is failed: Head branch update for repo d906f52a-3153-4c8a-8aae-4858816a9243 conflicts with GC.

[2022-04-26 16:06:27] path /repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/ internal server error: Fast forward merge for repo d906f52a-3153-4c8a-8aae-4858816a9243 is failed: Head branch update for repo d906f52a-3153-4c8a-8aae-4858816a9243 conflicts with GC.

[2022-04-26 16:06:59] path /repo/d906f52a-3153-4c8a-8aae-4858816a9243/commit/HEAD/ internal server error: Fast forward merge for repo d906f52a-3153-4c8a-8aae-4858816a9243 is failed: Head branch update for repo d906f52a-3153-4c8a-8aae-4858816a9243 conflicts with GC.

(There’s no GC running)

Hello, the go fileserver has a bug when mergeing virtual repo, we will fix it in next release.Now, you can delete the records of repo “d906f52a-3153-4c8a-8aae-4858816a9243” and it’s parent from GCID and LastGCID tables.Then seadrive can sync normally.

Should I do this even if I switched back to the non Go fileserver ? Or can I leave it as is and be confident that seadrive resynced everything correctly ?

You don’t need to do this when you are using c fileserver which doesn’t have this bug.