Project

General

Profile

Actions

Bug #6385

closed

Foreman dashboard stopped working

Added by Jon Skarpeteig almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Using version 9999-trusty+scratchbuild+201406250952

Oops, we're sorry but something went wrong

Warning!
cannot load such file -- uglifier (in /usr/share/foreman/app/assets/javascripts/dashboard.js)

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
LoadError
cannot load such file -- uglifier (in /usr/share/foreman/app/assets/javascripts/dashboard.js)
app/helpers/layout_helper.rb:24:in `block in javascript'
app/helpers/layout_helper.rb:24:in `javascript'
app/views/dashboard/index.html.erb:1:in `_0a4fcb56efd5ddfa02f58289d5ccc972'
app/controllers/dashboard_controller.rb:6:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Feedback

Could you re-test with the latest nightly please? This might be the same as #6319.

Actions #2

Updated by Im Raro almost 10 years ago

Dominic Cleal wrote:

Could you re-test with the latest nightly please? This might be the same as #6319.

Same here. Foreman release 1.6.0-1, fully updated Ubuntu 14.04 x86_64.

Actions #3

Updated by Dominic Cleal over 9 years ago

Im Raro wrote:

Dominic Cleal wrote:

Could you re-test with the latest nightly please? This might be the same as #6319.

Same here. Foreman release 1.6.0-1, fully updated Ubuntu 14.04 x86_64.

Could you paste the whole & exact error please?

Actions #4

Updated by Im Raro over 9 years ago

Warning!

cannot load such file -- uglifier (in /usr/share/foreman/app/assets/javascripts/dashboard.js)

LoadError
cannot load such file -- uglifier (in /usr/share/foreman/app/assets/javascripts/dashboard.js)
app/helpers/layout_helper.rb:24:in `block in javascript'
app/helpers/layout_helper.rb:24:in `javascript'
app/views/dashboard/index.html.erb:1:in `_b82d473569d7c384c20bb090cdcade35'
app/controllers/dashboard_controller.rb:6:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Actions #5

Updated by Dominic Cleal over 9 years ago

Could you run these commands please? I wonder if assets have been recompiled on your server at some point, or if there's a packaging error.

  • ls -l /usr/share/foreman/public
  • ls -l /usr/share/foreman/public/assets/*dash*
  • grep dashboard /usr/share/foreman/public/assets/manifest.yml

It should provide the following output on 1.6.0-1:

root@foremandeb:~# ls -l /usr/share/foreman/public
lrwxrwxrwx 1 foreman foreman 23 Sep 11 10:29 /usr/share/foreman/public -> /var/lib/foreman/public
root@foremandeb:~# ls -l /usr/share/foreman/public/assets/*dash*
-rw-r--r-- 1 foreman foreman 2287 Sep 10 07:28 /usr/share/foreman/public/assets/dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js
-rw-r--r-- 1 foreman foreman  859 Sep 10 07:28 /usr/share/foreman/public/assets/dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js.gz
-rw-r--r-- 1 foreman foreman 2287 Sep 10 07:28 /usr/share/foreman/public/assets/dashboard.js
-rw-r--r-- 1 foreman foreman  859 Sep 10 07:28 /usr/share/foreman/public/assets/dashboard.js.gz
root@foremandeb:~# grep dashboard /usr/share/foreman/public/assets/manifest.yml 
dashboard.js: dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js
dashboard/index.js: dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js
Actions #6

Updated by Im Raro over 9 years ago

# ls -l /usr/share/foreman/public
total 40
-rw-r--r-- 1 foreman foreman   728 Jun 18 16:35 404.html
-rw-r--r-- 1 foreman foreman   711 Jun 18 16:35 422.html
-rw-r--r-- 1 foreman foreman   728 Jun 18 16:35 500.html
drwxr-xr-x 3 foreman foreman  4096 Jul 22 14:11 apipie-cache
drwxr-xr-x 7 foreman foreman 16384 Sep 14 12:21 assets
-rw-r--r-- 1 foreman foreman  1491 Jun 18 16:35 blank.html
-rw-r--r-- 1 foreman foreman   204 Jun 18 16:35 robots.txt
# ls -l /usr/share/foreman/public/assets/*dash*
zsh: no matches found: /usr/share/foreman/public/assets/*dash*
# grep dashboard /usr/share/foreman/public/assets/manifest.yml
# 
Actions #7

Updated by Im Raro over 9 years ago

# grep dashboard /var/lib/foreman/public/assets/manifest.yml 
dashboard.js: dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js
dashboard/index.js: dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js

# ls -l /var/lib/foreman/public/assets/*dash* 
-rw-r--r-- 1 foreman foreman 2287 Sep 10 13:28 /var/lib/foreman/public/assets/dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js
-rw-r--r-- 1 foreman foreman  859 Sep 10 13:28 /var/lib/foreman/public/assets/dashboard-dab7617d945c3756a5ccc59a4ce3c2c2.js.gz
-rw-r--r-- 1 foreman foreman 2287 Sep 10 13:28 /var/lib/foreman/public/assets/dashboard.js
-rw-r--r-- 1 foreman foreman  859 Sep 10 13:28 /var/lib/foreman/public/assets/dashboard.js.gz
Actions #8

Updated by Dominic Cleal over 9 years ago

Looks like /usr/share/foreman/public is the problem here. Try:

  1. mv /usr/share/foreman/public /usr/share/foreman/public.bak
  2. ln -s /var/lib/foreman/public /usr/share/foreman/public
  3. service apache2 restart
Actions #9

Updated by Im Raro over 9 years ago

Now it works as expected. Thank you!

Actions #10

Updated by Dominic Cleal over 9 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF