bmewburn / vscode-intelephense

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

[fixed] VSCode Dev Container with Intelephense keeps crashing #1273

Closed tolga-ercan-scs closed 4 years ago

tolga-ercan-scs commented 4 years ago

Describe the bug I keep seeing the following in the extension log

[Info  - 7:38:08 PM] Initialising intelephense 1.4.1
[Info  - 7:38:08 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/4d0db4c8.
[Info  - 7:38:08 PM] Initialised in 26 ms
[Warn  - 7:38:27 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 7:38:27 PM] Indexing started.
[Info  - 7:39:07 PM] Connection to server got closed. Server will restart.
[Info  - 7:39:07 PM] Initialising intelephense 1.4.1
[Info  - 7:39:07 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/4d0db4c8.
[Info  - 7:39:08 PM] Initialised in 28 ms
[Warn  - 7:39:23 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 7:39:23 PM] Indexing started.
[Info  - 7:39:50 PM] Connection to server got closed. Server will restart.

To Reproduce Don't know. I tried setting "intelephense.debug.enable": true, but it does nothing. I was hoping you could tell me how to enable DEBUG logs to help me get to the root of the problem.

Expected behavior Intelephense to complete indexing

Platform and version Mac OSX 10.15.5

bmewburn commented 4 years ago

If you delete this /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/4d0db4c8 can you get it to index without crashing?

Setting intelephense.server.trace to messages might show further information. How many files are in your workspace? Does the container have a memory limit?

pallemach2 commented 4 years ago

Im having the same problem. I tried to delete the folder you were mentioning with no success. Im facing the issue with a remote-ssh connection to the server and the workspace im trying to index is a shopware installation. Also i tried to increase the memory limit to 4GB with no luck.

image

Thats the only error message i got.

pallemach2 commented 4 years ago

Any updates or workarounds regarding this?

tolga-ercan-scs commented 4 years ago

If you delete this /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/4d0db4c8 can you get it to index without crashing?

Setting intelephense.server.trace to messages might show further information. How many files are in your workspace? Does the container have a memory limit?

Sorry, got busy...

1) There's 11,141 files in the workspace 2) When i disable indexing vendor/** it works (but defeats the purpose :) ) 3) Deleting the directory... it just gets re-created and the server still crashes 4) The docker container has max memory limit of 2G

tolga-ercan-scs commented 4 years ago

How can I start the server from the terminal? After 3 attempts to index, the devcontainer stops trying to start the server. How can I start the server directly from terminal so I can capture a core dump?

bmewburn commented 4 years ago

Does this still happen in 1.5? If so can I get your composer.json @tolga-ercan-scs ?

pallemach2 commented 4 years ago

To me, it still happens.

Syntaf commented 4 years ago

~EDIT: Downgrading to 1.4.1 seems to be a temporary workaround~

Been encountering this issue lately, same exact scenario as others have already described above. Running inside my vagrant image via remote-ssh. Can't remember when this issue started but it used to work perfectly.

I deleted my index cache and tried a fresh indexing but same issue with connection timeouts:

[Info  - 2:17:37 PM] Initialising intelephense 1.5.2
[Info  - 2:17:37 PM] Reading state from /home/vagrant/.vscode-server/data/User/workspaceStorage/75005e5401f1f678b7881e24f791e80c/bmewburn.vscode-intelephense-client/1f499184.
[Info  - 2:17:37 PM] Initialised in 21 ms
[Info  - 2:17:37 PM] Environment changed. Refreshing 2 in memory documents.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/browscap/cache.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/src/Migrations/SdForum/Version20190702214741.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/src/Migrations/SdForum/Version20200514204804.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/vendor/aws/aws-sdk-php/src/data/ec2/2016-11-15/api-2.json.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:17:41 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 500000 bytes.
[Info  - 2:17:41 PM] Indexing started.
[Info  - 2:18:03 PM] Connection to server got closed. Server will restart.
[Info  - 2:18:04 PM] Initialising intelephense 1.5.2
[Info  - 2:18:04 PM] Reading state from /home/vagrant/.vscode-server/data/User/workspaceStorage/75005e5401f1f678b7881e24f791e80c/bmewburn.vscode-intelephense-client/1f499184.
[Info  - 2:18:04 PM] Initialised in 13 ms
[Info  - 2:18:04 PM] Environment changed. Refreshing 2 in memory documents.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/browscap/cache.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/src/Migrations/app/Version20190702214741.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/src/Migrations/app/Version20200514204804.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/vendor/aws/aws-sdk-php/src/data/ec2/2016-11-15/api-2.json.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:09 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 500000 bytes.
[Info  - 2:18:09 PM] Indexing started.
[Info  - 2:18:15 PM] Connection to server got closed. Server will restart.
[Info  - 2:18:15 PM] Initialising intelephense 1.5.2
[Info  - 2:18:15 PM] Reading state from /home/vagrant/.vscode-server/data/User/workspaceStorage/75005e5401f1f678b7881e24f791e80c/bmewburn.vscode-intelephense-client/1f499184.
[Info  - 2:18:15 PM] Initialised in 13 ms
[Info  - 2:18:15 PM] Environment changed. Refreshing 2 in memory documents.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/browscap/cache.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/src/Migrations/SdForum/Version20190702214741.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/src/Migrations/SdForum/Version20200514204804.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/vendor/aws/aws-sdk-php/src/data/ec2/2016-11-15/api-2.json.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Text.php is over the maximum file size of 500000 bytes.
[Warn  - 2:18:20 PM] file:///home/vagrant/html/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 500000 bytes.
[Info  - 2:18:20 PM] Indexing started.
[Info  - 2:18:48 PM] Connection to server got closed. Server will restart.
[Info  - 2:18:48 PM] Initialising intelephense 1.5.2
[Info  - 2:18:48 PM] Reading state from /home/vagrant/.vscode-server/data/User/workspaceStorage/75005e5401f1f678b7881e24f791e80c/bmewburn.vscode-intelephense-client/1f499184.
[Info  - 2:18:48 PM] Initialised in 12 ms
[Info  - 2:18:48 PM] Environment changed. Refreshing 2 in memory documents.
Syntaf commented 4 years ago

Stacktrace:

[Trace - 2:22:42 PM] Sending response 'workspace/configuration - (5)'. Processing request took 3ms
Stacktrace:
   ptr1=0xa8fde846481
    ptr2=(nil)
    ptr3=(nil)
    ptr4=(nil)
    failure_message_object=0x7ffcbc3d8f40

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x1a93942]
    1: StubFrame [pc: 0x1add342]
Security context: 0x39ce61f9a2f1 <JSObject>
    2: insert [0x13118eae1489] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x105800b75b69 offset=63](this=0x39ce61fb06a9 <u map = 0x28acf2613379>,0x38909faa6111 <Object map = 0x28acf2615fd9>)
    3: add [0x13118eae18d1] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x1ced553b3129 offset=86](this=0x39ce61fb0339 <JSObject>,0x0f6ec93860a1 <String[26]: domainwidetakeoutinitiated>,0x38909faa5ef1 <Object map = 0x4ca7af16529>)
    4: add [0x13118eae02e9] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x1ced553b1169 offset=364](this=0x39ce61fafec9 <JSObject>,0x2aab7a77f431 <JSObject>)
    5: symbolsStep [0x105800b3f4d9] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc4cfd96](this=0x158ecda94259 <k map = 0x28acf2603749>,0x2aab7a77e959 <JSObject>,2,0x158109f80659 <true>)
    6: /* anonymous */ [0x2aab7a7749b1] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc542fc8](this=0x158ecda94259 <k map = 0x28acf2603749>)
    7: next [0x39ce61f960d1](this=0x2aab7a774d89 <JSGenerator>,0x2aab7a7762e9 <Very long string[1059]>)
    8: o(aka o) [0x2aab7a774b81] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc493e23](this=0x158109f804d1 <undefined>,0x2aab7a7762e9 <Very long string[1059]>)
    9: StubFrame [pc: 0x1a54e72]
   10: StubFrame [pc: 0x1a1c61b]
   11: EntryFrame [pc: 0x19fad38]

==== Details ================================================

[0]: ExitFrame [pc: 0x1a93942]
[1]: StubFrame [pc: 0x1add342]
[2]: insert [0x13118eae1489] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x105800b75b69 offset=63](this=0x39ce61fb06a9 <u map = 0x28acf2613379>,0x38909faa6111 <Object map = 0x28acf2615fd9>) {
  // expression stack (top to bottom)
  [06] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [05] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [04] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [03] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [02] : 0x0f6ec93861f1 <JSArray[19]>
  [01] : 0x0a8fde846481 <FixedArray[1]>
  [00] : 0x158109f80e19 <Odd Oddball: optimized_out>
--------- s o u r c e   c o d e ---------
function insert(e){if(void 0===this.root)return this.root={isBlack:!0,value:e,left:void 0,right:void 0},e;let t,n=this.root,r=[];for(;;){if(r.push(n),!n.value)return n.value=e,e;if(t=this.comparator(e,n.value),t<0){if(void 0===n.left){n.left={isBlack:!1,value:e,left:void 0,right:void 0},r.push(n.left);break}n=n.le...

-----------------------------------------
}

[3]: add [0x13118eae18d1] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x1ced553b3129 offset=86](this=0x39ce61fb0339 <JSObject>,0x0f6ec93860a1 <String[26]: domainwidetakeoutinitiated>,0x38909faa5ef1 <Object map = 0x4ca7af16529>) {
  // expression stack (top to bottom)
  [10] : 0x38909faa6111 <Object map = 0x28acf2615fd9>
  [09] : 0x39ce61fb06a9 <u map = 0x28acf2613379>
  [08] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [07] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [06] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [05] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [04] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [03] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [02] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [01] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [00] : 0x38909faa6111 <Object map = 0x28acf2615fd9>
--------- s o u r c e   c o d e ---------
function add(e,t){const n={key:e,items:new Map([[t.id,t]])},r=this.tree.insert(n);if(r!==n){let e=r.items.get(t.id);(!e||e.score>t.score)&&r.items.set(t.id,t)}}
-----------------------------------------
}

[4]: add [0x13118eae02e9] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:3] [bytecode=0x1ced553b1169 offset=364](this=0x39ce61fafec9 <JSObject>,0x2aab7a77f431 <JSObject>) {
  // expression stack (top to bottom)
  [33] : 0x38909faa5ef1 <Object map = 0x4ca7af16529>
  [32] : 0x0f6ec93860a1 <String[26]: domainwidetakeoutinitiated>
  [31] : 0x39ce61fb0339 <JSObject>
  [30] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [29] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [28] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [27] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [26] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [25] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [24] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [23] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [22] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [21] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [20] : 0x13118ea914b9 <FunctionContext[9]>
  [19] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [18] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [17] : 0x158109f80709 <false>
  [16] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [15] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [14] : 0x0f6ec9384f81 <MapIterator map = 0x3d364b483dd9>
  [13] : 0x39ce61f96389 <JSFunction next (sfi = 0xf75a9b8f2e1)>
  [12] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [11] : 8
  [10] : 4
  [09] : 0x38909faa59d1 <Object map = 0x28acf2615999>
  [08] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [07] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [06] : 0x0f6ec9385271 <String[53]: google_service_alertcenter_domainwidetakeoutinitiated>
  [05] : 0x0f6ec93852b9 <String[53]: google_service_alertcenter_domainwidetakeoutinitiated>
  [04] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [03] : 0x0f6ec9385029 <JSArray[8]>
  [02] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [01] : 0x158109f80e19 <Odd Oddball: optimized_out>
  [00] : 0x158109f80e19 <Odd Oddball: optimized_out>
--------- s o u r c e   c o d e ---------
function add(e){const t=this.definitionTableMap.get(e.id);let n=e.definitions;if(t){let r=this.tableDiff(t,e);this.removeDefinitions(r.removed),n=r.added}const i=e.id;let a,c,l,u;this.definitionTableMap.set(i,e);for(let e of n)if(this.shouldIndexDefinition(e)){this.typeHeirarchyIndex.add(e),a=s.fromDefinition(e...

-----------------------------------------
}

[5]: symbolsStep [0x105800b3f4d9] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc4cfd96](this=0x158ecda94259 <k map = 0x28acf2603749>,0x2aab7a77e959 <JSObject>,2,0x158109f80659 <true>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (e,t,n)=>{let r=0;(1&t)>0&&(r|=16384),(2&t)>0&&(r|=32768);const i=s.SymbolsStep.traverse({node:e.root,nodeUtils:e.getNodeUtils(),nameResolver:new p.NameResolver,definitionTable:new a.DefinitionTable(e.id,new Map),nodeDefinitionMap:new Map,nodeMagicDefinitionMap:new Map,nodePhpDocMap:new Map,modifier...

-----------------------------------------
}
[6]: /* anonymous */ [0x2aab7a7749b1] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc542fc8](this=0x158ecda94259 <k map = 0x28acf2603749>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (){if(this.isOpened(e)){const t=this.compilationStateMap.get(e);return t&&t.compileDebounce?t.compileDebounce.flush(1):3}if(!this.workspace.fileProvider)return 3;const r=yield this.workspace.fileProvider.readFile(e);if(void 0===r)return 3;const o=new i.Document(e,r,0,n||this.stores.documentStore.fla...

-----------------------------------------
}
[7]: next [0x39ce61f960d1](this=0x2aab7a774d89 <JSGenerator>,0x2aab7a7762e9 <Very long string[1059]>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
[8]: o(aka o) [0x2aab7a774b81] [/home/vagrant/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.5.2/node_modules/intelephense/lib/intelephense.js:~3] [pc=0x21e2cc493e23](this=0x158109f804d1 <undefined>,0x2aab7a7762e9 <Very long string[1059]>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function o(e){try{c(r.next(e))}catch(e){a(e)}}
-----------------------------------------
}
[9]: StubFrame [pc: 0x1a54e72]
[10]: StubFrame [pc: 0x1a1c61b]
[11]: EntryFrame [pc: 0x19fad38]
=====================

[Info  - 2:23:16 PM] Connection to server got closed. Server will restart.
[Info  - 2:23:40 PM] Indexing started.

#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0x7f466be5b880[Info  - 2:24:56 PM] Connection to server got closed. Server will restart
tolga-ercan-scs commented 4 years ago

Does this still happen in 1.5? If so can I get your composer.json @tolga-ercan-scs ?

It still happens, but the error is slightly different... The error about Unexpected End of JSON input is new...

[Info  - 10:13:21 PM] Initialising intelephense 1.5.2
[Info  - 10:13:21 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Info  - 10:13:21 PM] Initialised in 24 ms
[Warn  - 10:13:27 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 10:13:27 PM] Indexing started.
[Info  - 10:13:53 PM] Indexing ended. 8100 files indexed in 25s.
[Info  - 10:13:53 PM] Writing state to /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Info  - 10:13:55 PM] Connection to server got closed. Server will restart.
[Info  - 10:13:55 PM] Initialising intelephense 1.5.2
[Info  - 10:13:55 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Error - 10:13:55 PM] SyntaxError: Unexpected end of JSON input
[Info  - 10:13:55 PM] Initialised in 16 ms
[Warn  - 10:13:59 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 10:13:59 PM] Indexing started.
[Info  - 10:14:18 PM] Indexing ended. 8099 files indexed in 19s.
[Info  - 10:14:18 PM] Writing state to /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Info  - 10:14:20 PM] Connection to server got closed. Server will restart.
[Info  - 10:14:20 PM] Initialising intelephense 1.5.2
[Info  - 10:14:20 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Error - 10:14:20 PM] SyntaxError: Unexpected end of JSON input
[Info  - 10:14:20 PM] Initialised in 14 ms
[Warn  - 10:14:24 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 10:14:24 PM] Indexing started.
[Info  - 10:14:45 PM] Indexing ended. 8100 files indexed in 20s.
[Info  - 10:14:45 PM] Writing state to /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Info  - 10:14:47 PM] Connection to server got closed. Server will restart.
[Info  - 10:14:47 PM] Initialising intelephense 1.5.2
[Info  - 10:14:47 PM] Reading state from /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Error - 10:14:47 PM] SyntaxError: Unexpected end of JSON input
[Info  - 10:14:47 PM] Initialised in 15 ms
[Warn  - 10:14:51 PM] file:///var/www/vcard/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 10:14:51 PM] Indexing started.
[Info  - 10:15:12 PM] Indexing ended. 8100 files indexed in 20s.
[Info  - 10:15:12 PM] Writing state to /root/.vscode-server/data/User/workspaceStorage/bae0297142cd322cfeb59d0037b7f7ab/bmewburn.vscode-intelephense-client/7ca87576.
[Info  - 10:15:13 PM] Connection to server got closed. Server will restart.```

My composer.json is:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.1.3",
        "ext-json": "*",
        "aws/aws-sdk-php": "^3.95",
        "darkaonline/l5-swagger": "5.7.*",
        "doctrine/dbal": "^2.9",
        "dusterio/laravel-plain-sqs": "^0.1.14",
        "fideloper/proxy": "^4.0",
        "friendsofphp/php-cs-fixer": "^2.16",
        "fzaninotto/faker": "^1.8",
        "hackzilla/password-generator": "^1.4",
        "kouz/laravel-airbrake": "^0.4.1",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "mossadal/math-parser": "^1.3",
        "XXXXX/utils_php": "1.4.1",
        "predis/predis": "^1.1",
        "symfony/yaml": "^4.1",
        "usmanhalalit/laracsv": "^2.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "johnkary/phpunit-speedtrap": "^3.1",
        "josiasmontag/laravel-redis-mock": "^1.2",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": [
                "darkaonline/l5-swagger"
            ]
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "files": [
            "helpers.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        },
        "files": [
            "helpers.php"
        ]
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ],
        "fix-code-style": [
            "php-cs-fixer fix --config=config_code_style.php_cs"
        ],
        "test-coverage": [
            "Composer\\Config::disableProcessTimeout",
            "phpunit --coverage-html coverage"
        ],
        "migrate" : [
            "php artisan migrate --database=pgsql_testing",
            "php artisan migrate"
        ],
        "migrate:reset" : [
            "php artisan migrate:reset --database=pgsql_testing",
            "php artisan migrate:reset"
        ],
        "migrate:rollback" : [
            "php artisan migrate:rollback --database=pgsql_testing",
            "php artisan migrate:rollback"
        ]
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/XXXXXX"
        }
    ]
}
Syntaf commented 4 years ago

Update: I noticed that disabling Hyper-V on my windows machine actually resolved this issue. I think it might more be tied to https://github.com/microsoft/vscode-remote-release/issues/1257 causing this extension to crash.

For anyone running Vagrant + Windows with Remote SSH, you can disable Hyper-V using these commands (while running in an elevated terminal)

# Disable Hyper-V - requires restart
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor 
DISM /Online /Disable-Feature:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype off
# Enables Hyper-V - requires restart
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype auto
tolga-ercan-scs commented 4 years ago

Looks fixed in 1.5.3?? I'm not getting errors anymore...

Anoian commented 2 years ago

EDIT: Actually after testing it again today, removing this setting just makes it flaky. It still sometimes crashes. I am still searching for a solution, this does not seem to be the one, i am sorry :/

Disregarding version numbers, i saw the exact same log messages with intelephense, too.

After trying literally everything that came to my mind and what i could find on the internet, i started playing around with vscode settings to find out if they are maybe the issue and i really don't understand how this is even possible, but for me the issue was the vscode setting:

"editor.fontLigatures": true

After i removed this setting, the indexing worked again, however it takes a very long time, but i guess that is normal behavior. (about 3 Minutes for probably an average sized project)