Fixing Junie hanging in WebStorm

Today I ran into an issue with JetBrains WebStorm where Junie (the AI assistant) would hang whenever I tried to run an AI query. The entire IDE would freeze, making it unusable.

I generated the logs (Help > Collect Junie Logs) and checked the latest log from Junie. There I noticed this error:

Settings in your shell rc file (.bashrcm .zshrc, etc.) are preventing Junie startup

After some searching, I found this document that explained the issue.

It turned out that my zsh configuration was causing the problem, which was weird because I hadn’t changed my zsh config for months. Here’s what my .zshprofile looked like:

Terminal window
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(fnm env --use-on-cd --shell zsh)"
# Added by Toolbox App
export PATH="$PATH:/Users/eshlox/Library/Application Support/JetBrains/Toolbox/scripts"

The fix was surprisingly simple: I just needed to change the terminal shell from zsh to another shell (in my case, bash) in the WebStorm settings:

  1. Go to Settings > Tools > Terminal
  2. Change the Shell path from zsh to another shell (I used bash)

After making this change, Junie started working perfectly again!

I didn’t have time to investigate exactly why this happens, but if you’re experiencing the same issue with Junie hanging in any JetBrains IDE, try switching your terminal shell to any other shell.