Doom not working in daemon mode when (magit +forge)

What happened?

When starting doom emacs with /usr/bin/emacs --daemon then starting an emacsclient, emacs opens up but hangs with the first command like find-file. pkill -SIGUSR2 emacs sometimes makes it run again, then I can see (error forge-topic-mark-read is already defined as something else than a generic function) in the Minibuffer.

When I do not set (magit +forge) in Doom’s init.el but only (magit), it works.

There is not forge-topic-mark-read anywhere in my config.el. (Or any other setting regarding forge)

What did you expect to happen?

Emacs does not hang.

Steps to reproduce

  1. Set (magit +forge) in init.el
  2. Run emacs with /usr/bin/emacs --daemon and open a frame with emacsclient
  3. run a command, like M-x or SPC .

System information


Loading data dump...

Can you reproduce this on the latest commit of Doom? You’re on week old commit of Doom (fix: indexing packages' Info documents (part 2) · doomemacs/doomemacs@7531c42 · GitHub) that predates a number of critical bugfixes.

I just ran doom upgrade and it still happens.

M-x doom/info after upgrade:

generated  Nov 12, 2024 07:52:20
system     "Gentoo Linux" Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 pgtk
emacs      29.4 EMACSDIR=~/.config/emacs.doom/ EMACS=/usr/bin/emacs
doom       3.0.0-pre PROFILE=_default@0 HEAD -> master fdcab58a1 2024-11-08 01:18:48
           -0500 ~/.config/doom/
shell      /bin/zsh
features   ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ IMAGEMAGICK JPEG JSON
           LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG
           SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM
           GTK3 ZLIB
traits     gui server-running chemacs-2.0 envvar-file custom-file
custom     warning-suppress-log-types org-todo-keywords
           mml-secure-openpgp-sign-with-sender magit-todos-insert-after
           custom-safe-themes connection-local-profile-alist
           connection-local-criteria-alist
modules    :config use-package :completion (corfu +icons +orderless) (vertico +icons)
           :ui doom doom-dashboard doom-quit hl-todo indent-guides ligatures modeline
           nav-flash ophints (popup +defaults) unicode (vc-gutter +pretty +diff-hl)
           vi-tilde-fringe window-select :editor (evil +everywhere) file-templates
           fold format multiple-cursors (parinfer +rust) rotate-text snippets
           word-wrap :emacs dired electric ibuffer (undo +tree) vc :term eshell vterm
           :checkers syntax (spell +hunspell +flyspell +everywhere) grammar :tools
           (debugger +lsp) docker editorconfig (eval +overlay) lookup (lsp +peek)
           (magit +forge) pdf :lang (cc +lsp) data emacs-lisp json (javascript +lsp)
           markdown (org +roam2 +dragndrop) (rust +lsp) (sh +lsp) yaml :email (mu4e
           +org) :app calendar everywhere irc :config literate (default +bindings
           +smartparens)
packages   (gcmh) (nyan-mode) (poke-line) (emacsql-sqlite3) (focus) (impatient-mode)
           (imenu-list) (dirvish) (visual-regexp) (re-builder) (emacs-htmlize :recipe
           (:host github :repo hniksic/emacs-htmlize)) (spacious-padding)
           (buffer-name-relative) (replace+) (boxes) (minions) (rainbow-mode)
           (kurecolor) (nerd-icons-ibuffer) (citre :recipe (:host github :repo
           universal-ctags/citre)) (info-colors :pin
           2e237c301ba62f0e0286a27c1abe48c4c8441143) (buffer-focus-hook :recipe (:host
           github :repo mschuldt/buffer-focus-hook)) (drag-stuff) (aggressive-indent)
           (bitbake) (dsvn) (evil-textobj-tree-sitter) (harpoon) (copilot :recipe
           (:host github :repo copilot-emacs/copilot.el :files (*.el))) (treesit-auto)
           (ggtags) (evil-escape :disable t) (evil-paste-indent :recipe (:host github
           :repo Schievel1/evil-paste-indent)) (olivetti) (auto-olivetti :recipe
           (:host sourcehut :repo ashton314/auto-olivetti)) (copilot-chat :recipe
           (:host github :repo chep/copilot-chat.el :files (*.el))) (org-super-agenda)
           (org2blog) (org-modern) (svg-tag-mode) (org-roam-ui) (el-easydraw :recipe
           (:host github :repo misohena/el-easydraw)) (vulpea) (org-caldav)
           (calfw-ical) (org-side-tree :recipe (:host github :repo
           localauthor/org-side-tree)) (org-confluence :recipe (:host github :repo
           hgschmie/org-confluence)) (org-auto-tangle) (ob-mermaid) (consult-org-roam)
           (org-appear :recipe (:host github :repo awth13/org-appear)) (org-download)
           (smtpmail) (ement) (elcord) (markdown-xwidget :recipe (:host github :repo
           cfclrk/markdown-xwidget :files (:defaults resources))) (fireplace)
           (selectric-mode) (spray) (transient :pin
           3430943eaa3222cd2a487d4c102ec51e10e7e3c9 :recipe (:host github :repo
           magit/transient))
unpin      dirvish org-roam

@Schievel1 any luck with this? I’m getting the same error after updating to the latest doom emacs commit on MacOS using Emacs 29

Sadly not, no. I went back to using emacs without daemon for the time being.