vscode-intelephense
vscode-intelephense copied to clipboard
TYPO3 PackageArtifact.php RangeError: Maximum call stack size exceeded. Server crashed 5 times in last 3 min
I'm experiencing crashing of this extension, and then VSCode disabling the extension due to repeated crashing (5x in 3 sec)
[Info - 11:00:37 AM] Initialising intelephense 1.9.5 [Info - 11:00:37 AM] Initialised in 13 ms [Error - 11:00:37 AM] RangeError: Maximum call stack size exceeded at e (/root/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.9.5/node_modules/intelephense/lib/intelephense.js:2:2355881)
Please let me know how I can help troubleshoot this issue. Thanks!
It's hard to track this one down without some example code that reproduces the crash. If you could put together a minimal reproducible example that would be a big help.
Hi @bmewburn,
I've get the same error on:
intelephense: 1.10.2 macOS: 14.3.1 vscode: Version: 1.86.1
As soon as intelephense scans the file vendor/typo3/PackageArtifact.php of my Typo3 project. I can send you the file in question via email if that is ok with you?
Thanks, Thomas
Thanks @tlueder . Yes, please email the file to me
Hi @bmewburn, Done that.
Another thing, is was a bit hard to find the file that was causing the problem. as the error was something like
[Info - 13:10:11] Connection to server got closed. Server will restart.
true
[Info - 13:10:12] Initialising intelephense 1.10.2
[Info - 13:10:12] Reading state from /Users/tlueder/Library/Application Support/Code/User/workspaceStorage/c671ef329ff48daffaf704b17e2cfa36/bmewburn.vscode-intelephense-client/3c2da00f.
[Info - 13:10:12] Intelephense premium features enabled.
[Info - 13:10:12] Initialised in 11 ms
[Info - 13:10:12] Environment changed. Refreshing 1 in memory documents.
[Info - 13:10:12] Searching file:///Users/tlueder/.vscode/extensions/bmewburn.vscode-intelephense-client-1.10.2/node_modules/intelephense/lib/stub for files to index.
[Info - 13:10:12] Searching file:///Users/tlueder/VSCodeProjects/***** for files to index.
[Info - 13:10:12] Indexing started.
/Users/tlueder/.vscode/extensions/bmewburn.vscode-intelephense-client-1.10.2/node_modules/intelephense/lib/intelephense.js:2
Followed by source code of this file until it run out of space or something.
additionalAllowedQueryParameters});retur[Error - 13:10:13] The intelephense server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
What I did was to run the js file through a beautifier and only then I got trace of what happened. But still no clue what file was causing it.
So what I did next was to move the entire vendor folder out auf my project to see if it solves the problem and it did. Next step was to add folders n chunks until the error showed up again. This way I found this file.
TL:DR It would be nice if the indexer had some kind of debug output what file it is starting to process.
As a workaround I added "**/vendor/**/PackageArtifact.php
" to "intelephense.files.exclude"
@tlueder You mean **/vendor/typo3/PackageArtifact.php
;-)
@mbrodala Kind of...
Markdown format changed it, so the first part is bold now
This is what I actually added:
"**/vendor/**/PackageArtifact.php"
But "**/vendor/typo3/PackageArtifact.php"
would work as well.
The former would be too broad IMO and also exclude unrelated packages for the (not likely but still possible) case they have a PackageArtifact.php
file.
Yes, definitely.
But I frustrated by this error at the time and had hoped this to be just a temporary fix. :)
As a workaround I added "/vendor//PackageArtifact.php" to "intelephense.files.exclude"
This method also solved my similar problem.