vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

The intelephense server crashed 5 times in the last 3 minutes. The server will not be restarted.

Open hoogesh opened this issue 4 years ago • 17 comments

Describe the bug The intelephense server crashed 5 times in the last 3 minutes. The server will not be restarted.

To Reproduce Open VSCODE.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Platform and version Windows10 - v1.5.3

hoogesh avatar Jul 31 '20 04:07 hoogesh

There's not enough information provided to action this. Is there any errors in the output panel? Can you provide some code that reproduces the error?

bmewburn avatar Aug 01 '20 04:08 bmewburn

I was hoping this problem didn't only happen to me, but now I see that there's more people.

@bmewburn This is the whole output I'm having:

https://gist.github.com/d8vjork/9017e746658e0668145915b7fda8ebe7

Edit: I think now I know why, I'm using Composer v2 alpha and is because of the complain of PSR-4. Sorry that his actually is a different issue (I'll open a new one for this).

d8vjork avatar Aug 03 '20 10:08 d8vjork

There's not enough information provided to action this. Is there any errors in the output panel? Can you provide some code that reproduces the error?

There is nothing in the output panel.

Which logs should I look in?

joachim-n avatar Aug 10 '21 12:08 joachim-n

The extension host log has this, but I'm not sure how useful it is:

[2021-09-21 09:41:02.476] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/joachim/.vscode/extensions/neilbrayfield.php-docblocker-2.4.0/out/src/extension.js
[2021-09-21 09:42:53.192] [exthost] [error] [bmewburn.vscode-intelephense-client] provider FAILED
[2021-09-21 09:42:53.254] [exthost] [error] Canceled: Canceled
	at w.makeCancelError (/Users/joachim/.vscode/extensions/bmewburn.vscode-intelephense-client-1.7.1/lib/extension.js:1:128391)
	at w.handleFailedRequest (/Users/joachim/.vscode/extensions/bmewburn.vscode-intelephense-client-1.7.1/lib/extension.js:1:128242)
	at /Users/joachim/.vscode/extensions/bmewburn.vscode-intelephense-client-1.7.1/lib/extension.js:1:93115
	at async l.provideDocumentSymbols (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:163113)
[2021-09-21 09:49:47.845] [exthost] [warning] [Decorations] CAPPING events from decorations provider vscode.git 396
[2021-09-21 09:50:18.470] [exthost] [warning] [Decorations] CAPPING events from decorations provider vscode.git 396

joachim-n avatar Sep 21 '21 08:09 joachim-n

@joachim-n That's probably that neilbrayfield.php-docblocker extension that is competing with the DocBlock built-in functionality that now PHP intelephense has, so you should disable that extension

d8vjork avatar Sep 21 '21 08:09 d8vjork

I'll try that, but I should also say that if I open a VSCode window in a subfolder of my PHP project, then it works fine and intelephense doesn't crash. So it seems to me that it's something in a code file in my project that is causing the crash.

joachim-n avatar Sep 21 '21 09:09 joachim-n

If you've a docblock somewhere in that folder and intelephense + that other extension are trying to parse it (aplying colors, etc) that should be the one causing the crash

d8vjork avatar Sep 21 '21 09:09 d8vjork

Still crashes with neilbrayfield.php-docblocker disabled.

joachim-n avatar Sep 21 '21 09:09 joachim-n

I found the problem I was having.

The project I was opening in VSCode was a Drupal site. It contained a folder patches/ which contained patch files for Composer to apply using https://github.com/cweagans/composer-patches.

Because some of these patches were made by me, I had elsewhere on my system a git clone of Drupal core. And to make it easier to copy patch files around, I had a symlink:

PROJECT/patches/drupal-clone -> /home/joachim/somewhere-else/drupal-clone

Obviously this symlinked folder contained most of the same PHP classes that the project also has.

So the crash will probably have been caused by duplicate classes.

joachim-n avatar Sep 21 '21 15:09 joachim-n

I found the problem I was having.

Nope. It's crashing again.

joachim-n avatar Sep 29 '21 08:09 joachim-n

Someone suggested I change the intelephense.maxMemory setting from 256 to 2048, and the problem is now fixed for me.

But:

  • why isn't there proper logging from VSCode extensions?
  • why isn't the actual problem reported, instead of just a vague message about a crash?

joachim-n avatar Oct 19 '21 09:10 joachim-n

Hello, sorry for replying to this topic, but this extension keeps crashing after few seconds... I'm working on MacOS and both extension and vscode are updated to latest version.

I'm working on several codeigniter projects but this problem comes on every kind of project i'm working on...

Where's logs path to attach? Or maybe can you suggest a replacement for this extension? My work is very difficult and frustrating without formatting

micheleg95 avatar Apr 28 '22 13:04 micheleg95

Same exact problem for me. Before updating VSCode everything works perfectly. Now I've lost most of usefull functions (auto formatting code, autocompletion php, cmd+click on function to jump directly into definition, etc...). Hope you can fix this.

matteopuppis avatar Apr 28 '22 14:04 matteopuppis

Hello, same here, from quite some time. What I don't understand is that some days it works perfectly, and from time to time it just keeps crashing. Regardless of vscode version and intelephense version. Yesterday I had no problem at all, and today I can't open a single PHP file without it crashing. Regardless of the project / file edited, the log keeps mentioning a specific folder scan, node_modules/intelephense/lib/stub.

Log attached 5-intelephense.log

m-rehspringer avatar May 10 '22 06:05 m-rehspringer

@mr47leg try disabling the crash telemetry "intelephense.telemetry.enabled": false

bmewburn avatar May 11 '22 02:05 bmewburn

Thanks @bmewburn, I'll try that. Since yesterday evening it works again ; I wonder if it could be related to some of our group policies.

Edit : the problem happened again yesterday, and turning this option off seemed to solve it.

m-rehspringer avatar May 11 '22 06:05 m-rehspringer

this error is really annoying, it just keeps randomly happening 🤦‍♂️😤.

ctf0 avatar Aug 08 '22 13:08 ctf0

closing please open a new issue if a problem in 1.9

bmewburn avatar Jan 14 '23 05:01 bmewburn