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

Unexpected behaviour in get_NM_adapter_type of net/device_info.py on master #4097

Closed
SimonMaenaut opened this issue Jan 12, 2024 · 1 comment
Labels
bug Something isn't working network

Comments

@SimonMaenaut
Copy link

SimonMaenaut commented Jan 12, 2024

Describe the bug
My system is running xpra (build from source with the latest commit on master) as a client and tries to connect to a remote xpra server.

For some reason connection.get_controller() in device_info.py returns an integer on my system, which causes the xpra client to crash with the following error.

2024-01-12 18:15:24,111 error preparing connection: 'int' object has no attribute 'get_vendor'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/xpra/client/base/client.py", line 396, in send_hello
    hello.update(self.make_hello())
                 ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/xpra/client/gtk3/client_base.py", line 828, in make_hello
    capabilities = UIXpraClient.make_hello(self)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/xpra/client/gui/ui_client_base.py", line 394, in make_hello
    caps.update(c.get_caps(self))
                ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/xpra/client/mixins/network_state.py", line 135, in get_caps
    default_adapter_type = guess_adapter_type(get_NM_adapter_type(device_name) or device_name)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/xpra/net/device_info.py", line 50, in get_NM_adapter_type
    log(f"NM device {device_name!r}: {nmdevice.get_vendor()} {nmdevice.get_product()}")
                                      ^^^^^^^^^^^^^^^^^^^
AttributeError: 'int' object has no attribute 'get_vendor'

To mitigate the issue I've added nmdevice = False on the line above the if statement.

If needed I'm willing to try different versions or possible patches.

To Reproduce
Steps to reproduce the behavior:

  1. server command : xpra start --daemon=no --exit-with-children --start-child=my/program
  2. client command : xpra attach ssh://myserver.eu/0
  3. run the client command and wait

System Information (please complete the following information):

  • Server OS: Linux Ubuntu 20.04 focal
  • Client OS: Linux Arch
  • Xpra Server Version: 5.0.3-r1
  • Xpra Client Version: 6.0 commit b7225fd from master

Additional context

Build details
setup.py install --without-nvidia
Xpra version 6.0
found Cython version 3.0.8
found pkg-config version: 2.1.0
ARCH='x86_64'
using INCLUDE_DIRS=['/tmp/xpra-env/include', '/usr/include', '/usr/local/include']
CC='gcc'
CPP='cpp'
build switches:
* PIC                  : Yes
* Xdummy               : Auto
* Xdummy_wrapper       : Auto
* annotate             : Yes
* argb                 : Yes
* audio                : Yes
* avif                 : Yes
* brotli               : Yes
* bundle_tests         : No
* client               : Yes
* clipboard            : Yes
* codecs               : Yes
* csc_cython           : Yes
* csc_libyuv           : No
* cuda_kernels         : No
* cuda_rebuild         : No
* cython               : Yes
* cython_tracing       : No
* cythonize_more       : No
* data                 : Yes
* dbus                 : Yes
* debug                : No
* docs                 : Auto
* drm                  : Yes
* enc_proxy            : Yes
* enc_x264             : Yes
* evdi                 : No
* example              : Yes
* gstreamer            : Yes
* gtk3                 : Yes
* gtk_x11              : Yes
* http                 : Yes
* jpeg_decoder         : Yes
* jpeg_encoder         : Yes
* keyboard             : Yes
* lz4                  : Yes
* mdns                 : Yes
* modules              : Yes
* netdev               : Yes
* notifications        : Yes
* nvdec                : No
* nvenc                : No
* nvfbc                : No
* nvidia               : No
* nvjpeg_decoder       : No
* nvjpeg_encoder       : No
* opengl               : Yes
* openh264             : Yes
* openh264_decoder     : Yes
* openh264_encoder     : Yes
* pam                  : /usr/include/security
* pandoc_lua           : Yes
* pillow               : Yes
* printing             : Yes
* proc                 : Yes
* proxy                : Yes
* qrencode             : Yes
* quic                 : Yes
* rebuild              : Yes
* rfb                  : Yes
* scripts              : Yes
* sd_listen            : Yes
* server               : Yes
* service              : Yes
* shadow               : Yes
* spng_decoder         : Yes
* spng_encoder         : Yes
* ssh                  : Yes
* strict               : No
* tests                : No
* uinput               : Yes
* v4l2                 : Yes
* verbose              : No
* vpx                  : Yes
* vsock                : Yes
* warn                 : Yes
* webcam               : Yes
* webp                 : Yes
* x11                  : Yes
* xdg_open             : Yes
* xinput               : Yes
'nvcc --version' failed with return code 127
stderr: None
updated './xpra/build_info.py' with:
* BUILD_BIT            = 64bit
* BUILD_CPU            = AMD Ryzen 7 PRO 4750U with Radeon Graphics
* BUILD_DATE           = 2024-01-12
* BUILD_MACHINE        = x86_64
* BUILD_OS             = Linux Arch rolling n/a
* BUILD_TIME           = 18:58
* BUILT_BY             = simon
* BUILT_ON             = finneganfox
* COMPILER_VERSION     = gcc (GCC) 13.2.1 20230801
* CYTHON_VERSION       = 3.0.8
* LINKER_VERSION       = GNU ld (GNU Binutils) 2.41.0
* NVCC_VERSION         = 
* PYTHON_VERSION       = 3.11.6
* lib_gobject_introspection = 1.78.1
* lib_gtk              = 3.24.39
* lib_gtk_x11          = 3.24.39
* lib_py3cairo         = 1.25.1
* lib_pygobject        = 3.46.0
* lib_python3          = 3.11
* lib_python_Babel     = 2.12.1
* lib_python_CacheControl = 0.13.1
* lib_python_Cython    = 3.0.8
* lib_python_Deprecated = 1.2.14
* lib_python_Jinja2    = 3.1.2
* lib_python_Mako      = 1.3.0
* lib_python_Markdown  = 3.5.1
* lib_python_MarkupSafe = 2.1.3
* lib_python_PyChromecast = 13.0.8
* lib_python_PyGObject = 3.46.0
* lib_python_PyJWT     = 2.8.0
* lib_python_PyOpenGL  = 3.1.6
* lib_python_PyOpenGL_accelerate = 3.1.7
* lib_python_PyQt5     = 5.15.10
* lib_python_PyQt5_sip = 12.13.0
* lib_python_PySDL2    = 0.9.16
* lib_python_PyYAML    = 6.0.1
* lib_python_Pygments  = 2.17.2
* lib_python_SciPy     = 1.11.4
* lib_python_SecretStorage = 3.3.3
* lib_python_Send2Trash = 1.8.2
* lib_python_TBB       = 0.2
* lib_python_Unidecode = 1.3.7
* lib_python_annotated_types = 0.6.0
* lib_python_anyio     = 4.2.0
* lib_python_appdirs   = 1.4.4
* lib_python_argcomplete = 2.0.0
* lib_python_argon2_cffi = 23.1.0
* lib_python_argon2_cffi_bindings = 21.2.0
* lib_python_arrow     = 1.3.0
* lib_python_astropy   = 5.3.4
* lib_python_asttokens = 2.4.1
* lib_python_async_lru = 2.0.4
* lib_python_async_timeout = 4.0.3
* lib_python_attrs     = 23.1.0
* lib_python_autocommand = 2.2.2
* lib_python_beautifulsoup4 = 4.12.2
* lib_python_binwalk   = 2.3.3
* lib_python_black     = 23.12.1
* lib_python_bleach    = 6.1.0
* lib_python_breezy    = 3.3.4
* lib_python_btrfsutil = 6.6.3
* lib_python_build     = 1.0.3
* lib_python_cachy     = 0.3.0
* lib_python_casttube  = 0.2.1
* lib_python_certifi   = 2023.11.17
* lib_python_cffi      = 1.16.0
* lib_python_chardet   = 5.2.0
* lib_python_charset_normalizer = 3.3.2
* lib_python_cleo      = 2.1.0
* lib_python_click     = 8.1.7
* lib_python_colorama  = 0.4.6
* lib_python_comm      = 0.2.1
* lib_python_configobj = 5.0.8
* lib_python_contourpy = 1.2.0
* lib_python_coverage  = 6.5.0
* lib_python_crashtest = 0.4.1
* lib_python_cryptography = 41.0.7
* lib_python_cssselect = 1.2.0
* lib_python_cycler    = 0.12.1
* lib_python_dbus_python = 1.3.2
* lib_python_debugpy   = 1.8.0
* lib_python_decorator = 5.1.1
* lib_python_defusedxml = 0.7.1
* lib_python_deprecation = 2.1.0
* lib_python_discid    = 1.2.0
* lib_python_distlib   = 0.3.8
* lib_python_distro    = 1.9.0
* lib_python_dnspython = 2.4.2
* lib_python_dulwich   = 0.21.7
* lib_python_editables = 0.5
* lib_python_emoji     = 2.7.0
* lib_python_entrypoints = 0.4
* lib_python_evdev     = 1.6.1
* lib_python_executing = 2.0.0
* lib_python_fastbencode = 0.2
* lib_python_fasteners = 0.19
* lib_python_fastjsonschema = 2.19.1
* lib_python_filelock  = 3.13.1
* lib_python_fonttools = 4.47.2
* lib_python_fqdn      = 1.5.1
* lib_python_gbinder_python = 1.1.2
* lib_python_git_filter_repo = 2.38.0
* lib_python_gmpy2     = 2.1.5
* lib_python_h11       = 0.14.0
* lib_python_hatch_jupyter_builder = 0.8.3
* lib_python_hatchling = 1.21.0
* lib_python_html5lib  = 1.1
* lib_python_httpcore  = 1.0.2
* lib_python_httpx     = 0.26.0
* lib_python_idna      = 3.5
* lib_python_ifaddr    = 0.2.0
* lib_python_importlib_metadata = 5.0.0
* lib_python_inflect   = 7.0.0
* lib_python_iniconfig = 2.0.0
* lib_python_installer = 0.7.0
* lib_python_ipykernel = 6.28.0
* lib_python_ipython   = 8.20.0
* lib_python_ipython_genutils = 0.2.0
* lib_python_isoduration = 20.11.0
* lib_python_isounidecode = 0.3
* lib_python_jaraco.classes = 3.3.0
* lib_python_jaraco.context = 4.3.0
* lib_python_jaraco.functools = 3.9.0
* lib_python_jaraco.text = 3.12.0
* lib_python_jedi      = 0.19.1
* lib_python_jeepney   = 0.8.0
* lib_python_json5     = 0.9.14
* lib_python_jsonpointer = 2.4
* lib_python_jsonschema = 4.20.0
* lib_python_jsonschema_specifications = 2023.12.1
* lib_python_jupyter_client = 8.6.0
* lib_python_jupyter_core = 5.7.1
* lib_python_jupyter_events = 0.9.0
* lib_python_jupyter_packaging = 0.12.3
* lib_python_jupyter_server = 2.12.4
* lib_python_jupyter_server_terminals = 0.5.1
* lib_python_jupyterlab = 4.0.10
* lib_python_jupyterlab_pygments = 0.3.0
* lib_python_jupyterlab_server = 2.25.2
* lib_python_keyring   = 24.3.0
* lib_python_kiwisolver = 1.4.5
* lib_python_lark      = 1.1.8
* lib_python_lensfun   = 0.3.4
* lib_python_libfdt    = 1.7.0
* lib_python_libvirt_python = 9.10.0
* lib_python_lit       = 16.0.6.dev0
* lib_python_lockfile  = 0.12.2
* lib_python_louis     = 3.28.0
* lib_python_lxml      = 4.9.2
* lib_python_lz4       = 4.3.3
* lib_python_markdown_it_py = 3.0.0
* lib_python_matplotlib = 3.8.2
* lib_python_matplotlib_inline = 0.1.6
* lib_python_mdurl     = 0.1.2
* lib_python_mercurial = 6.6.1
* lib_python_merge3    = 0.0.14
* lib_python_meson     = 1.3.1
* lib_python_mistune   = 2.0.5
* lib_python_more_itertools = 10.1.0
* lib_python_mpmath    = 1.3.0
* lib_python_mpris_server = 0.4.2
* lib_python_msgpack   = 1.0.5
* lib_python_musicbrainzngs = 0.7.1
* lib_python_mutagen   = 1.47.0
* lib_python_mypy_extensions = 1.0.0
* lib_python_natsort   = 8.4.0
* lib_python_nbclassic = 1.0.0
* lib_python_nbclient  = 0.9.0
* lib_python_nbconvert = 7.14.1
* lib_python_nbformat  = 5.9.2
* lib_python_nest_asyncio = 1.5.7
* lib_python_netifaces = 0.11.0
* lib_python_netsnmp_python = 1.0a1
* lib_python_nftables  = 0.1
* lib_python_notebook  = 7.0.6
* lib_python_notebook_shim = 0.2.3
* lib_python_numpy     = 1.26.3
* lib_python_ordered_set = 4.1.0
* lib_python_overrides = 7.4.0
* lib_python_packaging = 23.2
* lib_python_pandas    = 1.5.3
* lib_python_pandocfilters = 1.5.0
* lib_python_parso     = 0.8.3
* lib_python_pathspec  = 0.12.1
* lib_python_patiencediff = 0.2.14
* lib_python_pdfarranger = 1.10.1
* lib_python_pexpect   = 4.9.0
* lib_python_picard    = 2.10
* lib_python_pickleshare = 0.7.5
* lib_python_pikaur    = 1.18.3
* lib_python_pikepdf   = 8.11.2
* lib_python_pillow    = 10.2.0
* lib_python_pkginfo   = 1.9.6
* lib_python_platformdirs = 4.1.0
* lib_python_pluggy    = 1.3.0
* lib_python_ply       = 3.11
* lib_python_poetry    = 1.7.1
* lib_python_poetry_core = 1.8.1
* lib_python_poetry_plugin_export = 1.5.0
* lib_python_pooch     = 1.8.0
* lib_python_prometheus_client = 0.19.0
* lib_python_prompt_toolkit = 3.0.43
* lib_python_protobuf  = 4.25.1
* lib_python_psutil    = 5.9.7
* lib_python_ptyprocess = 0.7.0
* lib_python_pure_eval = 0.2.2
* lib_python_pwquality = 1.4.5
* lib_python_pyOpenSSL = 23.3.0
* lib_python_pyalpm    = 0.10.6
* lib_python_pycairo   = 1.25.1
* lib_python_pyclip    = 0.7.0
* lib_python_pycparser = 2.21
* lib_python_pycups    = 2.0.1
* lib_python_pydantic  = 2.5.3
* lib_python_pydantic_core = 2.14.6
* lib_python_pydbus    = 0.6.0
* lib_python_pyerfa    = 2.0.0.3
* lib_python_pylast    = 5.2.0
* lib_python_pyparsing = 3.1.1
* lib_python_pyproject_hooks = 1.0.0
* lib_python_pyrsistent = 0.19.3
* lib_python_pyserial  = 3.5
* lib_python_pyshtools = 0+unknown
* lib_python_pyte      = 0.8.2
* lib_python_pytest    = 7.4.4
* lib_python_pytest_jupyter = 0.8.0
* lib_python_pytest_tornasync = 0.6.0.post2
* lib_python_python_dateutil = 2.8.2
* lib_python_python_dbusmock = 0.30.2
* lib_python_python_json_logger = 2.0.7
* lib_python_pytz      = 2023.3.post1
* lib_python_pyxdg     = 0.28
* lib_python_pyzmq     = 25.1.2
* lib_python_qrtools   = 2.1
* lib_python_radiotray_ng_mpris = 0.1.1
* lib_python_rapidfuzz = 3.6.0
* lib_python_referencing = 0.32.0
* lib_python_rencode   = 1.0.6
* lib_python_requests  = 2.31.0
* lib_python_requests_toolbelt = 1.0.0
* lib_python_rfc3339_validator = 0.1.4
* lib_python_rfc3986_validator = 0.1.1
* lib_python_rich      = 13.7.0
* lib_python_rpds_py   = 0.15.2
* lib_python_ruamel.yaml = 0.17.40
* lib_python_ruamel.yaml.clib = 0.2.8
* lib_python_scour     = 0.38.2
* lib_python_seaborn   = 0.12.2
* lib_python_setproctitle = 1.3.3
* lib_python_shellingham = 1.5.0.post1
* lib_python_six       = 1.16.0
* lib_python_sniffio   = 1.3.0
* lib_python_soupsieve = 2.5
* lib_python_speedtest_cli = 2.1.3
* lib_python_sshuttle  = 1.1.1
* lib_python_stack_data = 0.6.3
* lib_python_svg2tikz  = 3.0.0
* lib_python_sympy     = 1.12
* lib_python_terminado = 0.18.0
* lib_python_testpath  = 0.6.0
* lib_python_tinycss2  = 1.2.1
* lib_python_tomli     = 2.0.1
* lib_python_tomlkit   = 0.12.3
* lib_python_tornado   = 6.3.2
* lib_python_tqdm      = 4.66.1
* lib_python_traitlets = 5.14.1
* lib_python_trove_classifiers = 2024.1.9
* lib_python_typing_extensions = 4.9.0
* lib_python_uc_micro_py = 1.0.2
* lib_python_uri_template = 1.3.0
* lib_python_urllib3   = 1.26.18
* lib_python_validate  = 5.0.8
* lib_python_validate_pyproject = 0.13.post1.dev0+gb752273.d20230520
* lib_python_virtualenv = 20.25.0
* lib_python_wcwidth   = 0.2.12
* lib_python_webcolors = 1.13
* lib_python_webencodings = 0.5.1
* lib_python_websocket_client = 1.7.0
* lib_python_wrapt     = 1.14.1
* lib_python_xarray    = 2023.1.0
* lib_python_xpra      = 6.0
* lib_python_yacl      = 0.5.0
* lib_python_youtube_dl = 2021.12.17
* lib_python_yt_dlp    = 2023.12.30
* lib_python_zeroconf  = 0.63.0
* lib_python_zipp      = 3.17.0
* lib_python_zstandard = 0.22.0
* lib_vpx              = 1.13.1
* lib_x11              = 1.8.7
* lib_x264             = 0.164.3108
* lib_xcomposite       = 0.4.6
* lib_xdamage          = 1.1.6
* lib_xext             = 1.3.5
* lib_xfixes           = 6.0.1
* lib_xkbfile          = 1.1.2
* lib_xrandr           = 1.5.4
* lib_xtst             = 1.2.4

@SimonMaenaut SimonMaenaut added the bug Something isn't working label Jan 12, 2024
totaam added a commit that referenced this issue Jan 13, 2024
@totaam
Copy link
Collaborator

totaam commented Jan 13, 2024

Thanks for the report, the fix above should work (untested).

This was caused by #3623

@totaam totaam closed this as completed Jan 13, 2024
@totaam totaam added the network label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working network
Projects
None yet
Development

No branches or pull requests

2 participants