Error hile opening Pycharm: "Cannot connect to already running IDE instance. Exception: Process 385 is still running"

Help!,  I just started my Python course and I can't start Pycharm. I have a mackbook =(

1
28 comments

Everything was going well and this was suddenly! I restarted my laptop, reinstalled Pycharm but still the same…

0
Hi, could you please provide a screenshot of the error and logs from **Help | Collect Logs and Diagnostic Data** after reproducing it? 

You can use uploading service at https://uploads.jetbrains.com/ , and provide upload ID in your reply.
0

the picture above is the only thing I get when I try to start pycharm :(

1

I have the exact same issue except “process 650." no amount of restarts or reboots help. Would rather not delete / reinstall to save my assignments if possible. 

 

1

Same problem here. Latest version of PyCharm on macOs 13.5.1

 

2

Deleting the file `~/Library/Application Support/JetBrains/PyCharm2023.2/.lock` solved my problem

 

16

If the error message you are receiving on macbook states “ process still running – error (xyz) ” 

For me, the process number was 650. My fix was typing “ kill 650” in my macbooks terminal. 

I could not locate a .lock file and found the “kill” fix in old forums. 

8

Alex…Thank you very much for the help, I tried your advice and solved the problem by deleting the entire  "JetBrains" folder `~/Library/Application Support/JetBrains` BTW I work with macOs High Sierra 10.13.6

0

In linux I also solved the issue by deleting the .lock file:

rm ~/.config/JetBrains/PyCharm2023.2/.lock

Using 2023.2. Never saw this issue with 2022.x. Can't rollback now in toolbox with several other new bugs I have encountered.  

2

Same problem for me .  Alex's post above helped me.  I hope this helps someone.   I run Fedora.  I had to do a find for .lock to find the lock file: “find -name .lock”

Here was the path to the hidden lock file for me.   ~./var/app/com.jetbrains.PyCharm-Community/config/JetBrains/PyCharmCE2023.2/.lock

rm .lock from in side the containing folder  and I was able to fire up Pycharm.

1

I encountered this problem on a macbook. I can't find the .lock file on my system. I tried completely deleting the application. Did not help.

0

The issue can be solved by running the repair scrpt provided in the bin directory.

1

# Run the following command in your terminal:
sudo kill <process_number>
# Try running your IDE again!


it worked for me

3

device:- mac os(Apple silicon M1)

1. go to terminal first 

2. type " cd ~/Library/Application\ Support "

3. type" rm -rf JetBrains "

4. type “ ls ”

5. if you don't see the jetbrains file now you are done, reinstall pychram and run it it will run. 

 

0

Ubuntu 22:

Cannot connect to already running IDE instance.
Exception: Process 7,713 is still running

$ cd /home/<me>/.config/JetBrains/PyCharm2023.2
$ ls -a | grep lock
.lock
$ cat .lock 
7713

I'm thinking about what's more infuriating, the improper conversion of pid to float or the program relying on a pid file to decide it doesn't want to run.

 

4

I'm thinking about what's more infuriating, the improper conversion of pid to float or the program relying on a pid file to decide it doesn't want to run.

The “improper conversion” you're seeing isn't a type conversion - it's a regional formatting. In some languages a comma is used as a decimal separator, and in others - as here - the comma is used as a thousands group separator. The value “7,713” is an integer displayed as a string. Either way, this dialog probably shouldn't use string formatting for the PID value.

Lock files are an extremely common way to prevent duplicate processes to avoid more than one process trying to, for example, write to a file simultaneously. If this were to happen, there's a high chance of corrupting the file. When the application closes normally, these lock files get cleaned up. In my case, an entirely unrelated issue crashed my Mac, leaving the stale lock files behind.

0

Also started seeing this on an Unbuntu 22.04 derivative.  If it helps any, the .lock file for me is in `~/.var/app/com.jetbrains.PyCharm-Community/config/JetBrains/PyCharmCE2023.2`.  When I delete it, the IDE will launch but then crashes immediately and leaves a new .lock file behind.

1

Also saw this on Ubuntu 22.04 today – freshly restarted machine. The process (6287) did not exist. Effectively locked out of pycharm

0

Had this also on Ubuntu, with a non-existing PID being referenced to. Another restart fixed the issue, and also notified me that SNAP had automatically updated Ubuntu.
Perhaps the snap update somehow messed up the locking system?

0

Just type “kill” and your issue-number in to the Terminal, worked at least or me (Issue385)

0

Removing the lock file is a likely solution, especially if your IDE might have been powered down or restarted while the IDE was running. See this page for the location of the app directory where the lock file is located, depending whether you are running on Windows or Mac:

Directories used by the IDE | IntelliJ IDEA Documentation (jetbrains.com)

On Windows, using the encoded directory string from the above-linked page, you can change to the app directory by typing “chdir <encoded directory string>” directly into a cmd window (windows button + ‘cmd’) to get the path of the directory where the lock file is located.

0

in Ubuntu 22.04 I do:

rm ~/.config/JetBrains/PCharmCE2023.2/.lock

I did power down the PC from a terminal, the IDE was running but debugging was stopped;  The IDE should be able to receive the “kill” signal and release the lock so it looks like a bug…

1

Felix None - fairly certain I saw the bug fix for this in recent release notes. It might have been resolved in the latest version(s).

0

on a mac you can go into your activity monitor and sort by process ID to terminate the process

0

I got the same issue, although I use Win11.  I press CTRL+ALT+DELETE.  Then, I found pycharm was stlill runninng.

I killed the process.  But, Pycharm was still running.  So, I restated Win11.  Then, Pycharm moved.

0

In Ubuntu i do:

Open a terminal(Ubuntu).

Type the following command to navigate to the directory containing the ".lock" file:

cd /home/username/.var/app/com.jetbrains.PyCharm-Community/config/JetBrains/PyCharmCE2023.3/

Once you're in the directory, delete the ".lock" file using the following command:

rm .lock

After deleting the ".lock" file, restart PyCharm Community Edition.

This should hopefully resolve the issue.


0

Please sign in to leave a comment.