Skip to content

projectile-find-file crashes when viewing a file over SSH #1898

@modulitos

Description

@modulitos

Expected behavior

When I'm viewing a file over an SSH connection on a remote server, M-x projectile-find-file opens the minibuffer with a list of files in the project to select.

Actual behavior

Minibuffer doesn't open, with these messages in my *Messages* buffer:

Projectile is initializing cache for /ssh:my.example.com:/home/me/projects/my-remote-project/ ...
project--read-file-cpd-relative: Wrong type argument: stringp, nil

Note that the "Projectile is initializing cache..." message appears every time I run projectile-find-file, as if the project isn't being created/cached successfully.

Steps to reproduce the problem

  1. open a file over SSH with TRAMP, where the file is within a git repo (C-x C-f /ssh:my.example.com:/home/me/projects/my-remote-project/readme.md)
  2. the file opens successfully (SSH and TRAMP are working)
  3. run M-x projectile-find-file

My minibuffer should show list of files within that repo that I can select, but there are no files.

Note that everything works as expected when I open a file on my local machine:

  1. The minibuffer opens, with a prompt like 1/12 [my-local-project] Find file:, and a list of files to select
  2. The "Projectile is initializing cache..." only happens the first time I run projectile-find-file within that repo, indicating that the project was created and cached successfully.

Environment & Version information

Projectile version information

2.9.0-snapshot

(via Doom Emacs)

Emacs version

29.1

Operating system

Macos Sonoma 14.5 (23F79)

Other notes

projectile-indexing-method is set to hybrid

fd is present on my remote machine, and is on my path when I run TERM=dumb ssh my.example.com

Perhaps related to this issue: #1886

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions