bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.62k stars 94 forks source link

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

Closed hoogesh closed 1 year ago

hoogesh commented 4 years ago

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

bmewburn commented 4 years ago

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?

d8vjork commented 4 years ago

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).

joachim-n commented 3 years ago

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 commented 3 years ago

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
d8vjork commented 3 years ago

@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

joachim-n commented 3 years ago

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.

d8vjork commented 3 years ago

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

joachim-n commented 3 years ago

Still crashes with neilbrayfield.php-docblocker disabled.

joachim-n commented 3 years ago

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 commented 3 years ago

I found the problem I was having.

Nope. It's crashing again.

joachim-n commented 3 years ago

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

But:

LemonzDEV commented 2 years ago

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

matteopuppis commented 2 years ago

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.

m-rehspringer commented 2 years ago

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

bmewburn commented 2 years ago

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

m-rehspringer commented 2 years ago

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.

ctf0 commented 2 years ago

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

bmewburn commented 1 year ago

closing please open a new issue if a problem in 1.9