Skip to content

Espanso won't start on Debian 12 #2193

Closed

Description

@adiabatic

Description

Fresh off #1793…

espanso --version and espanso register work fine, but espanso start, espanso restart, and espanso start --unmanaged don't work.

Steps to reproduce

See #1793 (comment) for my previous steps. In short: Debian 12, Wayland, installing from source.

I tried moving espanso from target/release/ to ~/.local/bin/, but running setcap on it didn't seem to make it work (I got the same error messages as I get now). I then tried moving the binary and re-setting everything up, but doing so didn't seem to help:

~/.local/bin > sudo mv espanso /usr/local/bin/espanso
[sudo] password for comatoast: 
~/.local/bin > cd
~ > which espanso
/usr/local/bin/espanso
~ > sudo setcap "cap_dac_override+p" $(which espanso)
~ > espanso --version
espanso 2.2.2
~ > espanso service register
service file already exists, this operation will overwrite it
creating service file in "/home/comatoast/.config/systemd/user/espanso.service"
enabling systemd service
service registered correctly!
~ > espanso start
unable to start service: timed out
Hint: sometimes this happens because another Espanso process is left running for some reason.
      Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
(5) ~ > espanso restart
unable to start service: timed out
Hint: sometimes this happens because another Espanso process is left running for some reason.
      Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
(5) ~ > ps -ax | grep espanso
   4057 pts/0    S+     0:00 grep --color=auto espanso
~ > espanso start --unmanaged
unable to start service: timed out
Hint: sometimes this happens because another Espanso process is left running for some reason.
      Please try running 'espanso restart' or manually killing all Espanso processes, then try again.

Expected behavior

I expected it to not show a service-timed-out message.

Screenshots

[probably not applicable]

Logs

13:55:05 [service(39782)] [INFO] creating config directory in "/home/comatoast/.config/espanso"
13:55:05 [service(39782)] [INFO] creating runtime directory in "/home/comatoast/.cache/espanso"
13:55:05 [service(39782)] [INFO] creating packages directory in "/home/comatoast/.config/espanso/match/packages"
13:55:05 [service(39782)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
13:55:05 [service(39782)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
13:55:05 [service(39782)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
13:55:05 [service(39782)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
13:55:05 [service(39782)] [INFO] creating service file in "/home/comatoast/.config/systemd/user/espanso.service"
13:55:05 [service(39782)] [INFO] enabling systemd service
13:55:06 [service(39782)] [INFO] service registered correctly!
13:55:18 [service(39816)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
13:55:18 [service(39816)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
13:55:18 [service(39816)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
13:55:18 [service(39816)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
13:55:23 [service(39816)] [ERROR] unable to start service: timed out
13:55:23 [service(39816)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
13:55:23 [service(39816)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
13:55:29 [service(39922)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
13:55:29 [service(39922)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
13:55:29 [service(39922)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
13:55:29 [service(39922)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
13:55:36 [service(39922)] [ERROR] unable to start service: timed out
13:55:36 [service(39922)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
13:55:36 [service(39922)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
13:56:34 [service(40365)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
13:56:34 [service(40365)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
13:56:34 [service(40365)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
13:56:34 [service(40365)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
13:56:34 [service(40365)] [ERROR] unable to start service (unmanaged): launcher spawn failure
13:56:39 [service(40365)] [ERROR] unable to start service: timed out
13:56:39 [service(40365)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
13:56:39 [service(40365)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
13:59:40 [service(2159)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
13:59:40 [service(2159)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
13:59:40 [service(2159)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
13:59:40 [service(2159)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
13:59:40 [service(2159)] [ERROR] unable to start service (unmanaged): launcher spawn failure
13:59:45 [service(2159)] [ERROR] unable to start service: timed out
13:59:45 [service(2159)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
13:59:45 [service(2159)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
14:01:39 [service(3402)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
14:01:39 [service(3402)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
14:01:39 [service(3402)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
14:01:39 [service(3402)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
14:01:39 [service(3402)] [WARN] service file already exists, this operation will overwrite it
14:01:39 [service(3402)] [INFO] creating service file in "/home/comatoast/.config/systemd/user/espanso.service"
14:01:39 [service(3402)] [INFO] enabling systemd service
14:01:39 [service(3402)] [INFO] service registered correctly!
14:01:47 [service(3467)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
14:01:47 [service(3467)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
14:01:47 [service(3467)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
14:01:47 [service(3467)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
14:01:53 [service(3467)] [ERROR] unable to start service: timed out
14:01:53 [service(3467)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
14:01:53 [service(3467)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
14:02:51 [service(3946)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
14:02:51 [service(3946)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
14:02:51 [service(3946)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
14:02:51 [service(3946)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
14:02:58 [service(3946)] [ERROR] unable to start service: timed out
14:02:58 [service(3946)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
14:02:58 [service(3946)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
14:08:01 [service(6105)] [INFO] reading configs from: "/home/comatoast/.config/espanso"
14:08:01 [service(6105)] [INFO] reading packages from: "/home/comatoast/.config/espanso/match/packages"
14:08:01 [service(6105)] [INFO] using runtime dir: "/home/comatoast/.cache/espanso"
14:08:01 [service(6105)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-28-amd64
14:08:01 [service(6105)] [ERROR] unable to start service (unmanaged): launcher spawn failure
14:08:06 [service(6105)] [ERROR] unable to start service: timed out
14:08:06 [service(6105)] [ERROR] Hint: sometimes this happens because another Espanso process is left running for some reason.
14:08:06 [service(6105)] [ERROR]       Please try running 'espanso restart' or manually killing all Espanso processes, then try again.

Your environment

  • Public source code: dev branch (commit 61aed0d)
  • Environment name and version (e.g., Rust 1.59.0): rustc 1.83.0 (90b35a623 2024-11-26) (Homebrew)
  • Operating system and version (e.g., Ubuntu 20.04.2 LTS): Debian 12 Stable
  • Espanso version (e.g., 2.1.4-beta): 2.2.2

Self-service

  • I'd be willing to fix this bug myself.

Activity

  1. added
    bug
    needs-triage
    on Jan 5, 2025
  2. adiabatic commented on Jan 5, 2025

    @adiabatic
    Author

    Odd. After spending maybe 10+ minutes on a totally different computer, this popped up:
    Screenshot from 2025-01-05 14-38-33

    Expanding the drop-down shows this:

    Screenshot from 2025-01-05 14-39-46

  3. adiabatic commented on Jan 5, 2025

    @adiabatic
    Author

    After clicking OK on the error window, I clicked Start and then the window closed.

    espanso log doesn't have any new entries in it.

  4. adiabatic commented on Jan 5, 2025

    @adiabatic
    Author

    The espanso window pops up again a few minutes after rebooting.

  5. adiabatic commented on Jan 5, 2025

    @adiabatic
    Author

    Several minutes (10+) after closing that window, it pops up again, this time with a different file:

    Screenshot from 2025-01-05 15-06-45

    Again, no new entries in espanso log.

  6. AucaCoyan commented on Jan 6, 2025

    @AucaCoyan
    Collaborator

    Thank you for creating an issue! that 1793 is overextended in length.
    Let me try if I can reproduce the problem and I'll be back 💯

  7. added
    Linux
    wayland
    on Jan 6, 2025
  8. smeech commented on Jan 6, 2025

    @smeech
    Collaborator

    Possible duplicate of #1484

    Duplicated here.

    espanso start produces the same errors. It sets up ~/.cache/espanso and its contents and ~/.config/espanso/match/packages but empty. Similar errors from the "Welcome to Espanso" popup:
    image

    espanso -vvvvv worker gives:

    16:54:01 [worker(27786)] [DEBUG] (1) espanso_path: detected config directory in $HOME/.config/espanso
    16:54:01 [worker(27786)] [DEBUG] (1) espanso_path: detected default runtime dir: "/home/osboxes/.cache/espanso"
    16:54:01 [worker(27786)] [DEBUG] (1) espanso_path: detected default packages dir: "/home/osboxes/.config/espanso/match/packages"
    16:54:01 [worker(27786)] [INFO] reading configs from: "/home/osboxes/.config/espanso"
    16:54:01 [worker(27786)] [INFO] reading packages from: "/home/osboxes/.config/espanso/match/packages"
    16:54:01 [worker(27786)] [INFO] using runtime dir: "/home/osboxes/.cache/espanso"
    16:54:01 [worker(27786)] [INFO] system info: Debian GNU/Linux v12 - kernel: 6.1.0-22-amd64
    16:54:01 [worker(27786)] [ERROR] thread 'main' panicked at 'unable to load config: unable to load config
    
    Caused by:
        missing config directory': espanso/src/main.rs:585
    

    until I create the rest of the ~/.config/espanso/ directory structure, then produces a lot more with no serious errors, but expansions still don't work.

    Setting the keyboard_layout: in ~/.config/espanso/config/default.yml and running espanso worker seems to result in Espanso expansions working, but it still won't espanso start, and doesn't restart on changing config.

  9. removed
    needs-triage
    on Jan 7, 2025
  10. dmitrii-ruslanovich commented on Jan 7, 2025

    @dmitrii-ruslanovich

    Facing the same issue on the same Debian GNU/Linux 12 (bookworm) & Wayland. Installation finishes using both methods (the .deb package approach & the build from sources) and both give the same result: I am able to view the commands and register the service but as soon as I try to start the application, I get

    unable to start service: timed out
    Hint: sometimes this happens because another Espanso process is left running for some reason.
          Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
    

    I've tried different versions of the Rust compiler (cargo) and it didn't lead to anything either. Adding new entries to the .config/espanso/config/default.yml didn't do anything too.


    UPD:
    running the app through espanso worker definitely works, I am able to access my matches. Thank you @smeech for the input. However, as soon as I shut down the worker, the app exits as expected. The question needs a more robust solution.

  11. AucaCoyan commented on Jan 7, 2025

    @AucaCoyan
    Collaborator

    Indeed. Multiple users reported this issue, so I will prioritize it accordingly.
    My god, I only have 2 hands 😂

    Give me a couple of days and I'll see what I can find

  12. added
    high priority
    on Jan 7, 2025
  13. 22 remaining items

  14. moved this from In progress to Done in Espanso roadmapon Mar 3, 2025
  15. smeech commented on Mar 3, 2025

    @smeech
    Collaborator

    I tried this PR on my chromebook.

    #235 related, but it's not the Issue I was looking for,
    I agree - needs a new Issue.

  16. fuguesoft commented on Mar 4, 2025

    @fuguesoft

    Is this still bugged on Debian?
    I can test later today

  17. AucaCoyan commented on Mar 4, 2025

    @AucaCoyan
    Collaborator

    No, it's fixed 💪. Report any issue please

  18. fuguesoft commented on Mar 5, 2025

    @fuguesoft

    This is indeed starting on Debian!
    Thank you for your hard work!

  19. pauby commented on Mar 11, 2025

    @pauby

    I hate to update a closed issue, but I wanted to confirm this is now working on Fedora 41.

  20. AucaCoyan commented on Mar 11, 2025

    @AucaCoyan
    Collaborator

    If it is for news (either good or bad), I welcome notifications!
    Thanks Pauby 😊

  21. elisspace commented on Mar 13, 2025

    @elisspace

    hopefully this is just user error, but I compiled from source yesterday on Debian 12 and I'm still getting this error:

    ➜  ~ espanso service start --unmanaged
    unable to start service: timed out
    Hint: sometimes this happens because another Espanso process is left running for some reason.
          Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
    ➜  ~ espanso service start            
    unable to start service: timed out
    Hint: sometimes this happens because another Espanso process is left running for some reason.
          Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
    

    It compiled okay, and I could register it, but nothing after that following the build instructions from here

    Open to suggestions! I did try to install several times over the last few weeks, but the libwx_gtk3u prevented it. Maybe I had some kind of leftover crud that's causing an issue? Is there a recommended way to wipe away all the remnants and start fresh?

  22. fuguesoft commented on Mar 14, 2025

    @fuguesoft

    @elisspace

    This is the issue I was having on Debian 12. Have you tried compiling the most recent version? That's what did it for me. Also for those errant processes, I opened up btop and did a filter for 'espans' and could see some processes stopping and starting.

    I just spammed sudo pkill espanso in another window until I didn't see it anymore.
    You might need to kill all those processes before attempting a reinstall

  23. elisspace commented on Mar 18, 2025

    @elisspace

    Okay, thank you @fuguesoft !

    I completely removed the current installation (including git repo, binary in /usr/local/bin/espanso, and systemd unit file in ~/.confg/systemd/user) then redownloaded the repo, re-ran cargo make and followed the rest of the instructions on the website.

    Image

    I'm still getting the same error. I opened btop and searched for espanso and I did notice that "espanso launcher" is running ever minute or two. Maybe this is the clashing app? It only pops up for a few seconds though, so I'm not sure how to kill it quickly enough. I tried completely unregistering the service and starting it --unmanaged but still get the same error.

    One other thing involved here that may be related: I'm doing all of this in a Debian 12 VM. I previously had zero issues running espanso with Debian 11, but maybe the VM part of the equation is contributing here?

    ➜  espanso start
    unable to start service: timed out
    Hint: sometimes this happens because another Espanso process is left running for some reason.
          Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
    ➜  systemctl --user status espanso
    ● espanso.service - espanso
         Loaded: loaded (/home/brent/.config/systemd/user/espanso.service; enabled; preset: enabled)
         Active: activating (auto-restart) (Result: exit-code) since Tue 2025-03-18 11:19:55 EDT; 51ms ago
        Process: 427857 ExecStart=/usr/local/bin/espanso launcher (code=exited, status=101)
       Main PID: 427857 (code=exited, status=101)
            CPU: 64ms
    ➜  espanso service unregister
    disabling espanso systemd service
    Removed "/home/brent/.config/systemd/user/default.target.wants/espanso.service".
    deleting espanso systemd entry
    service unregistered correctly!
    ➜  espanso service start --unmanaged
    unable to start service: timed out
    Hint: sometimes this happens because another Espanso process is left running for some reason.
          Please try running 'espanso restart' or manually killing all Espanso processes, then try again.
    
    
  24. fuguesoft commented on Mar 18, 2025

    @fuguesoft

    @elisspace

    So yeah the way I was killing that process was kinda hacky
    Basically btop in one window and another fresh shell in the other

    In my fresh shell, I typed in:

    sudo pkill espanso

    and then it was one finger on the up arrow and another on Enter.
    I just sat there rapid firing off the command for probably 2 full minutes like a goof.

    You however, seem smarter than that. You could probably do something like:

    watch -n 2 "sudo pkill espanso"`

    and let that cook for a few minutes. Kill it with Ctrl +C
    Then check back to see if espanso is still popping up, trying to start itself

    For the reinstall, I vaguely remember specifying the version I wanted to be the latest but I could be wrong about that

  25. elisspace commented on Mar 20, 2025

    @elisspace

    Alas, no luck, but I continue to very much appreciate the suggestions. I kept watch running for a good while (few hours) and then tried a few different options to start espanso again but I kept getting the same "timed out" error, mentioning another process running. I'll keep experimenting! I think the next thing to try will be creating a fresh VM and see if I can get it to work there. Maybe there's still some lingering crud on this one from the previous botched installs.

  26. fuguesoft commented on Mar 23, 2025

    @fuguesoft

    @elisspace
    Oh after killing all the espanso processes did you:

    1. Delete the binary
    2. git pull the latest version of the repo
    3. Recomplie
    4. Reinstall the binary?
  27. elisspace commented on Mar 28, 2025

    @elisspace

    Yes, I did all of that, but something is clearly lingering between my attempts at a fresh wipe -> install.

    I set up a fresh Debian 12 VM -- zero issues compiling and running Espanso following Wayland instructions. So whatever the issue is, it's relegated to one specific VM with some failed previous installs. I wonder what other places files may have been placed while trying to install previously?

    Anyway, at this point, it clearly is installing on Debian 12 so I hate to clutter this thread up further. Your help is very much appreciated Fugue!

  28. elisspace commented on Mar 31, 2025

    @elisspace

    Okay, posting for anyone else who runs into the issue: I switched to GNOME and espanso worked (manually compiled on Deb12). So the issue seems specific to XFCE, which I was using previously. I kind of hate GNOME, so I'll probably try some other WM and if I find one I like better that works I'll update this thread accordingly.

    Note that I compiled it for X11 (without the "Not X11" parameter) but actually I'm still using Wayland.

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

Metadata

Metadata

Assignees

Labels

Linuxbughigh prioritywayland

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions