Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spice console not working on Ubuntu 20.04 - ReferenceError: SpiceMainConn is not defined #1346

Open
jamesfreeman959 opened this issue Dec 14, 2021 · 2 comments

Comments

@jamesfreeman959
Copy link

Describe the bug
Although I have Kimchi working on Ubuntu 20.04 (built from source yesterday from the latest commit on GitHub), I cannot get the VM console to work. The SPICE web page loads, and then I get a pop up saying "ReferenceError: SpiceMainConn is not defined". I found that all JS files were in a different place to that referenced in spice-auto.html - on my system I found them under /usr/share/spice-html5/src, but it appears this page is looking in /usr/share/spice-html5. I tried moving the files up to the directory they were being called from, and all 404 errors disappeared, but the dialog box still comes up.

To Reproduce
Steps to reproduce the behavior:

  1. Build Wokd and Kimchi from source on Ubuntu 20.04 using the instructions provided
  2. Install as per the instructions
  3. Log in, and navigate to the virtualization tab
  4. Click on "View Console" for a SPICE enabled VM
  5. SPICE screen loads, including the frame that should contain the console, then a dialog appears saying "ReferenceError: SpiceMainConn is not defined".

Expected behavior
SPICE console should load without error

Desktop (please complete the following information):

  • OS: Ubuntu Server 20.04
  • Browser: Firefox 95.0
  • Version: Git commit hash 36ed74b (Kimchi)

Additional context
I also see the following in the wok-error.log file:

[14/Dec/2021:09:50:45] HTTP 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cptools.py", line 182, in handle_func
    handled = self.callable(*args, **self._merged_args(kwargs))
TypeError: staticfile() got multiple values for argument 'filename'
[14/Dec/2021:09:51:37] HTTP 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cptools.py", line 182, in handle_func
    handled = self.callable(*args, **self._merged_args(kwargs))
TypeError: staticfile() got multiple values for argument 'filename'

Looking at other open issues, I have tested with Websockify 0.9.0 (provided by Ubuntu DEB package) and Websockify 0.7.0 (installed using pip3).

@DeadMozay
Copy link

DeadMozay commented Dec 21, 2021

Confirm, openSUSE Tumbleweed
2021-12-21_22-42

@DeadMozay
Copy link

The problem is solved by setting websockify == 0.7.0 and moving /etc/nginx/conf.d/wok.conf to /etc/nginx/vhost.d/wok.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants