server icon indicating copy to clipboard operation
server copied to clipboard

File deleted, but still visible in interface

Open ebogaard opened this issue 10 years ago • 25 comments

In certain cases a file can get in a certain state where it's deleted, but still visible in the web interface. The activities show it as deleted, but it's still visible in the web interface. In the owncloud windows app, the file isn't visible, but the logging shows errors.

This only happens when you shuffle a file to- and from a 'Shared with you'-folder.

Steps to reproduce

  1. Create, for example, an .odt file and put this in the root folder of the Files app
  2. Drag and drop the file to a folder of your own
  3. Drag and drop the file to from this folder back to the root, using the home-icon in the breadcrumb.
  4. Drag and drop the file to the 'Shared with you'-folder
  5. Drag and drop the file to from this folder back to the root, using the home-icon in the breadcrumb.
  6. Now you get the error.

Sometimes you need to repeat this cycle.

Expected behaviour

The file is moved from location to location as usual and is still fully accessible afterwards.

Actual behaviour

The file shows it's deleted in the activities. When trying to open the file, the following error is shown:

Service Unavailable
Could not open file
Technical details
• Remote Address: x.x.x.x
• Request ID: V6NgGqrNXzX0sE7McbjqDwAAAAc

The desktop app doesn't sync this file anymore and shows the following error in the log:

14:36:32|618|Test.odt|INST_RENAME|Up|1470148141|3851dea77e2b4d2719551e2e8418734e|32782|00000150o7UiddusMtKv|4||201|0|0|||INST_NONE|
|0|test_sharing.odt|INST_RENAME|Up|1470321128|45b8eccb37873e8ee0406e0e4ea3e0fd|9240|00000358o7UiddusMtKv|2|Error downloading https://URL/remote.php/webdav/test_sharing.odt - server replied: Forbidden|403|0|0|||INST_NONE|
#=#=#=# Syncrun started  until  (0 msec)
|0|test_sharing.odt|INST_RENAME|Up|1470321128|45b8eccb37873e8ee0406e0e4ea3e0fd|9240|00000358o7UiddusMtKv|6|Continue blacklisting: Error downloading https://URL/remote.php/webdav/test_sharing.odt - server replied: Forbidden|403|0|0|||INST_NONE|
#=#=#=# Syncrun started  until  (0 msec)
|0|test_sharing.odt|INST_RENAME|Up|1470321128|45b8eccb37873e8ee0406e0e4ea3e0fd|9240|00000358o7UiddusMtKv|6|The item is not synced because of previous errors: Error downloading https://URL/remote.php/webdav/test_sharing.odt - server replied: Forbidden|0|0|0|||INST_NONE|
#=#=#=# Syncrun started  until  (0 msec)
#=#=#=# Syncrun started  until  (0 msec)
|0|Documents|INST_SYNC|Up|1470321538||0||4||0|0|1470321392|57a352f07d3b9|00000062o7UiddusMtKv|INST_NONE|
|0|test_sharing.odt|INST_RENAME|Up|1470321128|45b8eccb37873e8ee0406e0e4ea3e0fd|9240|00000358o7UiddusMtKv|2|Error downloading https://URL/remote.php/webdav/test_sharing.odt - server replied: Forbidden|403|0|0|||INST_NONE|
#=#=#=# Syncrun started  until  (0 msec)
|0|Documents|INST_SYNC|Up|1470321538||0||4||0|0|1470321392|57a352f07d3b9|00000062o7UiddusMtKv|INST_NONE|
|0|test_sharing.odt|INST_RENAME|Up|1470321128|45b8eccb37873e8ee0406e0e4ea3e0fd|9240|00000358o7UiddusMtKv|6|Continue blacklisting: Error downloading https://URL/remote.php/webdav/test_sharing.odt - server replied: Forbidden|403|0|0|||INST_NONE|
#=#=#=# Syncrun started  until  (0 msec)

You can't do anything with this file anymore.

Server configuration

Operating system: Centos 7

Web server: Httpd 2.4

Database: MariaDB 10

PHP version: 5.6

Nextcloud version: 9.0.53

Updated from an older Nextcloud/ownCloud or fresh install: 9.0.51 and 52

Where did you install Nextcloud from: nextcloud.com - tar.gz

Signing status: No relevant files modified

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

Client configuration

Browser: Chrome and Firefox

Operating system: Windows 7

Logs

Web server error log

Web server error log

x.x.x.x - user@name [04/Aug/2016:17:32:39 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 373 "-" "Mozilla/5.0 (Windows) mirall/2.2.2 (build 6192)"
x.x.x.x - user@name [04/Aug/2016:17:32:42 +0200] "GET /remote.php/webdav/testdocument_2.odt HTTP/1.1" 503 8738 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
x.x.x.x - user@name [04/Aug/2016:17:32:42 +0200] "GET /remote.php/webdav/testdocument_2.odt HTTP/1.1" 503 8738 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
x.x.x.x - - [04/Aug/2016:17:32:42 +0200] "GET /core/js/oc.js?v=517a1bf90ae552132656a98069c3d3a9 HTTP/1.1" 200 1129 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
x.x.x.x - - [04/Aug/2016:17:32:57 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 74 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
#### Nextcloud log (data/nextcloud.log)

Nextcloud log

{"reqId":"V6NgGqrNXzX0sE7McbjqDwAAAAc","remoteAddr":"x.x.x.x","app":"PHP","message":"fopen(\/opt\/repo\/nextcloud\/afc945d8-ea58-1034-8b97-2755ab2f238e\/files\/testdocument_2.odt): failed to open stream: No such file or directory at \/var\/www\/html\/nextcloud-9.0.53\/lib\/private\/files\/storage\/local.php#261","level":3,"time":"2016-08-04 17:32:42","method":"GET","url":"\/remote.php\/webdav\/testdocument_2.odt","user":"afc945d8-ea58-1034-8b97-2755ab2f238e"}
{"reqId":"V6NgGqrNXzX0sE7McbjqDwAAAAc","remoteAddr":"x.x.x.x","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/remote.php(138): require_once('\\\/var\\\/www\\\/html\\\/n...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/nextcloud-9.0.53\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php\",\"Line\":306,\"User\":\"afc945d8-ea58-1034-8b97-2755ab2f238e\"}","level":4,"time":"2016-08-04 17:32:42","method":"GET","url":"\/remote.php\/webdav\/testdocument_2.odt","user":"afc945d8-ea58-1034-8b97-2755ab2f238e"}
{"reqId":"V6NgGqrNXzX0sE7McbjqDwAAAAc","remoteAddr":"x.x.x.x","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/http\/lib\/Sapi.php:83) at \/var\/www\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/http\/lib\/Sapi.php#58","level":3,"time":"2016-08-04 17:32:42","method":"GET","url":"\/remote.php\/webdav\/testdocument_2.odt","user":"afc945d8-ea58-1034-8b97-2755ab2f238e"}
{"reqId":"V6NgGqrNXzX0sE7McbjqDwAAAAc","remoteAddr":"x.x.x.x","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/http\/lib\/Sapi.php:83) at \/var\/www\/html\/nextcloud-9.0.53\/3rdparty\/sabre\/http\/lib\/Sapi.php#63","level":3,"time":"2016-08-04 17:32:42","method":"GET","url":"\/remote.php\/webdav\/testdocument_2.odt","user":"afc945d8-ea58-1034-8b97-2755ab2f238e"}

ebogaard avatar Aug 05 '16 07:08 ebogaard

I'm a user and i've also had a similar problem. The differences i know of are these:

  • For me the problem appeared after moving a file
  • In my case the problem didn't involve the "Shared with you" directory

Do you want me to write a separate issue for this?

Server: cloud.disroot.org

Client: Nextcloud-2.3.3-x86_64.AppImage (OS: Lubuntu 18.04 64-bit)

The problem causes the sync download process to stop in my client. This is what it looks like in my client (on Ubuntu):

selection_001

Some thoughts i've had on what can be improved:

  • The error message says "service unavailble" but that's not really true right? Rather the error (as i understand it after talking with the disroot support) has to do with a mismatch between the file entries in the database and the actual data that is stored on the server
  • Also the sync process could continue despite the error
  • Not sure if this is realistic but maybe selecting "force sync" in the client could rebuild/clean the database?
  • (Best of all would of course be if the problem didn't arise in the first place!)

SunyataZero avatar Oct 08 '18 12:10 SunyataZero

I encountered a similar problem and found a workaround to fix it, this might help you too : https://github.com/nextcloud/server/issues/4786#issuecomment-430556202

JulienLaclaverie avatar Oct 17 '18 09:10 JulienLaclaverie

As there is no feedback since a while and since I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

skjnldsv avatar Jun 06 '19 13:06 skjnldsv

I'm having the ghostfile issue on the newest version of nextcloud in group-folders from groupfolders-plugin. Is this the right place to report it as groupfolder-contributors seem to not be responding to issues? (Error ocurred while trying to give information to https://github.com/nextcloud/groupfolders/issues/243 )

AstroGD avatar Jan 25 '20 14:01 AstroGD

Still happening on nextcloud 22.

robertmx avatar Aug 07 '21 11:08 robertmx