Downloading backups fails with missing template

Started GET "/admin/backups/backupid.tar.gz?token=supersecret" for 255.255.255.255 at 2017-12-07 15:32:50 +0000
Processing by Admin::BackupsController#show as GZIP
  Parameters: {"token"=>"supersecret", "id"=>"backupid.tar.gz"}
Completed 500 Internal Server Error in 81ms (ActiveRecord: 11.8ms)
ActionView::MissingTemplate (Missing template admin/backups/show, admin/admin/show, application/show with {:locale=>[:en], :formats=>[:gzip], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby]}. Search
ed in:
  * "/srv/www/vhosts/discourse/app/views"
)
/usr/lib64/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/action_view/path_set.rb:46:in `find'

The file /srv/www/vhosts/discourse/public/backups/default/backupid.tar.gz exists.

759789    4 drwx------   3 discourse discourse     4096 Jun  5  2017 /srv/www/vhosts/discourse/public/backups
759793    4 drwxr-xr-x   2 discourse discourse     4096 Dez  7 03:11 /srv/www/vhosts/discourse/public/backups/default
766573 2308924 -rw-r--r--   1 discourse discourse 2364332981 Nov 27 03:35 /srv/www/vhosts/discourse/public/backups/default/backupid.tar.gz

even u=rw,go=x on /srv/www/vhosts/discourse/public/backups the backup download doesnt work.

1 Like

Can we repro this @techapj?

I am not able to repro this on latest Discourse version.

@darix have you installed Discourse using our official guide?

1 Like

We are using my RPM to install discourse. The build description is here. After updating the package the following script is run.

A download of a newly created backup works now.

Ok this happens when the permissions on the download dir are too strict. (o+rX missing)

Why are backups in the public dir at all?

Moving this to support category. We only support official docker installation method.

Another way to trigger the missing template warning:

try to use the same download link twice … I think then it fails to render the error message. So basically everytime it wants to render an error message here it fails to find a template because it doesnt find a template for type GZIP

Which makes this more of a bug and not a support case.

Have you reported the openSUSE bug to then yet? If you are satisfied with having them support your Discourse you will probably have better luck reporting their bugs to them.

EDIT: D’oh !

There is a possibility that others that have installed Discourse as you have will offer some help here, but AFAIK most members have followed the official install and won’t be able to help with problems they don’t have.

1 Like

Based on the name of the package darix:apps/discourse I believe that @darix is the author of this Suse package.

@darix very cool to see a Discourse package, but we can’t support installs that differ from our official guide.

1 Like

You are just arguing around how we trigger the bug but not the real issue that we discovered with it.

It is my own package. I already put some things in place to make this situation from happen less.

But you can still trigger it with using the same download token twice. Also I did not move this to the support category.

Which is correct? Because if is the latter, it won’t happen in the official install.

both cases trigger it.

Have you found what changes would be needed to solve your problem?

Though the CDCK team may not have the resources to track down the issue, if you have a fix that won’t break things there’s a chance your PR might be accepted.

4 Likes

any error while trying to download a backup will trigger the missing template error.

3 Likes

This is now fixed via:

https://github.com/discourse/discourse/commit/ed4b845930e0893fe5c1eab1849b7c92c23c7da8

Apologies @darix, I overlooked this issue initially.

6 Likes