😥

PhpStormが起動しなくなったので調べて直した

2024/07/20に公開

はじめに

MacBookAirが急に再起動した後、PhpStormを立ち上げようとしたら
以下のようなエラーがでて起動することができなくなっていました。

Cannot connect to already running IDE instance.
Exception: Process 664 is still running

調べてみた

同じ問題で困っている人がいました。

https://intellij-support.jetbrains.com/hc/en-us/community/posts/13541697317906-Error-while-opening-intellij-Cannot-connect-to-already-running-IDE-instance-Exception-Process-2-837-is-still-running

find "/Users/[your username]/Library/Application Support/JetBrains" -name ".lock" -delete

Note for Users: Replace [your username] with your actual username on the system before running the command. If you're unsure of your username, you can find it by typing the command whoami in the Terminal. This command will return your username.
This find command will search for and delete all .lock files within the JetBrains directory in your Application Support folder. Please make sure it's safe to delete these files before executing the command.

Additional Note: If you're unsure of the exact path to your JetBrains directory, start with this command to locate it: find ~ -type d -name "JetBrains" 2>/dev/null
This command will list JetBrains-related directories, helping you identify the correct path for the above deletion command.

.lockファイルを消したら動いた

.lockファイルを消して再起動すると起動しました。

% cd ~/Library/Application\ Support/JetBrains/PhpStorm2023.2
% find . -type f | egrep "\.lock$"
./.lock
% rm -f ./.lock
% find . -type f | egrep "\.lock$"
%

参考文献

https://intellij-support.jetbrains.com/hc/en-us/community/posts/13541697317906-Error-while-opening-intellij-Cannot-connect-to-already-running-IDE-instance-Exception-Process-2-837-is-still-running

Discussion