mnutt / davros

Personal file storage server
Apache License 2.0
297 stars 35 forks source link

Grain UI fails to load after having uploaded a 0-byte .jpg file #117

Closed garrison closed 2 years ago

garrison commented 3 years ago

Steps to reproduce:

  1. Create a new Davros grain
  2. Upload an empty jpeg file (e.g. one resulting from $ touch test.jpg)
  3. Refresh the grain in the web browser

From then on, nothing shows and the grain is no longer accessible by the web interface.

The log has nothing notable:

...** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns
Mounting webdav from data dir /var/davros/data
Storing temporary files in /var/davros/tmp
Davros started in 1798ms, listening on port 8000
PROPFIND /remote.php/webdav/ 207 496.616 ms - -
GET /api/permissions 200 0.142 ms - -
Thumbnailer cache miss for 36-36-/remote.php/webdav/pluto.jpg
GET /api/thumbnail?url=%2Fremote.php%2Fwebdav%2Fpluto.jpg&width=36&height=36&op=fit&ts=undefined 200 166.409 ms - -
Thumbnailer cache miss for 36-36-/remote.php/webdav/apollo-6.jpg
GET /api/thumbnail?url=%2Fremote.php%2Fwebdav%2Fapollo-6.jpg&width=36&height=36&op=fit&ts=undefined 200 573.739 ms - -
Thumbnailer cache miss for 36-36-/remote.php/webdav/shuttle.jpg
GET /api/thumbnail?url=%2Fremote.php%2Fwebdav%2Fshuttle.jpg&width=36&height=36&op=fit&ts=undefined 200 257.131 ms - -
[info] Root path was deleted; recreating.
DELETE /remote.php/webdav/ 204 9.192 ms - 0
PROPFIND /remote.php/webdav/ 207 20.936 ms - -
POST /api/upload 201 11.559 ms - 0
PROPFIND /remote.php/webdav/ 207 23.167 ms - -
PROPFIND /remote.php/webdav/ 207 8.990 ms - -
GET /files 200 1.855 ms - -
PROPFIND /remote.php/webdav/ 207 20.656 ms - -
GET /files 200 0.700 ms - -
PROPFIND /remote.php/webdav/ 207 30.511 ms - -
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.
** SANDSTORM SUPERVISOR: Grain no longer in use; shutting down.
** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns
mnutt commented 3 years ago

Hmm, nothing looks amiss in the logs but my best guess is that it's silently blowing up the thumbnailer. But the reproduction looks straightforward so I should be able to get to the bottom of it.

mnutt commented 2 years ago

Fixed in https://github.com/mnutt/davros/commit/1e2ed8e2688778e9f5e613e0cb021cad27ed6a92, will be released in 0.29.0 soon.