MycroftAI / snapcraft-mycroft-core

This project is for building mycroft-core snaps
MIT License
13 stars 11 forks source link

Mycroft Snap Fails to Run #28

Open gardotd426 opened 3 years ago

gardotd426 commented 3 years ago

Describe the bug After installing Mycroft beta via Snap, attempting to run it brings up a window that gets stuck on "Installing Mycroft Dependencies" at 0%, then it closes. After trying again to run it, it fails with a bunch of errors.

To Reproduce Steps to reproduce the behavior:

  1. Install Mycroft with sudo snap install --beta mycroft
  2. Run mycroft, let it go through the initial setup, window will close on its own
  3. Try to run it again
  4. See error

Expected behavior Mycroft works

Log files No logs given

Environment (please complete the following information):

Additional context Terminal output: First run (where the window pops up, but it closes)

snap run mycroft
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
Gtk-Message: 21:27:41.118: Failed to load module "xapp-gtk3-module"
Gtk-Message: 21:27:41.134: Failed to load module "appmenu-gtk-module"
Gtk-Message: 21:27:41.172: Failed to load module "colorreload-gtk-module"
Gtk-Message: 21:27:41.173: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 21:27:41.173: Failed to load module "appmenu-gtk-module"

(yad:584173): dbind-WARNING **: 21:27:41.175: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-VpbVoZN8FB: No such file or directory
Creating virtualenv in /home/matt/snap/mycroft/common/venv
Gtk-Message: 21:27:47.549: Failed to load module "xapp-gtk3-module"
Gtk-Message: 21:27:47.550: Failed to load module "appmenu-gtk-module"
Gtk-Message: 21:27:47.572: Failed to load module "colorreload-gtk-module"
Gtk-Message: 21:27:47.572: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 21:27:47.573: Failed to load module "appmenu-gtk-module"

(yad:584186): dbind-WARNING **: 21:27:47.575: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-VpbVoZN8FB: No such file or directory
Gtk-Message: 21:27:48.409: Failed to load module "xapp-gtk3-module"
Gtk-Message: 21:27:48.410: Failed to load module "appmenu-gtk-module"
Gtk-Message: 21:27:48.431: Failed to load module "colorreload-gtk-module"
Gtk-Message: 21:27:48.432: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 21:27:48.432: Failed to load module "appmenu-gtk-module"

(yad:584190): dbind-WARNING **: 21:27:48.433: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-VpbVoZN8FB: No such file or directory
sed: can't read /home/matt/snap/mycroft/common/venv/lib/python3.?/site-packages/pip/_internal/utils/misc.py: No such file or directory
Gtk-Message: 21:27:53.660: Failed to load module "xapp-gtk3-module"
Gtk-Message: 21:27:53.660: Failed to load module "appmenu-gtk-module"
Gtk-Message: 21:27:53.687: Failed to load module "colorreload-gtk-module"
Gtk-Message: 21:27:53.688: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 21:27:53.688: Failed to load module "appmenu-gtk-module"

(yad:584224): dbind-WARNING **: 21:27:53.690: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-VpbVoZN8FB: No such file or directory
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
2021-05-14 21:28:43.159 | INFO     | 584874 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs
2021-05-14 21:28:43.161 | INFO     | 584874 | mycroft.client.text.text_client:load_settings:189 | Ignoring failed load of settings file

Traceback (most recent call last):
  File "/home/matt/snap/mycroft/common/venv/bin/mycroft-cli-client", line 8, in <module>
    sys.exit(main())
  File "/home/matt/snap/mycroft/common/venv/lib/python3.6/site-packages/mycroft/client/text/__main__.py", line 65, in main
    curses.wrapper(gui_main)
  File "/snap/mycroft/current/usr/lib/python3.6/curses/__init__.py", line 73, in wrapper
    stdscr = initscr()
  File "/snap/mycroft/current/usr/lib/python3.6/curses/__init__.py", line 30, in initscr
    fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal
2021-05-14 21:28:43.163 | INFO     | 584874 | mycroft.messagebus.client.client:on_open:67 | Connected
Stopping all processes...
/snap/mycroft/1078/bin/mycroft-launch: line 97: 584870 Terminated              snapcraft-preload mycroft-enclosure-client >> /$SNAP_USER_COMMON/logs/enclosure.log 2>&1
Stopped

All subsequent runs:

snap run mycroft
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
2021-05-14 21:28:52.579 | INFO     | 585077 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs
2021-05-14 21:28:52.582 | INFO     | 585077 | mycroft.client.text.text_client:load_settings:189 | Ignoring failed load of settings file

Traceback (most recent call last):
  File "/home/matt/snap/mycroft/common/venv/bin/mycroft-cli-client", line 8, in <module>
    sys.exit(main())
  File "/home/matt/snap/mycroft/common/venv/lib/python3.6/site-packages/mycroft/client/text/__main__.py", line 65, in main
    curses.wrapper(gui_main)
  File "/snap/mycroft/current/usr/lib/python3.6/curses/__init__.py", line 73, in wrapper
    stdscr = initscr()
  File "/snap/mycroft/current/usr/lib/python3.6/curses/__init__.py", line 30, in initscr
    fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal
2021-05-14 21:28:52.583 | INFO     | 585077 | mycroft.messagebus.client.client:on_open:67 | Connected
Stopping all processes...
/snap/mycroft/1078/bin/mycroft-launch: line 97: 585073 Terminated              snapcraft-preload mycroft-enclosure-client >> /$SNAP_USER_COMMON/logs/enclosure.log 2>&1
Stopped
krisgesling commented 3 years ago

Hi there, thanks for your interest in Mycroft!

We haven't been actively working on the Snap while we get the Mark II shipping, however it was at least launching previously.

From a quick search of the Snapcraft forum it might be related to this issue: https://forum.snapcraft.io/t/the-ncurses-launch-launcher-fix-ncurses-applications-in-the-snap-runtime/10444

If anyone is interested in helping us with improving the Snap it would be much appreciated if you could try adding this ncurses-launcher to the snap/snapcraft.yaml