Downloading backups fails with missing template

unsupported-install

(Darix) #1
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.


(Jeff Atwood) #3

Can we repro this @techapj?


(Arpit Jalan) #4

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

@darix have you installed Discourse using our official guide?


(Darix) #5

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


(Darix) #6

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?


(Arpit Jalan) #7

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


(Darix) #8

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.


(Mittineague) #9

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.


(Rafael dos Santos Silva) #10

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.


(Darix) #11

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.


(Rafael dos Santos Silva) #12

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


(Darix) #13

both cases trigger it.


(Mittineague) #14

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.


(Darix) #15

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


(Arpit Jalan) #16

This is now fixed via:

Apologies @darix, I overlooked this issue initially.


(Jeff Atwood) #17