bug#81666: 31.1; browse-url fails in emacsclient -nw

Abdulnafé Toulaïmat <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Hello,

‘browse-url’ gives an error "funcall-interactively: Frames are not in use or
not initialized", but only when called in an emacsclient TTY frame. It
works fine in GUI frames, for both emacs and emacsclient, as well as in
emacs TTY frames.

Steps to reproduce:

1) emacs --daemon -Q
2) emacsclient -nw
3) M-x browse-url RET
4) https://www.gnu.org/software/emacs/ RET

With ‘toggle-debug-on-error’, I get this trace:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Frames are not in use or not initialized")
  browse-url("https://www.gnu.org/software/emacs/" nil)
  funcall-interactively(browse-url "https://www.gnu.org/software/emacs/" nil)
  command-execute(browse-url record)
  #<subr execute-extended-command>(nil "browse-url" nil)
  apply(#<subr execute-extended-command> (nil "browse-url" nil))
  execute-extended-command(nil "browse-url" nil)
  funcall-interactively(execute-extended-command nil "browse-url" nil)
  command-execute(execute-extended-command)
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 31.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.52,
 cairo version 1.18.4) of 2026-08-19 built on plato
Repository revision: 1988e330c1c5ad6f161e66c348cd8e65cd95e9cd
Repository branch: makepkg
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-m17n-flt --without-gconf
 --with-native-compilation=yes --with-native-compilation=aot --with-pgtk
 --without-xaw3d --with-sound=no --with-xwidgets --with-tree-sitter
 --without-gpm 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
 -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
 -mno-omit-leaf-frame-pointer -flto=auto' 'LDFLAGS=-Wl,-O1
 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
 -Wl,-z,pack-relative-relocs -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tty-tip-mode: t
  completion-preview-mode: t
  goto-address-prog-mode: t
  whole-line-or-region-global-mode: t
  whole-line-or-region-local-mode: t
  beginend-global-mode: t
  beginend-prog-mode: t
  kitty-graphics-mode: t
  auto-read-only-mode: t
  auto-capitalize-global-mode: t
  auto-capitalize-mode: t
  highlight-doxygen-global-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  magit-todos-mode: t
  nerd-icons-grep-mode: t
  global-git-commit-mode: t
  server-mode: t
  nerd-icons-completion-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  marginalia-mode: t
  vertico-mouse-mode: t
  vertico-multiform-mode: t
  vertico-mode: t
  global-jinx-mode: t
  jinx-mode: t
  diredfl-global-mode: t
  pdf-occur-global-minor-mode: t
  eglot-inactive-regions-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  auto-insert-mode: t
  pulsar-global-mode: t
  pulsar-mode: t
  ef-themes-take-over-modus-themes-mode: t
  repeat-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  electric-pair-mode: t
  global-word-wrap-whitespace-mode: t
  word-wrap-whitespace-mode: t
  line-count-global-mode: t
  line-count-mode: t
  xterm-mouse-mode: t
  savehist-mode: t
  recentf-mode: t
  override-global-mode: t
  package-autosuggest-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-quote-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  auto-save-visited-mode: t

Load-path shadows:
/home/a-t/.config/emacs/elpa/ef-themes-2.2.1/theme-loaddefs hides /usr/share/emacs/31.1/lisp/theme-loaddefs

Features:
(shadow sort gnus-cite mail-extr gnus-topic utf-7 nndraft nnmh nnml
epa-file secrets dbus network-stream gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-cache gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig emacsbug help-fns vertico-sort tty-tip term/xterm
xterm disp-table completion-preview goto-addr man fortune show-font
wiki-summary whole-line-or-region move-text lorem-ipsum beginend
kitty-graphics auto-read-only auto-capitalize xr highlight-doxygen
page-break-lines gnus-async nntp gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec
gnus-int gnus-range message yank-media rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win sendmail
gnus nnheader gnus-util mail-utils range no-littering expand-region
text-mode-expansions html-mode-expansions er-basic-expansions
expand-region-core expand-region-custom magit-todos pcre2el rxt
re-builder f s dash async nerd-icons-grep grep forge-repos forge-tablist
forge-topics forge-commands forge-semi forge-bitbucket forge-gogs
forge-gitea forge-gitlab forge-github forge-client forge-forgejo
forge-notify forge-revnote forge-pullreq forge-issue forge-discussion
forge-topic yaml parse-time iso8601 time-date eieio-custom bug-reference
forge-post forge-repo forge forge-core ghub-graphql treepy gsexp ghub
url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm url-auth gnutls forge-db closql emacsql-sqlite
emacsql emacsql-compiler eieio-base magit-bookmark magit-submodule
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit epa epg rfc6068
epg-config magit-repos magit-apply magit-wip magit-log magit-diff
which-func smerge-mode git-commit log-edit pcvs-util add-log magit-core
magit-autorevert magit-margin magit-transient magit-process with-editor
shell magit-mode benchmark magit-git server magit-base magit-section
cursor-sensor transient crm llama vundo hydra byte-opt advice lv
zygospore ace-link avy nerd-icons-completion hl-todo cond-let nerd-icons
nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon
nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon
nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon
nerd-icons-data-powerline nerd-icons-data-octicon
nerd-icons-data-pomicon nerd-icons-data-ipsicon orderless marginalia
embark-consult consult embark ffap vertico-flat vertico-mouse
vertico-multiform vertico multiple-cursors mc-separate-operations
rectangular-region-mode mc-mark-pop mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu
mc-cycle-cursors multiple-cursors-core comp comp-cstr rect jinx compat
diredfl dired-x tuareg tuareg-compat tuareg-opam find-file pdffontetc
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc pdf-tools
pdf-view bookmark jka-compr pdf-cache pdf-info tq pdf-util format-spec
pdf-macs image-mode dired dired-loaddefs exif markdown-mode noutline
outline json-mode smie gdb-mi bindat gud finder-inf pyvenv-auto pyvenv
eshell esh-cmd generator esh-ext esh-proc esh-opt esh-io esh-arg
pcomplete esh-module esh-module-loaddefs esh-util treesit
eglot-inactive-regions eglot external-completion jsonrpc xref
flymake-vale flymake thingatpt diff diff-mode track-changes ert ewoc
debug backtrace find-func warnings imenu yasnippet ws-butler autoinsert
olivetti hl-line shr pixel-fill kinsoku url-file puny svg xml dom pulsar
pulse face-remap ef-melissa-dark-theme ef-themes modus-themes color
mode-line-config files-x repeat so-long autorevert filenotify delsel
elec-pair edmacro kmacro cl-extra help-mode word-wrap-mode line-count
xt-mouse savehist recentf tree-widget project .user-lisp-autoloads
compile text-property-search comint ansi-osc ansi-color ring comp-run
comp-common loaddefs-gen lisp-mnt radix-tree ace-link-autoloads
auctex-autoloads tex-site auto-read-only-autoloads avy-autoloads
beginend-autoloads captain-autoloads csv-mode-autoloads
debbugs-autoloads diredfl-autoloads ef-themes-autoloads
eglot-inactive-regions-autoloads elfeed-tube-autoloads aio-autoloads
elfeed-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads expand-region-autoloads flymake-vale-autoloads
forge-autoloads closql-autoloads emacsql-autoloads ghub-autoloads
gnu-elpa-keyring-update-autoloads highlight-doxygen-autoloads
hydra-autoloads jinx-autoloads json-mode-autoloads
kitty-graphics-autoloads lorem-ipsum-autoloads lv-autoloads
magit-todos-autoloads magit-autoloads pcase magit-section-autoloads
hl-todo-autoloads f-autoloads dash-autoloads async-autoloads
marginalia-autoloads markdown-mode-autoloads modus-themes-autoloads
move-text-autoloads multiple-cursors-autoloads
nerd-icons-completion-autoloads nerd-icons-dired-autoloads
nerd-icons-grep-autoloads nerd-icons-autoloads no-littering-autoloads
olivetti-autoloads orderless-autoloads org-appear-autoloads
org-superstar-autoloads package-build-autoloads derived
package-lint-flymake-autoloads package-lint-autoloads
page-break-lines-autoloads pcre2el-autoloads pdffontetc-autoloads
pdf-tools-autoloads pulsar-autoloads pyvenv-auto-autoloads
pyvenv-autoloads s-autoloads show-font-autoloads tablist-autoloads
treepy-autoloads tuareg-autoloads rx vertico-autoloads vundo-autoloads
whole-line-or-region-autoloads wiki-summary-autoloads
with-editor-autoloads llama-autoloads cond-let-autoloads
ws-butler-autoloads xr-autoloads yaml-autoloads yasnippet-autoloads
zygospore-autoloads use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core bytecomp byte-compile cus-edit pp cus-start cus-load
wid-edit package browse-url xdg url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs gv icons password-cache json subr-x mule-util map
url-vars cl-loaddefs cl-lib package-activate rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen
pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads xwidget-internal dbusbind inotify dynamic-setting
system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty
move-toolbar make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 656666 657242) (symbols 48 46613 4) (strings 32 167259 45866)
 (string-bytes 1 5680756) (vectors 16 234091) (vector-slots 8 2341466 48478)
 (floats 8 715 2753) (intervals 56 1136 0) (buffers 1064 25))

-- 
Abdulnafé Toulaïmat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.