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

Albert tries to update virtualenv on every restart, which can hang with certain network settings #1492

Closed
Wizzerinus opened this issue Dec 5, 2024 · 2 comments
Assignees

Comments

@Wizzerinus
Copy link

Wizzerinus commented Dec 5, 2024

Source

AUR

App logs

11:11:11 [debg:albert]        Albert version: 0.26.9
11:11:11 [debg:albert]            Build date: Dec  4 2024 13:38:37
11:11:11 [debg:albert]            Qt version: 6.8.1
11:11:11 [debg:albert]             Build ABI: x86_64-little_endian-lp64
11:11:11 [debg:albert]    Build architecture: x86_64
11:11:11 [debg:albert]      CPU architecture: x86_64
11:11:11 [debg:albert]           Kernel type: linux
11:11:11 [debg:albert]        Kernel version: 6.11.5-arch1-1.1-g14
11:11:11 [debg:albert]                    OS: Arch Linux
11:11:11 [debg:albert]               OS type: arch
11:11:11 [debg:albert]            OS version: unknown
11:11:11 [debg:albert]         Platform name: wayland
11:11:11 [debg:albert]            Style name: fusion
11:11:11 [debg:albert]      Available styles: Windows, Fusion
11:11:11 [debg:albert]            Icon theme: hicolor
11:11:11 [debg:albert]                  Font: Sans Serif,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
11:11:11 [debg:albert]              Language: C
11:11:11 [debg:albert]                Locale: C
11:11:11 [debg:albert]       Binary location: /usr/bin/albert
11:11:11 [debg:albert]           Working dir: /home/wizzerinus
11:11:11 [debg:albert]             Arguments: albert
11:11:11 [debg:albert] ENVIRONMENT:
11:11:11 [debg:albert]             COLORTERM: truecolor
11:11:11 [debg:albert] DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
11:11:11 [debg:albert]       DEBUGINFOD_URLS: https://debuginfod.archlinux.org 
11:11:11 [debg:albert]       DESKTOP_SESSION: hyprland
11:11:11 [debg:albert]               DISPLAY: :1
11:11:11 [debg:albert]                EDITOR: helix
11:11:11 [debg:albert]            GREP_COLOR: 37;45
11:11:11 [debg:albert]           GREP_COLORS: mt=37;45
11:11:11 [debg:albert] HL_INITIAL_WORKSPACE_TOKEN: 60344a6c-b818-4aba-a861-0e443558b8b9
11:11:11 [debg:albert]                  HOME: /home/wizzerinus
11:11:11 [debg:albert]       HYPRCURSOR_SIZE: 16
11:11:11 [debg:albert]          HYPRLAND_CMD: Hyprland
11:11:11 [debg:albert] HYPRLAND_INSTANCE_SIGNATURE: 12f9a0d0b93f691d4d9923716557154d74777b0a_1733385759_2084489770
11:11:11 [debg:albert] KITTY_INSTALLATION_DIR: /usr/lib/kitty
11:11:11 [debg:albert]             KITTY_PID: 2089
11:11:11 [debg:albert]      KITTY_PUBLIC_KEY: 1:HTc}l?$CXGb3or>ImAK;dmqYo<;e$t-`=-R!+aSz
11:11:11 [debg:albert]       KITTY_WINDOW_ID: 1
11:11:11 [debg:albert]                  LANG: C.UTF-8
11:11:11 [debg:albert]                LC_ALL: C.UTF-8
11:11:11 [debg:albert]                  LESS: --ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS
11:11:11 [debg:albert]       LESS_TERMCAP_mb: 
11:11:11 [debg:albert]       LESS_TERMCAP_md: 
11:11:11 [debg:albert]       LESS_TERMCAP_me: 
11:11:11 [debg:albert]       LESS_TERMCAP_ue: 
11:11:11 [debg:albert]       LESS_TERMCAP_us: 
11:11:11 [debg:albert]               LOGNAME: wizzerinus
11:11:11 [debg:albert]             LS_COLORS: di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43
11:11:11 [debg:albert]                  MAIL: /var/spool/mail/wizzerinus
11:11:11 [debg:albert]            MOTD_SHOWN: pam
11:11:11 [debg:albert]    MOZ_ENABLE_WAYLAND: 1
11:11:11 [debg:albert]                OLDPWD: /home/wizzerinus
11:11:11 [debg:albert]                 PAGER: less
11:11:11 [debg:albert]                  PATH: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
11:11:11 [debg:albert]                   PWD: /home/wizzerinus
11:11:11 [debg:albert]      QT_LOGGING_RULES: albert*=true
11:11:11 [debg:albert]                 SHELL: /bin/zsh
11:11:11 [debg:albert]                 SHLVL: 1
11:11:11 [debg:albert]                  TERM: xterm-kitty
11:11:11 [debg:albert]              TERMINFO: /usr/lib/kitty/terminfo
11:11:11 [debg:albert]                  USER: wizzerinus
11:11:11 [debg:albert]       WAYLAND_DISPLAY: wayland-1
11:11:11 [debg:albert]          XCURSOR_SIZE: 16
11:11:11 [debg:albert]           XDG_BACKEND: wayland
11:11:11 [debg:albert]   XDG_CURRENT_DESKTOP: Hyprland
11:11:11 [debg:albert]       XDG_RUNTIME_DIR: /run/user/1000
11:11:11 [debg:albert]              XDG_SEAT: seat0
11:11:11 [debg:albert]         XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
11:11:11 [debg:albert]     XDG_SESSION_CLASS: user
11:11:11 [debg:albert]   XDG_SESSION_DESKTOP: Hyprland
11:11:11 [debg:albert]        XDG_SESSION_ID: 2
11:11:11 [debg:albert]      XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session1
11:11:11 [debg:albert]      XDG_SESSION_TYPE: wayland
11:11:11 [debg:albert]              XDG_VTNR: 1
11:11:11 [debg:albert]                     _: /usr/bin/albert
11:11:11 [debg:albert] _JAVA_AWT_WM_NONREPARENTING: 1
11:11:11 [debg:albert] Loading translations
11:11:11 [debg:albert] Checking for a running instance…
11:11:11 [debg:albert] Creating local server /home/wizzerinus/.cache/albert/ipc_socket
11:11:11 [info:albert] Searching native plugins in /usr/lib/albert
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/applications.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/caffeine.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/calculator_qalculate.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/chromium.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/clipboard.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/datetime.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/docs.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/files.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/hash.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/mpris.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/path.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/python.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/snippets.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/ssh.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/system.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/timer.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/timezones.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/urlhandler.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/websearch.so
11:11:11 [debg:albert] Found valid native plugin /usr/lib/albert/widgetsboxmodel.so
11:11:11 [debg:albert] Connecting to database…
11:11:11 [debg:albert] Initializing database…
11:11:11 [debg:albert] Updating usage scores…
11:11:11 [debg:albert] Try loading the configured frontend 'widgetsboxmodel'.
11:11:11 [info:albert] Hotkeys are not supported on this platform.
11:11:11 [debg:albert] 0 ms spent loading plugin 'websearch'
11:11:11 [debg:albert] 0 ms spent instanciating plugin 'websearch'
11:11:11 [debg:albert] 0 ms spent loading plugin 'urlhandler'
11:11:11 [debg:albert] 0 ms spent instanciating plugin 'urlhandler'
11:11:11 [debg:albert] 0 ms spent loading plugin 'hash'
11:11:11 [debg:albert] 0 ms spent instanciating plugin 'hash'
11:11:11 [debg:albert] 1 ms spent loading plugin 'docs'
11:11:11 [debg:albert.docs] Downloading docset list from 'https://api.zealdocs.org/v1/docsets'
11:11:11 [debg:albert] 27 ms spent instanciating plugin 'docs'
11:11:11 [debg:albert] 0 ms spent loading plugin 'datetime'
11:11:11 [debg:albert] 0 ms spent instanciating plugin 'datetime'
11:11:11 [debg:albert] 3 ms spent loading plugin 'calculator_qalculate'
11:11:11 [debg:albert] 33 ms spent instanciating plugin 'calculator_qalculate'
11:11:12 [debg:albert.docs] Docset list updated.
11:11:12 [info:albert.docs] Indexing docset /home/wizzerinus/.local/share/albert/docs/docsets/C++.docset/Contents/Resources/Tokens.xml
11:11:12 [debg:albert] 110 ms spent loading plugin 'applications'
11:11:12 [debg:albert] 0 ms spent instanciating plugin 'applications'
11:11:12 [debg:albert.apps] Scanning desktop entries in: /home/wizzerinus/.local/share/applications
11:11:12 [debg:albert.apps] Scanning desktop entries in: /usr/local/share/applications
11:11:12 [debg:albert.apps] Scanning desktop entries in: /usr/share/applications
11:11:12 [debg:albert.apps] Valid desktop file 'albert': '/usr/share/applications/albert.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'auto-cpufreq-gtk': '/usr/share/applications/auto-cpufreq-gtk.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'avahi-discover': '/usr/share/applications/avahi-discover.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'bssh': '/usr/share/applications/bssh.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'bvnc': '/usr/share/applications/bvnc.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'cmake-gui': '/usr/share/applications/cmake-gui.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'com.cloudflare.WarpTaskbar': '/usr/share/applications/com.cloudflare.WarpTaskbar.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'discord': '/usr/share/applications/discord.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'electron33': '/usr/share/applications/electron33.desktop'
11:11:12 [debg:albert] 2 ms spent loading plugin 'python'
11:11:12 [info:albert.python] Python version 3.12.7
11:11:12 [debg:albert.python] Initializing Python interpreter
11:11:12 [debg:albert.apps] Valid desktop file 'firefox': '/usr/share/applications/firefox.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'helix': '/usr/share/applications/helix.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'htop': '/usr/share/applications/htop.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'kitty': '/usr/share/applications/kitty.desktop'
11:11:12 [debg:albert.apps] Skipped desktop entry '/usr/share/applications/kitty-open.desktop': Desktop entry excluded by 'NoDisplay'.
11:11:12 [debg:albert.apps] Skipped desktop entry '/usr/share/applications/org.freedesktop.Xwayland.desktop': Desktop entry excluded by 'NoDisplay'.
11:11:12 [debg:albert.apps] Skipped desktop entry '/usr/share/applications/org.gnupg.pinentry-qt.desktop': Desktop entry excluded by 'NoDisplay'.
11:11:12 [debg:albert.apps] Skipped desktop entry '/usr/share/applications/org.gnupg.pinentry-qt5.desktop': Desktop entry excluded by 'NoDisplay'.
11:11:12 [debg:albert.apps] Valid desktop file 'org.pwmt.zathura': '/usr/share/applications/org.pwmt.zathura.desktop'
11:11:12 [debg:albert.apps] Skipped desktop entry '/usr/share/applications/org.pwmt.zathura-pdf-poppler.desktop': Desktop entry excluded by 'NoDisplay'.
11:11:12 [debg:albert.apps] Valid desktop file 'org.telegram.desktop': '/usr/share/applications/org.telegram.desktop.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'qv4l2': '/usr/share/applications/qv4l2.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'qvidcap': '/usr/share/applications/qvidcap.desktop'
11:11:12 [debg:albert.apps] Valid desktop file 'rog-control-center': '/usr/share/applications/rog-control-center.desktop'
11:11:12 [debg:albert.python] Successfully initialized python interpreter
11:11:12 [debg:albert.python] Initializing venv using system interpreter: /usr/bin/python3 -m venv --upgrade --upgrade-deps /home/wizzerinus/.local/share/albert/python/venv
11:11:20 [warn:albert.python] WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x73b4c6755040>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x73b4c6fe0530>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x73b4c66fc9b0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x73b4c66fcbc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x73b4c66fcdd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/

11:11:20 [debg:albert.python] version          : 3.12.7 (main, Oct  1 2024, 11:15:50) [GCC 14.2.1 20240910]
11:11:20 [debg:albert.python] executable       : /home/wizzerinus/.local/share/albert/python/venv/bin/python3
11:11:20 [debg:albert.python] base_exec_prefix : /usr
11:11:20 [debg:albert.python] exec_prefix      : /usr
11:11:20 [debg:albert.python] base_prefix      : /usr
11:11:20 [debg:albert.python] prefix           : /usr
11:11:20 [debg:albert.python] path:            : /usr/lib/python312.zip
11:11:20 [debg:albert.python] path:            : /usr/lib/python3.12
11:11:20 [debg:albert.python] path:            : /usr/lib/python3.12/lib-dynload
11:11:20 [debg:albert.python] path:            : /home/wizzerinus/.local/share/albert/python/venv/lib/python3.12/site-packages
11:11:20 [debg:albert.python] Searching Python plugins in /home/wizzerinus/.local/share/albert/python/plugins
11:11:20 [debg:albert.python] Invalid plugin (Path is not a python file): /home/wizzerinus/.local/share/albert/python/plugins/albert.pyi
11:11:20 [debg:albert.python] Searching Python plugins in /usr/share/albert/python/plugins
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/arch_wiki
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/aur
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/bitwarden
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/coingecko
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/color
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/copyq
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/dice_roll
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/docker
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/duckduckgo
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/emoji
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/goldendict
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/jetbrains_projects
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/kill
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/locate
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/pacman
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/pass
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/pomodoro
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/python_eval
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/syncthing
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/tex_to_unicode
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/translators
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/unit_converter
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/virtualbox
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/vpn
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/wikipedia
11:11:20 [debg:albert.python] Found valid Python plugin /usr/share/albert/python/plugins/zeal
11:11:20 [info:albert.python] [20 ms] Python plugin scan
11:11:20 [debg:albert] 8652 ms spent instanciating plugin 'python'
11:11:20 [info:albert.apps] Indexed 18 applications [4 ms]
11:11:20 [debg:albert] 16 ms spent loading plugin 'python.jetbrains_projects'
11:11:20 [debg:albert] 0 ms spent instanciating plugin 'python.jetbrains_projects'
11:11:38 [info:albert] Received signal 2. Quit.
11:11:38 [debg:albert] 2 ms spent unloading plugin 'python.jetbrains_projects'
11:11:38 [debg:albert] 2 ms spent unloading plugin 'python'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'applications'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'calculator_qalculate'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'datetime'
11:11:38 [debg:albert] 1 ms spent unloading plugin 'docs'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'hash'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'urlhandler'
11:11:38 [debg:albert] 0 ms spent unloading plugin 'websearch'
11:11:38 [debg:albert] Closing local RPC server.
11:11:38 [info:albert] Bye.

Current Behavior

When the machine is not connected to the internet, Albert emits warnings in the log as it apparently tries to update Python dependencies. The worse case is when the machine is 'connected' but the network does not function (example: using a public Wi-Fi with an authorization UI). In my case this causes both Albert and the network connection to hang. Either way, I don't think this feature really needs internet access...

Expected Behavior

Albert doesn't try to update virtualenv on every restart?

Anything else?

No response

@ManuelSchneid3r
Copy link
Member

Either way, I don't think this feature really needs internet access...

unfortunately pip does require internet access. i think introducing the usage of pip has not been the best decision and will probably be dropped in a future release. however we are left with the need for proper package management then, which is complex, because the app is not selfcontained but open in nature. the most straight forward (from developer perspective) is probably to put each plugin in a package with separate dependencies. however users are not going to get a nice list of plugins to just tick and use. also some systems will not support some plugins because they require this and that version of whatever package which may not even be available. afaik theres no perfect solution here.

however this is not really a bug or such. this is just how it works atm.

@Wizzerinus
Copy link
Author

I think the actual bug here is that the virtualenv updates whenever, rather than when the list of packages changes. Which for me seems like the main use case for pip

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

No branches or pull requests

2 participants