Hello Michael,
 
emacs -Q does indeed make the problem go away.  I eventually tracked it down to this line in my config:
 
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
 
When I commented that out, things started working, but of course then TRAMP couldn't find some remote executables (git for magit, for example).
 
Curiously, swapping back to emacs 26 and then uncommenting that line kept things working.  Which is odd because emacs 26 is where
things started going wrong and I had upgraded to emacs 27 to see if it would be fixed.
 
I had previously disabled some small packages in my config that I wasn't really using, but was still seeing failures until the line above was
commented out.  So I don't think those packages have anything to do with this.
 
It's a mystery, but it's at least working now, for unknown reasons.  As I noted in th bug report, things just stopped working without any
config changes on my end, so I'm not sure what the cause was.  Just as mysteriously, they're now working again.
 
David
 
On 2021-02-16 14:18, Michael Albinus <michael.albinus@gmx.de> wrote:
David Greene via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

Hi David,

> I am getting the above error when doing a find-file in a vterm buffer
> with a remote shell. I have not changed anything recently in my config
> and I don't think the remote host has changed, but can't be sure since I
> don't control it.
>
> I have also seen a message about TRAMP not finding the command to check
> file existance.
>
> I have tried both 26.2 and 27.1 with no change in behavior. Previously
> I had ivy/counsel enabled but even after disabling it the error still
> occurs.

Does this also happen if you start "emacs -Q"?

> Here's a (sanitized) TRAMP debug log:
>
> backtrace()
> tramp-signal-hook-function(wrong-type-argument ("processp nil"))
> signal(wrong-type-argument ("processp nil"))
> tramp-maybe-open-connection((tramp-file-name #("ssh" 0 3 (tramp-default t)) "user" nil "host" nil "/path/user/src/project/README.md" nil))
> tramp-send-command((tramp-file-name #("ssh" 0 3 (tramp-default t)) "user" nil "host" nil "/path/user/src/project/README.md" nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
> tramp-send-command-and-check((tramp-file-name #("ssh" 0 3 (tramp-default t)) "user" nil "host" nil "/path/user/src/project/README.md" nil) "test 0")
> tramp-get-test-command((tramp-file-name #("ssh" 0 3 (tramp-default t)) "user" nil "host" nil "/path/user/src/project/README.md" nil))
> tramp-run-test("-d" #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> tramp-sh-handle-file-directory-p(#("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> apply(tramp-sh-handle-file-directory-p #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> tramp-sh-file-name-handler(file-directory-p #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> apply(tramp-sh-file-name-handler file-directory-p #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> tramp-file-name-handler(file-directory-p #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> file-directory-p(#("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)))
> find-file-noselect(#("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)) nil nil t)
> find-file(#("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)) t)
> funcall-interactively(find-file #("/ssh:user@host:/path/user/src/project/RE..." 1 4 (tramp-default t)) t)
> call-interactively(find-file nil nil)
> command-execute(find-file)

That doesn't tell too much. If the test above doesn't help, could you
please start

# emacs -Q --eval '(setq tramp-verbose 6)'

and rerun the test? There will be a Tramp debug buffer; pls show it.

Best regards, Michael.