Unable to load the desk after the update werkzeug.exceptions

Hi,
I am unable to load the desk on my test environment after updating with bench update.
The problem is that only the ERPNext Logo shows up after I hit refresh button, the following are the traces when I updated and also the traces for the bench start, need help to identify the issue and get my test env working again:

Building erpnext assets...

✔ Built js/erpnext-web.min.js
✔ Built js/item-dashboard.min.js
✔ Built js/erpnext.min.js
✔ Built css/erpnext-web.css
✔ Built css/marketplace.css
✔ Built css/erpnext.css
✔ Built js/marketplace.min.js
✨  Done in 12.816s
Done in 50.38s.
INFO:bench.utils:sudo systemctl stop -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
[sudo] password for frappe:
Too few arguments.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/.bench/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/.bench/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
  File "/home/frappe/.bench/bench/commands/update.py", line 102, in _update
    restart_systemd_processes(bench_path=bench_path)
  File "/home/frappe/.bench/bench/utils.py", line 412, in restart_systemd_processes
    exec_cmd('sudo systemctl stop -- $(systemctl show -p Requires {bench_name}.target | cut -d= -f2)'.format(bench_name=bench_name))
  File "/home/frappe/.bench/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo systemctl stop -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)

Also the bench shows the following traces when I try to refresh (F5) the page on browser:

12:31:56 watch.1          |
12:31:56 watch.1          | Watching...
12:31:59 watch.1          | Rebuilding frappe-web.css
12:31:59 watch.1          | Rebuilding chat.js
12:32:05 watch.1          | Error in: undefined
12:32:05 watch.1          | Error: watch /home/frappe/frappe-bench/apps/frappe/frappe/public/js/frappe/chat.js ENOSPC
12:32:12 web.1            | fatal: Needed a single revision
12:32:14 web.1            | fatal: Needed a single revision
12:33:16 web.1            | fatal: Needed a single revision
12:33:16 web.1            | fatal: Needed a single revision
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /desk HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/list.min.css?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/desk.min.css?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/form.min.css?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/report.min.css?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/module.min.css?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/css/erpnext.css?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/erpnext/images/erp-icon.svg HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/frappe/js/lib/jquery/jquery.min.js HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/list.min.js?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/form.min.js?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/frappe/js/frappe/toolbar.js?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/desk.min.js?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/libs.min.js?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/erpnext.min.js?ver=1540967364.0 HTTP/1.1" 200 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/control.min.js?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /assets/js/report.min.js?ver=1540967364.0 HTTP/1.1" 304 -
12:33:17 web.1            | 10.0.2.2 - - [31/Oct/2018 12:33:17] "GET /files/RIGPL_LOGO_FAVICON.ico HTTP/1.1" 500 -
12:33:17 web.1            | Traceback (most recent call last):
12:33:17 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__
12:33:17 web.1            |     return super(StaticDataMiddleware, self).__call__(environ, start_response)
12:33:17 web.1            |   File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/wsgi.py", line 762, in __call__
12:33:17 web.1            |     real_filename, file_loader = loader(path[len(search_path):])
12:33:17 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py", line 24, in loader
12:33:17 web.1            |     raise NotFound
12:33:17 web.1            | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.

sudo supervisorctl restart all

Thanks @root13F, I hope what you are pointing at is true and if at all its really an issue with bench but after I did check the code history then I found out that this file has no changes since Aug 16, which means that the problem should not be with this command.

@trentmu When I try to run this command I am getting the below error:

frappe@erpnext:~$ sudo supervisorctl restart all
sudo: supervisorctl: command not found
frappe@erpnext:~$ sudo su -
root@erpnext:~# supervisorctl restart all
The program 'supervisorctl' is currently not installed. You can install it by typing:
apt install supervisor

Now the problem is that the bench was running perfectly well before sometime ago and then how come the supervisorctl is now gone, I haven’t uninstalled it or anything, but anyways I did go through and installed supervisor again and then

bench setup supervisor and then again bench update which gave this output

Building erpnext assets...

✔ Built js/erpnext-web.min.js
✔ Built js/item-dashboard.min.js
✔ Built js/erpnext.min.js
✔ Built css/erpnext-web.css
✔ Built css/marketplace.css
✔ Built css/erpnext.css
✔ Built js/marketplace.min.js
✨  Done in 10.705s
Done in 47.15s.
[sudo] password for frappe:
INFO:bench.utils:sudo supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()

So basically these are steps which worked on my case but the surprising thing is that why and how did the supervisor got uninstalled since I had only run bench update

Sorry - I didn’t read your post properly - if you are using development mode instead of production mode, then the supervisor section is not installed (that’s only for the production system).

Ah yes I checked the Git blame on that code and I realised I had assumed the worst and replied on impluse. Hence I deleted my reply.