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

Overlay icons problem on arch linux #6406

Closed
lbayerlein opened this issue Mar 26, 2018 · 18 comments
Closed

Overlay icons problem on arch linux #6406

lbayerlein opened this issue Mar 26, 2018 · 18 comments
Assignees
Labels
Milestone

Comments

@lbayerlein
Copy link

lbayerlein commented Mar 26, 2018

Expected behaviour

I am starting Nautilus, click on the folder and there are folders and files with a given state in it. This state would be shown by small icons extending the default icons.

Actual behaviour

Nautilus does not show anything.

Steps to reproduce

  1. Install Nautilus and owncloud-client in the actual version. Nautilus via pacman, owncloud via aur (in my case yaourt)
  2. Start owncloud client with a configured account
  3. Start Nautilus from the system application (not from the terminal as user)

Server configuration

Operating system: CentOS 7.15011

Web server: Apache2 (2.4)

Database: MariaDB

PHP version: 7.1

ownCloud version:

Storage backend (external storage):

Client configuration

Client version: 2.4.1

Operating system: Arch Linux (Linux version 4.15.10-1-ARCH (builduser@heftig-18961) (gcc version 7.3.1 20180312 (GCC)) #1 SMP PREEMPT Thu Mar 15 12:24:34 UTC 2018)

OS language: DE

Qt version used by client package (Linux only, see also Settings dialog): 5.10.1

Client package (From ownCloud or distro) (Linux only):

Installation path of client: default

@guruz
Copy link
Contributor

guruz commented Mar 26, 2018

(See also discussion on #owncloud-client-dev on freenode:

<bigbalu> but what I have found: if I run nautilus from system tray - all icons are not shown. If I run it manually from terminal, everything works
<bigbalu> should I open a bug?

)

@guruz guruz added this to the 2.4.2-maybe milestone Mar 26, 2018
@ogoffart
Copy link
Contributor

Any umlaut in the file paths? I suspect this is a duplicate of #6393 Fixed by #6397

@ckamm
Copy link
Contributor

ckamm commented Mar 28, 2018

But why would the umlaut problem apply only to the nautilus that's started from the system tray?

@lbayerlein Could you check if both are using the same nautilus binary (you're on arch, maybe one of them is using python3 and not having the encoding issues?)

ls -l /proc/`pgrep -n nautilus`/exe

Otherwise: Could you check what the system-tray started nautilus is saying?

strace -p`pgrep -n nautilus` -s9999 -e write

@lbayerlein
Copy link
Author

lbayerlein commented Mar 29, 2018

Hi @ckamm and @ogoffart ,

ls -l /proc/`pgrep -n nautilus`/exe

shows me:

lrwxrwxrwx 1 ludwig ludwig 0 29. Mär 09:01 /proc/9001/exe -> /usr/bin/nautilus

And for the strace command, I get many lines with these informations:

write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(6, "\1\0\0\0\0\0\0\0", 8)         = 8
write(11, "\1\0\0\0\0\0\0\0", 8)        = 8
write(6, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8

Thanks for your support. If you need further information, tell me what to do, plz.

@ogoffart
Copy link
Contributor

ogoffart commented Apr 4, 2018

What's the value of $XDG_RUNTIME_DIR Is it defined the same for the owncloud client and nautilus?
Do $XDG_RUNTIME_DIR/ownCloud/socket exists

What show in the console when starting nautilus? (can you do killall nautilus; nautilus) It should show Initializing ownCloud-client-nautilus extension and then a few other messages.

@lbayerlein
Copy link
Author

Hi @ogoffart ,

here all things from my side:

ludwig@balu  ~   master  ls $XDG_RUNTIME_DIR/ownCloud/
socket
ludwig@balu  ~   master  echo $XDG_RUNTIME_DIR
/run/user/1000
ludwig@balu  ~   master  killall nautilus;nautilus
nautilus: Kein Prozess gefunden
Initializing ownCloud-client-nautilus extension
Socket File: /run/user/1000/ownCloud/socket
Setting connected to True.
Socket watch id: 15
Server response: REGISTER_PATH:/home/ludwig/ownCloud
Server response: GET_STRINGS:BEGIN
Server response: STRING:SHARE_MENU_TITLE:Teilen…
Server response: STRING:CONTEXT_MENU_TITLE:ownCloud
Server response: STRING:COPY_PRIVATE_LINK_MENU_TITLE:Privater Link in die Zwischenablage kopiert
Server response: STRING:EMAIL_PRIVATE_LINK_MENU_TITLE:Sende privaten Link per Email...
Server response: STRING::
Server response: GET_STRINGS:END
Server response: STATUS:OK:/home/ludwig/ownCloud

** (nautilus:14037): CRITICAL **: 16:57:38.426: nautilus_column_provider_get_columns: assertion 'iface->get_columns != NULL' failed
Nautilus-Share-Message: 16:57:38.571: Called "net usershare info" but it failed: »net usershare« gab den Fehler 1 zurück: Can't load /etc/samba/smb.conf - run testparm to debug it

Server response: STATUS:OK:/home/ludwig/ownCloud/

Seems that it is everything OK.

@lbayerlein
Copy link
Author

I have found further informations.

Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Initializing ownCloud-client-nautilus extension
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Socket File: /run/user/1000/ownCloud/socket
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Setting connected to True.
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Socket watch id: 17
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Server response: REGISTER_PATH:/home/ludwig/ownCloud
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Server response: GET_STRINGS:BEGIN
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: Traceback (most recent call last):
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:   File "/usr/lib/python2.7/site-packages/gi/overrides/GLib.py", line 668, in <lambda>
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:     func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:   File "/usr/share/nautilus-python/extensions/syncstate-ownCloud.py", line 133, in _handle_notify
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:     self._handle_server_response(l.decode('utf-8'))
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:   File "/usr/share/nautilus-python/extensions/syncstate-ownCloud.py", line 140, in _handle_server_response
Apr 04 17:04:50 balu org.gnome.Nautilus[932]:     print("Server response: " + line)
Apr 04 17:04:50 balu org.gnome.Nautilus[932]: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 47: ordinal not in range(128)

To get this, I run nautilus from the desktop file (nautilus), not in the terminal. Hope it will get you further

@ogoffart
Copy link
Contributor

ogoffart commented Apr 4, 2018

Do you have the arhclinux package owncloud-client 2.4.1-2 the -2 is important because it has the fix.

Anyway, i think the problem here is that the print() tries to converet the string with an ascii codec, but it contains the character

@lbayerlein
Copy link
Author

Yes, the actual version of owncloud-client is installed (with -2). I installed it via yaourt

ludwig@arch  ~   master  pacman -sQ | grep ownc
local/owncloud-client 2.4.1-2
 ludwig@arch  ~   master  yaourt -S owncloud-client
warning: owncloud-client-2.4.1-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) owncloud-client-2.4.1-2

Total Installed Size:  7.31 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 

@lbayerlein
Copy link
Author

On my second pc, I reinstalled it via yaourt (answered Y to the question above), run journalctl -f after that and run nautilus again. This comes up:

Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]: Traceback (most recent call last):
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:   File "/usr/lib/python2.7/site-packages/gi/overrides/GLib.py", line 668, in <lambda>
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:     func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:   File "/usr/share/nautilus-python/extensions/syncstate-ownCloud.py", line 133, in _handle_notify
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:     self._handle_server_response(l.decode('utf-8'))
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:   File "/usr/share/nautilus-python/extensions/syncstate-ownCloud.py", line 140, in _handle_server_response
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]:     print("Server response: " + line)
Apr 04 20:46:25 arch.balu.lan org.gnome.Nautilus[8947]: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 55: ordinal not in range(128)

@lbayerlein
Copy link
Author

I did some further testing and can recognize this error on my side. If there is an 'ä', 'ö' or 'ü' in the current view (in the folder), this traceback comes up.

@ckamm ckamm added type:bug and removed Needs info labels Apr 6, 2018
@ckamm
Copy link
Contributor

ckamm commented Apr 6, 2018

Does look like an encoding issue that wasn't fixed by #6397. Possibly only reproducible with python3? (should add python version to initialization output)

@ckamm
Copy link
Contributor

ckamm commented Apr 25, 2018

@ogoffart Could you test encoded files on your arch where the shell extension uses python3? I'll add a note about the python version to the start debug output.

ogoffart added a commit that referenced this issue Apr 25, 2018
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.

Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.

Relates to issue: #6406
@ogoffart
Copy link
Contributor

Hopefully fixed with #6490

@ckamm: from what i understand, python 2.7 is used there, the problem is not with filename with, but with the fact that the german translation of owncloud contains a unicode '…' in the strings.

ogoffart added a commit that referenced this issue Apr 25, 2018
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.

Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.

Relates to issue: #6406
@ckamm
Copy link
Contributor

ckamm commented Apr 25, 2018

@lbayerlein Could you test by replacing /usr/share/nautilus-python/extensions/syncstate-ownCloud.py with the up to date version from https://github.com/owncloud/client/blob/1ab3a9fc130bc028ff3246cb617a2cd893238b49/shell_integration/nautilus/syncstate.py ?

@lbayerlein
Copy link
Author

lbayerlein commented Apr 26, 2018

@ckamm I replaced syncstate-ownCloud.py with your suggestion and it workes again. Now icons show the syncstate of every file or folder. It seems solved on my side.

Thanks very much for your support guys

ckamm added a commit that referenced this issue Apr 26, 2018
ckamm pushed a commit that referenced this issue Apr 26, 2018
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.

Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.

Relates to issue: #6406

(cherry picked from commit 1ab3a9f)
@ckamm
Copy link
Contributor

ckamm commented Apr 26, 2018

@lbayerlein Thank you for testing.

I'll close this here. The PR for the backport is also part of the 2.4.2 milestone.

@ckamm ckamm closed this as completed Apr 26, 2018
ckamm added a commit that referenced this issue Apr 26, 2018
ckamm pushed a commit that referenced this issue Apr 26, 2018
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.

Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.

Relates to issue: #6406

(cherry picked from commit 1ab3a9f)
@jnweiger
Copy link
Contributor

Tested with 242rc1:
testpilotcloud-client on Linux Mint 19 cinnamon desktop with nautilus file manager.

sudo apt install -y testpilotcloud-client testpilotcloud-client-nautilus
LANG=de_DE testpilotcloud --logwin --logdebug &
cd $SYNCFOLDER
echo huhu > '♥_♥.txt'
echo huhu > 'Jü.txt'
killall nautilus
nautilus
SUCCESS. Overlay icons work fine.

Strange attribute errors that only occur, when filenames with unicode chars are involved
        https://github.com/owncloud/client/issues/6643

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

No branches or pull requests

5 participants