snapcrafters / mattermost-desktop

A community-maintained package to easily install Mattermost Desktop on Linux
https://snapcraft.io/mattermost-desktop/
MIT License
11 stars 7 forks source link

fail to start mattermost on Fedora 27 #6

Closed antonpaisov closed 6 years ago

antonpaisov commented 6 years ago

Hey there,

When I try running mattermost-desktop installed from a snap, it fails with:

Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Failed to read or upgrade config.json { Error: ENOENT: no such file or directory, open '/home/anton/snap/mattermost-desktop/37/.config/Mattermost/config.json'
    at Object.fs.openSync (fs.js:558:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.readFileSync (fs.js:468:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:506:29)
    at Object.readFileSync (/snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:5586:32)
    at Object.<anonymous> (/snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:7376:21)
    at __webpack_require__ (/snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:20:30)
    at /snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:66:18
    at Object.<anonymous> (/snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:69:10)
    at Object.<anonymous> (/snap/mattermost-desktop/37/opt/Mattermost/resources/app.asar/main_bundle.js:18034:3)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/anton/snap/mattermost-desktop/37/.config/Mattermost/config.json' }
[15835:1225/045029.920954:FATAL:platform_font_linux.cc(63)] Check failed: typeface. Could not find any font: Cantarell, sans
#0 0x000001cd013e <unknown>
#1 0x000001cb53db <unknown>
#2 0x000003b4c5bd <unknown>
#3 0x000003b4c1ff <unknown>
#4 0x000003b4ceb6 <unknown>
#5 0x000003b59a79 <unknown>
#6 0x000002c2825e <unknown>
#7 0x000002afc6a3 <unknown>
#8 0x000003c27c06 atom::api::WebContents::InitWithSessionAndOptions()
#9 0x000003c28456 atom::api::WebContents::WebContents()
#10 0x000003c32b96 atom::api::WebContents::Create()
#11 0x000003c44395 atom::api::Window::Window()
#12 0x000003c45eac atom::api::Window::New()
#13 0x000003bed150 mate::internal::InvokeNew<>()
#14 0x000003bed2e0 mate::internal::Dispatcher<>::DispatchToCallback()
#15 0x7fb06447df7f <unknown>
#16 0x7fb0640284cb <unknown>
#17 0x7fb064027f89 <unknown>
#18 0x3347740843a7 <unknown>

[1]    15835 abort (core dumped)  mattermost-desktop

This looks similar to this issue https://github.com/Foundry376/Mailspring/issues/389

Cheers

merlijn-sebrechts commented 6 years ago

The thread you linked states

On Fedora 27 this is solved as the official repos updated snapd

Is everything up-to-date on your system?

merlijn-sebrechts commented 6 years ago

Hm, reading that thread, it seems as if this could be solved by including the desktop interface. That would also fix the "chinese fonts" issue. I took a shot at that, but then Mattermost also crashes on Ubuntu. I'll take another look at it this evening, I'll keep you updated!

antonpaisov commented 6 years ago

thank you! yes, everything is and was up to date.

merlijn-sebrechts commented 6 years ago

For some reason, mattermost tries to mmap the fonts it gets from the OS. The security profile doesn't allow this, so fonts don't work at all if I include the desktop interface.

More details here: https://forum.snapcraft.io/t/fonts-fail-to-load-when-desktop-plug-added/3414

I'm not sure how to proceed so if you have any suggestions, let me know..

merlijn-sebrechts commented 6 years ago

Found the issue! Apparmor was killing mattermost because mattermost had the stackexec bit on. The fix is committed to this repo. Ubuntu build servers are down atm and it might take a few days until that's resolved (cpu's -_- ). I'll try to build the snap locally and upload it manually if it's still not working tomorrow.

merlijn-sebrechts commented 6 years ago

pushed it manually to the beta channel. Can you give it a try?

snap refresh mattermost-desktop --channel beta
antonpaisov commented 6 years ago

@galgalesh yes, will do (a bit later today or tomorrow)! thank you!

flexiondotorg commented 6 years ago

@antonpaisov Any news?

antonpaisov commented 6 years ago

@flexiondotorg I will try it out tonight had a family emergency since last message :(

antonpaisov commented 6 years ago

@galgalesh @flexiondotorg it works, but fonts in settings are weird, I can't enable "Leave app running in notification area when application window is closed"
weird_fonts and an icon in the top bar looks bad this_icon.

flexiondotorg commented 6 years ago

@antonpaisov Thanks for the feedback. We're actively working on correctly integrating desktop theme support, that is a general snapd improvement. I'll close this and the OP issue is resolved. Thanks for helping :smile:

Kabouik commented 6 years ago

Just out of curiosity, any progress on the theme integration (the window is using a different themes, but pointers as well) and the "minimize to tray" feature just mentioned above?

merlijn-sebrechts commented 6 years ago

@Kabouik

Minimise to tray works for me on Ubuntu 18.04. Note that your DE needs to support the tray for this to work. Latest versions of Gnome removed this support but Ubuntu adds it using an extension. Note that you need to change the settings of the mattermost desktop app in order to enable minimize to tray.

Theme integration isn't final yet, but it should work for most common themes. Which theme are you using and on which distro?

Kabouik commented 6 years ago

Thanks for your answer @galgalesh. I am using Budgie, so the tray is supported (and the non-snap Mattermost application minimizes to tray). The option is there in the snap version, but it cannot be enabled (same as @antonpaisov reported above).

My theme is Adapta (or Adapta-Nokto-Eta, the dark version, on another computer), the cursors are provided by breeze-cursor, and icons from Papirus (but I don't think icons are relevant).

merlijn-sebrechts commented 6 years ago

@Kabouik Can you open a new issue for the "minimize to tray" problem?

Adapta is not yet supported, this is a snapd issue, we're waiting for better support for themes in snapd.