vscode: Can't launch multiple Code instances simultaneously ("Another instance is not responding")

  • VSCode Version: 1.33.1
  • OS Version: Ubuntu 18.04

Steps to Reproduce:

When I start my laptop, I launch two instances of VSCode at the same time (I work on two projects). I do this via a Terminator configuration but it can be reproduced with a shell script:

code /path/to/first/project &
code /path/to/second/project &
wait

90% of the time, I get the following error: “Another instance of code is running but not responding”. Only one instance of code is started after that, I have to manually launch the second one.

Does this issue occur when all extensions are disabled?: Yes, but less often.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 24 (20 by maintainers)

Commits related to this issue

Most upvoted comments

@YisraelV Great research!

@bpasero This started happening since the last refactorings around this code. Please read https://github.com/microsoft/vscode/issues/72531#issuecomment-502021609. This makes a lot of sense. We should try to put the launch service’s registration as much further up as we can, otherwise the socket synchronization won’t work.

Alternatively we can add some timeout mechanism in IPC in which a call to a missing service would wait for a predefined amount of time (how much?) and only reject if the service is still missing after that timeout.

@bpasero Also:

By the way, I noticed that when this error happens, the second instance (the one that didn’t manage to open) is never killed (running ps shows many processes still living)

cd ~/.config/Code/logs
grep -r "Unknown channel"

Nothing. 👍