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

[Bug]: Two instances of Nextcloud Desktop running in parallel #4661

Open
5 of 8 tasks
janvlug opened this issue Jun 22, 2022 · 13 comments
Open
5 of 8 tasks

[Bug]: Two instances of Nextcloud Desktop running in parallel #4661

janvlug opened this issue Jun 22, 2022 · 13 comments

Comments

@janvlug
Copy link

janvlug commented Jun 22, 2022

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Lately, I see regularly that there are two instances of Nextcloud Desktop running after first logging in. I see two Nextcloud Desktop icons:
image
And ps shows this:
image

Steps to reproduce

  1. Start the computer
  2. Wait for the system to be booted
  3. Log in
    Note that two instances of Nextcloud Desktop are started

Expected behavior

Only one instance of Nextcloud Desktop running at the same time

Which files are affected by this bug

n.a.

Operating system

Linux

Which version of the operating system you are running.

Fedora 35

Package

Distro package manager

Nextcloud Server version

22.2.6

Nextcloud Desktop Client version

3.5.1

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

No response

Additional info

For (still unknown to me) reasons, my system is slow on disk access, and starting applications takes a relative long time.

@janvlug
Copy link
Author

janvlug commented Jun 22, 2022

I noticed now that I have two .desktop files for Nextcloud desktop in .config/autostart/
image

@janvlug
Copy link
Author

janvlug commented Jun 22, 2022

After making changes to the Nextcloud Desktop settings, I notice that the com.nextcloud.desktopclient.nextcloud.desktop file is the one that is being modified:
image

@mgallien
Copy link
Collaborator

looks like the second desktop file is dating back from release 3.0.0 (or maybe even older but I cannot be sure)
the difference in name might be the result of a packaging issue at the time. Vendor (including Linux distributions) may change it during the build process.
given how old this is, my recommendation is really to delete the one named Nextcloud.desktop and checks if everything is now working fine

@mgallien
Copy link
Collaborator

so forget my comment about distributor having maybe built with a different naming scheme
I had not checked carefully and now can confirm that this name changed before the 3.0.0 release
you may have got those two duplicated files since the upgrade to 3.0.0

so can you check if the problem is solved by removing the old one ?

@janvlug
Copy link
Author

janvlug commented Jun 28, 2022

I confirm that the removing one of the files solved the issue. I removed Nextcloud.desktop, because that was the oldest one.

@janvlug
Copy link
Author

janvlug commented Apr 14, 2024

Today I noticed two instances of Nextcloud running again on my Fedora desktop:

image

ls -sla ~/.config/autostart/*extcloud*
4 -rw-r--r--. 1 jan jan 244 Nov  3 14:49 /home/jan/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop
4 -rw-r--r--. 1 jan jan 244 Apr 14 12:22 /home/jan/.config/autostart/Nextcloud.desktop
4 -rw-rw-r--. 1 jan jan 202 May  6  2019 /home/jan/.config/autostart/Nextcloud.desktop.double_bak

So it looks like this issue resurfaced. For now I will move the com.nextcloud.desktopclient.nextcloud.desktop aside, because that is the oldest.

Is there a risk in running two Nextcloud instances in parallel? Should this somehow be detected by Nextcloud Desktop?

Should this issue be re-opened?

@janvlug
Copy link
Author

janvlug commented May 18, 2024

See also:

So I think this issue should be re-opened, @camilasan.

@ChristophWurst
Copy link
Member

Same on Arch Linux

-rw-r--r--   1 christoph christoph  244 Apr 29 07:07 Nextcloud.desktop
-rw-r--r--   1 christoph christoph  244 Oct 29  2023 com.nextcloud.desktopclient.nextcloud.desktop
-rw-r--r--   1 christoph christoph 9406 Aug 14  2018 nextcloud.desktop

@mgallien
Copy link
Collaborator

@janvlug it seems like our method to prevent the same client to run twice and detect an already running one may fail in some circumstances
we could indeed revisit this issue

@mgallien mgallien reopened this Nov 13, 2024
@janvlug
Copy link
Author

janvlug commented Nov 13, 2024

FYI: I did not see this issue any more lately, which of course is no proof that it does not exist any more.

@FabD86
Copy link

FabD86 commented Dec 14, 2024

@janvlug @mgallien this problem is still present:
Image

@JHSheridan
Copy link

Same issue here

Image

@ChristophWurst
Copy link
Member

$ ps ax | grep nextcloud
  48471 ?        SLl    0:00 /usr/bin/nextcloud
  48697 ?        Sl     0:00 /usr/bin/nextcloud
  48947 ?        Sl     0:00 /usr/bin/nextcloud
  48993 ?        Sl     0:00 /usr/bin/nextcloud

while I can't get the client to switch to foreground mode. I can't "see" any of the running clients due to #5771

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

6 participants