Opened 13 years ago

Closed 13 years ago

#183 closed defect (fixed)

Having issues with OSX client

Reported by: tlc Owned by: Antoine Martin
Priority: critical Milestone:
Component: Xpra Keywords:
Cc:

Description

I'm using a MAC client 0.12.8 and Ubuntu server (0.8.12.1-1 & 0.0.7.33-1).
Applications don't start at all, but Desktops do.

Server log files attached.

Attachments (1)

logs.tgz (8 bytes) - added by tlc 13 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 13 years ago by tlc

Based on the log files I added the python-rsvg package to the Ubuntu machine. But I'm still having the issue.

comment:2 Changed 13 years ago by tlc

The winswitch version above should read 0.12.8.1-1 not 8.12.

I've updated xpra to 0.0.7.34-1 but still have the issue.
I now see a "Xpra Failed to connect" Growl dialog that I don't think I saw before the xpra upgrade.

Last edited 13 years ago by tlc (previous) (diff)

comment:3 Changed 13 years ago by tlc

When running the simple Xpra example:

xpra start :100
DISPLAY=:100 xterm


xpra attach ssh:serverhostname:100


I see the following output on the client side:

$ Contents/Helpers/xpra attach ssh:my.host.com:888
failed to load Growl: No module named Growl, notifications will not be shown
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xpra/scripts/main.pyc", line 212, in main
  File "xpra/scripts/main.pyc", line 328, in run_client
  File "xpra/client.pyc", line 443, in __init__
  File "xpra/client.pyc", line 749, in send_hello
  File "xpra/client.pyc", line 691, in send
  File "xpra/client.pyc", line 51, in queue_ordinary_packet
  File "xpra/protocol.pyc", line 103, in source_has_more
  File "xpra/protocol.pyc", line 107, in _maybe_queue_more_writes
  File "xpra/protocol.pyc", line 131, in _flush_one_packet_into_buffer
  File "xpra/bencode.pyc", line 253, in bencode
  File "xpra/bencode.pyc", line 230, in encode_list
  File "xpra/bencode.pyc", line 239, in encode_dict
KeyError: <type 'NoneType'>

and no xterm.

Last edited 13 years ago by tlc (previous) (diff)

comment:4 Changed 13 years ago by Antoine Martin

Thanks for this, that's narrowing it down, would you mind running it again with:

xpra attach ssh:cauble.no-ip.com:888 -d all

It is going to be verbose, but will let us see what packet contains "None"

comment:5 Changed 13 years ago by tlc

$ Contents/Helpers/xpra attach ssh:my.host.com:888 -d all
parse_shortcuts(['meta+shift+F4:quit'])
parse_shortcuts(['meta+shift+F4:quit'])={'F4': (['meta', 'shift'], 'quit')}
get_icon_filename(xpra.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/xpra.png, exists=True
set default window icon to /Applications/Window-Switch.app/Contents/Resources/share/icons/xpra.png
darwin client extras using icon_filename=/Applications/Window-Switch.app/Contents/Resources/share/icons/xpra.png
failed to load Growl: No module named Growl, notifications will not be shown
setup_macdock()
setup_macdock() loading icon from /Applications/Window-Switch.app/Contents/Resources/share/icons/xpra.png
get_icon_filename(information.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/information.png, exists=False
get_icon_filename(statistics.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/statistics.png, exists=False
get_icon_filename(encoding.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/encoding.png, exists=False
get_icon_filename(keyboard.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/keyboard.png, exists=False
get_icon_filename(slider.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/slider.png, exists=False
get_icon_filename(retry.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/retry.png, exists=False
get_icon_filename(raise.png)=/Applications/Window-Switch.app/Contents/Resources/share/icons/raise.png, exists=False
sending modifiers=[]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xpra/scripts/main.pyc", line 212, in main
  File "xpra/scripts/main.pyc", line 328, in run_client
  File "xpra/client.pyc", line 443, in __init__
  File "xpra/client.pyc", line 749, in send_hello
  File "xpra/client.pyc", line 691, in send
  File "xpra/client.pyc", line 51, in queue_ordinary_packet
  File "xpra/protocol.pyc", line 103, in source_has_more
  File "xpra/protocol.pyc", line 107, in _maybe_queue_more_writes
  File "xpra/protocol.pyc", line 131, in _flush_one_packet_into_buffer
  File "xpra/bencode.pyc", line 253, in bencode
  File "xpra/bencode.pyc", line 230, in encode_list
  File "xpra/bencode.pyc", line 239, in encode_dict
KeyError: <type 'NoneType'>
Last edited 13 years ago by tlc (previous) (diff)

comment:6 Changed 13 years ago by Antoine Martin

Hah, forgot that Mac OS trims the arguments so this will not have any effect..

This will if you can apply it:

Index: xpra/protocol.py
===================================================================
--- xpra/protocol.py	(revision 449)
+++ xpra/protocol.py	(working copy)
@@ -135,6 +135,18 @@
             return
         packet, self._source_has_more = self.source.next_packet()
         if packet is not None:
+            if type(packet)==list:
+                i = 0
+                for x in packet:
+                    if x is None:
+                        log.error("packet type '%s' contains a None value at index %s!", packet[0], i)
+                        return
+                    elif type(x)==dict:
+                        for k,v in x.items():
+                            if k==None or v==None:
+                                log.error("packet type '%s' contains a None value in dict at index %s: key=%s, value=%s", packet[0], i, k, v)
+                                return
+                    i += 1
             data = bencode(packet)
             l = len(data)
             self._write_lock.acquire()

Maybe I will merge something like it to help debug problems like this one in the future.

Last edited 13 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 13 years ago by tlc

packet type 'hello' contains a None value in dict at index 1: key=keyboard_sync, value=None

comment:8 Changed 13 years ago by Antoine Martin

hah, perfect, thanks! This is already fixed in trunk...
I guess I will make a winswitch release shortly so that you can get the newer version of xpra with it.

Before you posted this, I've added to xpra:

  • code to detect "None" data in a packet when it fails: r455
  • code to try to prevent "None" values from getting via the gtk keymap code in r456

btw, this is an xpra bug and should have been recorded here, and please use code blocks when pasting data.

comment:9 Changed 13 years ago by Antoine Martin

btw, if you want to patch your current xpra code, here is the bit that you need, replace:

capabilities_request["keyboard_sync"] = self.keyboard_sync and key_repeat

with:

capabilities_request["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)

comment:10 Changed 13 years ago by tlc

FYI, I modded 449 like you asked, but that's 23 hours old and my OSX DMG is at least 9 days old. (The DMG I downloaded on the 10th is the same as the one I downloaded today.) So we're mixing old and new code here...

Is this bug because I have an older version on OSX than Ubuntu? Or just a regular bug?

Thanks.

comment:11 Changed 13 years ago by tlc

What file is that patch in?

comment:12 Changed 13 years ago by Antoine Martin

xpra/client.py

in send_hello

comment:13 Changed 13 years ago by tlc

Since i'm working with a DMG of .pyc files, I didn't know which client.py to start with. I chose rev 396, where your patch was introduced and got:

$ Contents/Helpers/xpra attach ssh:some.host:888 -d all
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xpra/scripts/main.pyc", line 212, in main
  File "xpra/scripts/main.pyc", line 319, in run_client
  File "/Applications/Window-Switch.app/Contents/Resources/lib/python/xpra/client.py", line 24, in <module>
    from xpra.keys import mask_to_names, get_modifiers_ignored, DEFAULT_MODIFIER_NAMES
ImportError: cannot import name get_modifiers_ignored
Last edited 13 years ago by tlc (previous) (diff)

comment:14 Changed 13 years ago by Antoine Martin

Hah, I can't remember which revision is built in, probably 0.0.7.32, in which case you want r361

I'll make a new release with the fixes shortly.

Changed 13 years ago by tlc

Attachment: logs.tgz added

comment:15 Changed 13 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

v0.12.9 is out and fixes this issue.

Note: See TracTickets for help on using tickets.