Stephen Berman <[email protected]> writes:

Hi Stephen,

> Since updating from master three days ago, I cannot access a remote
> directory via the sftp method.  It was a bootstrap build, so I don't
> have the previous executables, but I think my last build from master in
> which sftp access succeeded was within the last two or three weeks.

Hmm, strange. There are changes in tramp-gvfs.el, but not wrt zeroconf.

> There is no Tramp debug output despite setting tramp-verbose to 8, but
> when I start Emacs with --debug-init, I get the attached backtrace,
> which indicates the problem seems to be due to not having Avahi
> installed.  But with emacs-27 there is no problem with sftp access,
> although the Tramp debug output shows a D-bus error due to Avahi
> missing:
>
> ;; Emacs: 27.0.60 Tramp: 2.4.3.27.1 -*- mode: outline; -*-
> 11:15:45.108247 tramp-file-name-handler (1) # D-Bus error: "D-Bus
> error", "The name org.freedesktop.Avahi was not provided by any
> .service files"
> 11:15:45.108768 tramp-file-name-handler (1) # D-Bus error: "D-Bus
> error", "The name org.freedesktop.Avahi was not provided by any
> .service files"

Yes, but they could be ignored. (Maybe I should suppress these traces,
because they result from code which checks, whether Avahi is installed)

> A possibly related datapoint: I enable recentf-mode on starting Emacs,
> and the ~/.emacs.d/recentf file includes remote files accessed via sftp.
> In current master *Messages* shows this:
>
> Loading /home/steve/.emacs.d/recentf...done
> Waiting for git... [2 times]
> Error setting recentf-mode: (wrong-type-argument number-or-marker-p nil)
>
> But in emacs-27 there is no such error.

Hmm, maybe a change in the order of loading something. Don't know.

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   tramp-signal-hook-function(dbus-error ("The name org.freedesktop.Avahi was 
> not provided by any .service files"))
>   signal(dbus-error ("The name org.freedesktop.Avahi was not provided by any 
> .service files"))
>   dbus-handle-event((dbus-event :system 3 3 "org.freedesktop.DBus" nil nil 
> nil dbus-call-method-handler "The name org.freedesktop.Avahi was not provided 
> by any .service files"))
>   funcall-interactively(dbus-handle-event (dbus-event :system 3 3 
> "org.freedesktop.DBus" nil nil nil dbus-call-method-handler "The name 
> org.freedesktop.Avahi was not provided by any .service files"))
>   call-interactively(dbus-handle-event nil [(dbus-event :system 3 3 
> "org.freedesktop.DBus" nil nil nil dbus-call-method-handler "The name 
> org.freedesktop.Avahi was not provided by any .service files")])
>   command-execute(dbus-handle-event nil [(dbus-event :system 3 3 
> "org.freedesktop.DBus" nil nil nil dbus-call-method-handler "The name 
> org.freedesktop.Avahi was not provided by any .service files")] t)
>   read-event(nil nil 0.001)
>   dbus-call-method(:system "org.freedesktop.Avahi" "/org/freedesktop/DBus" 
> "org.freedesktop.DBus.Peer" "Ping")
>   dbus-ping(:system "org.freedesktop.Avahi")
>   zeroconf-init("local")

Could you pls check whether the appended patch helps?

> Steve Berman

Best regards, Michael.

diff --git a/lisp/tramp-gvfs.el b/lisp/tramp-gvfs.el
index 6e116731..526dfcb6 100644
--- a/lisp/tramp-gvfs.el
+++ b/lisp/tramp-gvfs.el
@@ -2469,7 +2469,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi."
   (let (tramp-gvfs-dbus-event-vector tramp-verbose fun)
     ;; Add completion functions for services announced by DNS-SD.
     ;; See <http://www.dns-sd.org/ServiceTypes.html> for valid service types.
-    (zeroconf-init tramp-gvfs-zeroconf-domain)
+    (dbus-ignore-errors (zeroconf-init tramp-gvfs-zeroconf-domain))
     (when (setq fun (or (and (zeroconf-list-service-types)
 			     #'tramp-zeroconf-parse-device-names)
 			(and (executable-find "avahi-browse")

Reply via email to