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

Desktop Client - SysTray Icon does not show on Ubuntu 20.10 #2597

Closed
anthonysomerset opened this issue Oct 27, 2020 · 43 comments
Closed

Desktop Client - SysTray Icon does not show on Ubuntu 20.10 #2597

anthonysomerset opened this issue Oct 27, 2020 · 43 comments

Comments

@anthonysomerset
Copy link

anthonysomerset commented Oct 27, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Expected behaviour

Desktop Tray icon should be present

Actual behaviour

On Ubuntu 20.10 (Groovy Gorilla) the tray icon appears to not show at all, the nextcloud background process is however running OK and syncs appear to be running OK - Not sure if its an 20.04 > 20.10 upgrade issue or if its present on 20.10 out of box

Steps to reproduce

  1. Ubuntu 20.10 installed (i upgraded from 20.04)
  2. Run Nextcloud, close app window
  3. note no tray icon

image

What is odd to observe is the window now loads off the dock rather than the top bar like before

Screenshot from 2020-10-27 19-46-43

Client configuration

Client version:
3.0.2
nextcloud-client 3.0.2-20200924.150911.068ad89d8-1.0~groovy1
Operating system: Ubuntu 20.10 (Groovy Gorilla)

OS language: English

Qt version used by client package (Linux only, see also Settings dialog): Does not say
image

Client package (From Nextcloud or distro) (Linux only):
(Ubuntu PPA)
deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu groovy main

Installation path of client: default

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

  1. Client logfile:

log.txt

@er-vin
Copy link
Member

er-vin commented Oct 28, 2020

Wouldn't that be #1977 getting worse?

@anthonysomerset
Copy link
Author

anthonysomerset commented Oct 28, 2020

Its possible - but i never experienced the issue reported there that i remember - I should add that there is no icon at all - not even an empty space or incorrect icon

@er-vin
Copy link
Member

er-vin commented Oct 28, 2020

OK. That said (and unfortunately) I might need you to do similar investigations than the people on that other ticket. This kind of issues tend to be somewhere outside of our code and so it's hard to locate outside of a machine which is not affected.

Word of caution: even if we do find the culprit we might or might not be able to do something about it, we're merely delegating that stuff to QSystemTrayIcon...

@anthonysomerset
Copy link
Author

Sure - more than happy to debug as requested - just let me know what you need me me to gather

@er-vin
Copy link
Member

er-vin commented Oct 28, 2020

Let's summon @veddox who did a good chunk of that investigation on the other ticket, he might have good ideas to get you started.

@Sicabol
Copy link

Sicabol commented Oct 28, 2020

I had a similar issue. On Ubuntu 20.04 I had absolutely no problem. I have upgraded on Saturday to Ubuntu 20.10. The tray was not appearing. I have uninstalled the client from the Software Manager. Then I've tried to re-install it but now I have a missing dependency:

sudo apt install nextcloud-desktop
[sudo] password for sicabol: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nextcloud-desktop : Depends: libnextcloudsync0 (= 2.6.4-1) but 3.0.2-20200924.150911.068ad89d8-1.0~focal1 is to be installed
                     Recommends: nextcloud-desktop-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I've tried to download and use the AppImage from Nextcloud website but it slows my laptop like never before…

@anthonysomerset
Copy link
Author

anthonysomerset commented Oct 28, 2020

i just tried this also - the reinstall was OK - i note you are referencing focal packages not groovy so perhaps PPA not updated for you

looks like the icon is working again after reinstall - will perform some more tests and advise

@er-vin
Copy link
Member

er-vin commented Oct 28, 2020

Looks like it's tied to the packaging somehow then... @ivaradi any idea?

@janvlug
Copy link

janvlug commented Oct 28, 2020

I have similar problems (also as #1977) on Fedora 33 I just upgraded to from Fedora 32. I'm using GNOME (3.38.1) on Wayland.
However, if I start a GNOME desktop session on Xorg, the icon is visible.

@q-wertz
Copy link
Contributor

q-wertz commented Oct 29, 2020

I have the same problem.
When you do cat /var/log/syslog | grep nextcloud what is the result?
I get:

Oct 29 08:45:26 hoth systemd[2793]: Exec binary '/snap/bin/nextcloud-client' does not exist: No such file or directory
Oct 29 08:45:26 hoth systemd[2793]: Not generating service for XDG autostart app-nextcloud\x2dclient-autostart.service, error parsing Exec= line: No such file or directory
Oct 29 08:45:27 hoth gnome-session[3776]: gnome-session-binary[3776]: WARNING: Could not parse desktop file nextcloud-client.desktop or it references a not found TryExec binary
Oct 29 08:45:27 hoth gnome-session-binary[3776]: WARNING: Could not parse desktop file nextcloud-client.desktop or it references a not found TryExec binary
Oct 29 15:03:21 hoth systemd[1919]: Exec binary '/snap/bin/nextcloud-client' does not exist: No such file or directory
Oct 29 15:03:21 hoth systemd[1919]: Not generating service for XDG autostart app-nextcloud\x2dclient-autostart.service, error parsing Exec= line: No such file or directory
Oct 29 15:03:22 hoth gnome-session[2143]: gnome-session-binary[2143]: WARNING: Could not parse desktop file nextcloud-client.desktop or it references a not found TryExec binary
Oct 29 15:03:22 hoth gnome-session-binary[2143]: WARNING: Could not parse desktop file nextcloud-client.desktop or it references a not found TryExec binary
Oct 29 15:09:33 hoth nextcloud[2374]: nextcloud: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
Oct 29 15:11:44 hoth systemd[1747]: Exec binary '/snap/bin/nextcloud-client' does not exist: No such file or directory

Apearently there are problems with an old (uninstalled snap version) and also a .desktop file that is non existant...

@janvlug
Copy link

janvlug commented Oct 29, 2020

On Fedora 33, GNOME desktop on Wayland I see with
# journalctl | grep -i nextcloud:

Oct 29 01:06:17 nyx audit[46977]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=46977 comm="nextcloud" exe="/usr/bin/nextcloud" sig=6 res=1
Oct 29 01:06:17 nyx com.nextcloud.desktopclient.nextcloud.desktop[46977]: 2020-10-29 01:06:17:898 [ fatal default ]:        The Wayland connection broke. Did the Wayland compositor die?
Oct 29 01:06:29 nyx systemd[2508]: app-gnome-com.nextcloud.desktopclient.nextcloud-46977.scope: Succeeded.
Oct 29 01:06:29 nyx systemd[2508]: app-gnome-com.nextcloud.desktopclient.nextcloud-46977.scope: Consumed 8.769s CPU time.
Oct 29 01:06:31 nyx systemd-coredump[49583]: Process 46977 (nextcloud) of user 1000 dumped core.
                                             #17 0x0000559a4d87ef05 main (nextcloud + 0xb5f05)
                                             #19 0x0000559a4d87f34e _start (nextcloud + 0xb634e)
Oct 29 01:06:45 nyx abrt-notification[51018]: Process 46977 (nextcloud) crashed in qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) [clone .cold]()
Oct 29 01:06:45 nyx audit[50820]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=50820 comm="QDBusConnection" exe="/usr/bin/nextcloud" sig=6 res=1
Oct 29 01:06:45 nyx audit[50756]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=50756 comm="QDBusConnection" exe="/usr/bin/nextcloud" sig=6 res=1
Oct 29 01:06:46 nyx Nextcloud.desktop[50820]: dbus[50820]: arguments to dbus_pending_call_block() were incorrect, assertion "pending != NULL" failed in file ../../dbus/dbus-pending-call.c line 765.
Oct 29 01:06:46 nyx Nextcloud.desktop[50820]: This is normally a bug in some application using the D-Bus library.
Oct 29 01:06:46 nyx Nextcloud.desktop[50820]:   D-Bus not built with -rdynamic so unable to print a backtrace
Oct 29 01:06:46 nyx com.nextcloud.desktopclient.nextcloud.desktop[50756]: dbus[50756]: arguments to dbus_pending_call_block() were incorrect, assertion "pending != NULL" failed in file ../../dbus/dbus-pending-call.c line 765.
Oct 29 01:06:46 nyx com.nextcloud.desktopclient.nextcloud.desktop[50756]: This is normally a bug in some application using the D-Bus library.
Oct 29 01:06:46 nyx com.nextcloud.desktopclient.nextcloud.desktop[50756]:   D-Bus not built with -rdynamic so unable to print a backtrace
Oct 29 01:06:45 nyx nextcloud[50756]: QIBusPlatformInputContext: CreateInputContext failed.
Oct 29 01:06:45 nyx nextcloud[50820]: QIBusPlatformInputContext: invalid input context.
Oct 29 01:06:45 nyx nextcloud[50820]: QSocketNotifier: Can only be used with threads started with QThread
Oct 29 01:06:45 nyx nextcloud[50756]: QSocketNotifier: Can only be used with threads started with QThread
Oct 29 01:06:45 nyx systemd[2508]: app-gnome-Nextcloud-50820.scope: Succeeded.
Oct 29 01:06:45 nyx systemd[2508]: app-gnome-com.nextcloud.desktopclient.nextcloud-50756.scope: Succeeded.
Oct 29 01:06:46 nyx systemd-coredump[51081]: Process 50756 (nextcloud) of user 1000 dumped core.
                                             #19 0x0000556e953fb697 _ZN11SharedTools19QtSingleApplicationC1ERK7QStringRiPPc (nextcloud + 0x1b0697)
                                             #20 0x0000556e9532b8e8 _ZN3OCC11ApplicationC2ERiPPc (nextcloud + 0xe08e8)
                                             #21 0x0000556e95300caa main (nextcloud + 0xb5caa)
                                             #23 0x0000556e9530134e _start (nextcloud + 0xb634e)
Oct 29 01:06:46 nyx systemd-coredump[51082]: Process 50820 (nextcloud) of user 1000 dumped core.
                                             #19 0x0000563ad27da697 _ZN11SharedTools19QtSingleApplicationC1ERK7QStringRiPPc (nextcloud + 0x1b0697)
                                             #20 0x0000563ad270a8e8 _ZN3OCC11ApplicationC2ERiPPc (nextcloud + 0xe08e8)
                                             #21 0x0000563ad26dfcaa main (nextcloud + 0xb5caa)
                                             #23 0x0000563ad26e034e _start (nextcloud + 0xb634e)
Oct 29 01:06:51 nyx abrt-notification[51554]: Process 50756 (nextcloud) crashed in ??()
Oct 29 01:06:55 nyx abrt-notification[51658]: Process 50756 (nextcloud) crashed in ??()
Oct 29 01:07:12 nyx nextcloud[52055]: QSocketNotifier: Can only be used with threads started with QThread
Oct 29 08:38:55 nyx systemd[2508]: app-gnome-com.nextcloud.desktopclient.nextcloud-52055.scope: Succeeded.
Oct 29 08:38:55 nyx systemd[2508]: app-gnome-com.nextcloud.desktopclient.nextcloud-52055.scope: Consumed 6.880s CPU time.

@er-vin
Copy link
Member

er-vin commented Oct 29, 2020

Clearly a crash, seems to be somewhere in QtSingleApplication but the backtrace is trimmed. You got a core dump though, so you might be able to open this with gdb and produce a more complete backtrace (bonus point for installing debug symbols and debug sources first which would give something more likely to be exploitable).

@janvlug
Copy link

janvlug commented Oct 29, 2020

I zipped the ABRT crash directory, although ABRT stated it was of low informational usage:
crash.zip

@omid-1985
Copy link

omid-1985 commented Oct 29, 2020

I have similar problems (also as #1977) on Fedora 33 I just upgraded to from Fedora 32. I'm using GNOME (3.38.1) on Wayland.
However, if I start a GNOME desktop session on Xorg, the icon is visible.

This is interesting as I have exactly opposite situations.
Upgraded from Ubuntu 20.04 to 20.10 and I'm using GNOME (3.38.1) on Xorg with no visible icon.
However, if I start a GNOME desktop session on Wayland, the icon is visible.

Update: It's gone on Wayland now same as Xorg!, Seems to be an intermittent issue.

@omid-1985
Copy link

omid-1985 commented Oct 30, 2020

Ok, here is a temporary fix:

  1. Run these two commands below to make an executable script:
    $ (echo '#!/bin/bash' && echo 'sleep 5' && echo '/usr/bin/nextcloud') > nextcloud-delayed-startup
    $ chmod +x nextcloud-delayed-startup

Or if you are using AppImage, replace /usr/bin/nextcloudwith your Nextcloud AppImage path

Screenshot from 2020-10-30 11-40-52

  1. Deselect Nextcloud Lunch on System Startup:

Screenshot from 2020-10-30 10-53-12

Or if you can't run it because it's already running but hidden in the background, close it with killall nextcloud, run it manually and deselect the option above.

  1. And add your own created script into startup:

Screenshot from 2020-10-30 11-42-00

@anthonysomerset
Copy link
Author

so my issue came back again - lock/logout did not fix - had to open the gui, exit fully then re-open - i seem to have a similar issue with synergy as well

@christianhubmann
Copy link

I've made the following observation:
When I log into Gnome on Ubuntu 20.10, no icon is shown even though Nextcloud is running. If I then kill the process and start Nextcloud again, now the icon is shown.
Could this be a timing issue? This would explain why the temp. fix from @omid-1985 is working.
It happens to me on both Wayland and Xorg.

@repsorp
Copy link

repsorp commented Nov 1, 2020

When I log into Gnome on Ubuntu 20.10, no icon is shown even though Nextcloud is running. If I then kill the process and start Nextcloud again, now the icon is shown.

Same here but once the Nextcloud client has been relaunched this way it is then impossible for me to connect to my Nextcloud account through Gnome Online Accounts (more details here)

@er-vin
Copy link
Member

er-vin commented Nov 2, 2020

This clearly looks like a timing issue... honestly I'm tempted to blame the systray code of Gnome. We're just requesting a systray icon, even if we got started before the gnome systray code kicks in (we got no control over that) that systray should find the nextcloud client is around and display the icon. KDE Plasma isn't affected by this for instance, even if the nextcloud client is faster to start than the rest of the session the icon is displayed just fine.

@Dagefoerde
Copy link
Member

I've made the following observation:
When I log into Gnome on Ubuntu 20.10, no icon is shown even though Nextcloud is running. If I then kill the process and start Nextcloud again, now the icon is shown.
Could this be a timing issue? This would explain why the temp. fix from @omid-1985 is working.
It happens to me on both Wayland and Xorg.

I can confirm this observation. Totally works when the client is started "late enough", whatever that means precisely.

@fnkr
Copy link

fnkr commented Nov 11, 2020

Here is my workaround, based on @omid-1985's comment but simpler:

Just update the Exec option in ~/.config/autostart/Nextcloud.desktop:

Exec=/usr/bin/bash -c 'sleep 5 && exec /usr/bin/nextcloud'

To revert the change (after the issue is fixed), just uncheck and check the Launch on System Startup checkbox in Nextcloud settings.

@repsorp
Copy link

repsorp commented Nov 12, 2020

Here is my workaround, based on @omid-1985's comment but simpler:

Doesn't work here, still no systray

Regular error message:
nextcloud[2642]: nextcloud: Fatal IO error 11 (Resource not available) on X server :0

--
Nextcloud version 3.1.0-20201112.035259.2316cb6ce-1.0~groovy1
Using Qt 5.14.2, built against Qt 5.14.2
Using Qt platform plugin 'xcb'
Using 'OpenSSL 1.1.1f 31 Mar 2020'
Running on Ubuntu 20.10, x86_64

@cnmicha
Copy link

cnmicha commented Nov 12, 2020

@repsorp Did you try it with a sleep 15 instead of sleep 5? Helped in my case.

Nextcloud Client 3.0.3 (Ubuntu)

@repsorp
Copy link

repsorp commented Nov 12, 2020

@repsorp Did you try it with a sleep 15 instead of sleep 5? Helped in my case.

I just tried it but it didn't work either
Systray shows up (sometimes it doesn't...) if I restart nextcloud-gui

@gbwebdev
Copy link

I've made the following observation:

  • If I check "Launch on System Startup" in the settings then, when I login :
    • No icon in the systray
    • The "settings" window is opened
  • If I do not check "Launch on System Startup" then :
    • Obviously nothing appears when I login (no icon in the systray, no window opened)
    • If I manually start the Nextcloud-client app then the icon appears in the systray and no window is opened (which is the desired behavior, except that I have to manually start the app).

@fnkr's workaround works for me.

@fnkr
Copy link

fnkr commented Nov 16, 2020

There seems to be a bug in the AppIndicator GNOME Shell Extension that's causing this: ubuntu/gnome-shell-extension-appindicator#250 (maybe 👍 there too) - I had the same problem with Flameshot, so it's not just Nextcloud. Also tray icons work for me when I'm using i3 instead of GNOME.

@er-vin
Copy link
Member

er-vin commented Nov 16, 2020

At that point, this is clearly a desktop environment issue. We can't do anything about it. I'll thus close it.

@jim-perkins
Copy link

Here is my workaround, based on @omid-1985's comment but simpler:

Just update the Exec option in ~/.config/autostart/Nextcloud.desktop:

Exec=/usr/bin/bash -c 'sleep 5 && exec /usr/bin/nextcloud'

To revert the change (after the issue is fixed), just uncheck and check the Launch on System Startup checkbox in Nextcloud settings.

This worked for me on a fresh Ubuntu 20.04 installation. thanks so much. Whats weird is I have a Ubuntu 20.04 installation at home that does not exhibit this upstream? bug. One possibly related difference is that the issue exposes itself on a laptop using wifi and not on a desktop computer connecting via ethernet.

@mbogner
Copy link

mbogner commented Jan 11, 2021

Was this reported at gnome?

Adding the sleep also helped to bring back my tray icon.

@mbogner
Copy link

mbogner commented Jan 11, 2021

@cnmicha
Copy link

cnmicha commented Jan 11, 2021

Yes, it has already been reported. But there doesn't seem to be much activity.
ubuntu/gnome-shell-extension-appindicator#250

@ferdiga
Copy link

ferdiga commented Jan 12, 2021

#2597 (comment)
works for me

@dregad
Copy link

dregad commented Jan 14, 2021

Facing the same issue, but on Ubuntu 20.04.1 LTS - no systray icon whatsoever but sync is working.

Stopping and restarting the nextcloud client fixes the problem for me, i.e. the tray icon appears

$ killall nexcloud
$ nextcloud &

I'll test the trick with delaying startup (#2597 (comment)) later, as I can't end my session right now.

@dregad
Copy link

dregad commented Jan 14, 2021

Wondering if ubuntu/gnome-shell-extension-appindicator#260 might fix this issue...

@mbogner
Copy link

mbogner commented Jan 14, 2021

Ah. I am also using ubuntu LTS as mentioned above. The workaround with the sleep fixed it for now.

@johanehnberg
Copy link

johanehnberg commented Feb 12, 2021

Here is my workaround, based on @omid-1985's comment but simpler:

Just update the Exec option in ~/.config/autostart/Nextcloud.desktop:

Exec=/usr/bin/bash -c 'sleep 5 && exec /usr/bin/nextcloud'

To revert the change (after the issue is fixed), just uncheck and check the Launch on System Startup checkbox in Nextcloud settings.

One-liner for automation:
sed -i "s#/usr/bin/nextcloud#/usr/bin/bash -c 'sleep 5 \&\& exec /usr/bin/nextcloud'#" ~/.config/autostart/Nextcloud.desktop

@fvonberg
Copy link

I am using the AppImage from Nextcloud with Ubuntu 20.04.
For me it worked to append:

X-GNOME-Autostart-Delay=10
X-MATE-Autostart-Delay=10
X-KDE-autostart-after=panel

to my com.nextcloud.desktopclient.nextcloud.desktop.

Found that Solution in the *.desktop from the jetbrains toolbox.

@Stern1710
Copy link

I am using the AppImage from Nextcloud with Ubuntu 20.04.
For me it worked to append:

X-GNOME-Autostart-Delay=10
X-MATE-Autostart-Delay=10
X-KDE-autostart-after=panel

For any Gnome-based environment, such as Ubuntu or Pop! OS which I am using, adding X-GNOME-Autostart-Delay=10 is enough. KDE and MATE are for the other respective environments. I also tuned down the delay time to about 2 seconds which seems to be enough so far for my Thinkpad, if any problems occur in the future, I will give an update

to my com.nextcloud.desktopclient.nextcloud.desktop.

Thanks for point this one out @fvonberg, helped me find the file. The appimage version seems to be using com.nextcloud.desktopclient.nextcloud.desktop, whereas other versions are storing the entry in Nextcloud.desktop

@er-vin
Copy link
Member

er-vin commented Feb 22, 2021

Note that the "X-KDE-autostart-after=panel" is likely useless though. By default it gets a "X-KDE-autostart-phase" of 2 which is after any "platformy" thing is started anyway.

@soleuu
Copy link

soleuu commented Feb 23, 2021

ubuntu 20.04 (using nextcloud-desktop package)

  • MATE : no need to add delay. It's working fine.
  • Gnome Shell : using "X-GNOME-Autostart-Delay=10" resolved the problem.

@Stern1710
Copy link

I tried it with `Delay=2' and it works fine, maybe somebody just wants less delay until the client starts. Just try it out for yourself if that works as well.

@fabricfc
Copy link

fabricfc commented May 7, 2021

I tried it with `Delay=2' and it works fine, maybe somebody just wants less delay until the client starts. Just try it out for yourself if that works as well.

2 seconds sleep did it, tks

@pmorch
Copy link

pmorch commented Apr 25, 2024

I realize that the OP had a different problem, but I was also experiencing "Desktop Client - SysTray Icon does not show" (but on NixOS - not really relevant).

My problem was that I didn't have the AppIndicator and KStatusNotifierItem Support extension installed.

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

No branches or pull requests