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]: missing share action from context menu in Nautilus 43 #5041

Closed
5 of 8 tasks
paolostivanin opened this issue Oct 13, 2022 · 11 comments
Closed
5 of 8 tasks

[Bug]: missing share action from context menu in Nautilus 43 #5041

paolostivanin opened this issue Oct 13, 2022 · 11 comments

Comments

@paolostivanin
Copy link

paolostivanin commented Oct 13, 2022

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

Bug description

Hello,
after the update to GNOME 43, the "Share" action is missing from Nautilus' context menu (right click).

$ nautilus
Initializing Nextcloud-client-nautilus extension
Using python version sys.version_info(major=3, minor=10, micro=7, releaselevel='final', serial=0)
TypeError: MenuExtension_ownCloud.get_file_items() missing 1 required positional argument: 'files'
** Message: 13:45:11.899: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: usershares are currently disabled

TypeError: MenuExtension_ownCloud.get_file_items() missing 1 required positional argument: 'files'

Steps to reproduce

  1. install openSUSE Tumbleweed (GNOME)
  2. install nextcloud-desktop
  3. try to share a file by right-clicking on it

Expected behavior

There should be a "share" action

Which version of the operating system you are running.

openSUSE Tumbleweed

Package

Distro package manager

Nextcloud Desktop Client version

3.6.0

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
@palto42
Copy link

palto42 commented Oct 15, 2022

@paolostivanin is only the "share" option missing in your case but the NC context menu still present?

I'm using Solus and after update to Gnome 43 the whole Nextcloud context menu in Nautilus is missing.

If I start nautilus, I get this errors:

nautilus
Initializing Nextcloud-client-nautilus extension
Using python version sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)
/usr/share/nautilus-python/extensions/open_any_terminal_extension.py:13: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gio, GObject, Gtk, Nautilus
Traceback (most recent call last):
  File "/usr/share/nautilus-python/extensions/open_any_terminal_extension.py", line 14, in <module>
    require_version('Gtk', '3.0')
  File "/usr/lib/python3.10/site-packages/gi/__init__.py", line 117, in require_version
    raise ValueError('Namespace %s is already loaded with version %s' %
ValueError: Namespace Gtk is already loaded with version 4.0
TypeError: MenuExtension_ownCloud.get_file_items() missing 1 required positional argument: 'files'

@paolostivanin
Copy link
Author

Yes, you're right, I wasn't very clear. The whole Nextcloud ctx menu is missing.

@palto42
Copy link

palto42 commented Oct 22, 2022

To me it seems that this is actually an issue in the Python package nautilus-terminal. There is a relates issue #82 for this package already.

@EbonJaeger
Copy link

EbonJaeger commented Oct 22, 2022

It is not caused by nautilus-terminal, it just has its own error in the same output.

In the output given above, the Nextcloud extension is hitting its own error with some API function call. It's also possible that this exrension will hit the same error as the other extension since Nautilus extensions must use GTK4 as of version 43. It's not clear to me what version this one is using.

@paolostivanin
Copy link
Author

Exactly. The issue here is:

TypeError: MenuExtension_ownCloud.get_file_items() missing 1 required positional argument: 'files'

so nautilus-terminal is not part of the problem at all.

@paolostivanin
Copy link
Author

paolostivanin commented Oct 22, 2022

The problem can be easily fixed by removing window from the get_file_items method:

def get_file_items(self, window, files):

I tried on my machine and everything works fine.

@paolostivanin
Copy link
Author

I've opened a PR to fix this issue. If you are using openSUSE Tumbleweed, you should get an update with the fix in a couple of days 😄

@palto42
Copy link

palto42 commented Oct 22, 2022

It is not caused by nautilus-terminal, it just has its own error in the same output.

Sorry, was a bit confused by the multiple error messages.

@palto42
Copy link

palto42 commented Oct 23, 2022

I've opened a PR to fix this issue. If you are using openSUSE Tumbleweed, you should get an update with the fix in a couple of days smile

@paolostivanin I tried the patch with stable-3.6 branch on Solus and it works :)
Regarding your PR I wonder if there should be another one for the current stable-3.6 branch to get it quickly rolled out? Your current PR for the master branch shows some build issues which I assume are just caused by other commits in the master branch not related to this issue/patch.

@paolostivanin
Copy link
Author

Yes, those tests are failing for unrelated reasons.
I've opened a PR for the stable branch too: #5085

@paolostivanin
Copy link
Author

There's already a PR open: #4870

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

3 participants