Disclaimer: I know this post is now old but since I encountered a similar issue
today, it seems to me relevant to share my notes about it, taking care of users not too familiar with emacs lisp.
The culprit function is likely projectile-project-root
.
You can try to investigate about it with
C-h f
or (describe-function 'projectile-project-root)
C-h v
or (describe-variable 'projectile-require-project-root)
The help screen provides a link to the elisp source code which you could step through using debug-on-entry
(see info node "Debugging" in elisp)
This function uses caching so this might be somewhat uneasy, depending on your skills with emacs lisp.
Workaround:
I solved my case by moving my project to another directory, suspecting that its name starting with "test" may have caused the problem. I also removed project cache subdirs (check hidden as well).