Giter VIP home page Giter VIP logo

Comments (4)

peternhale avatar peternhale commented on June 20, 2024 1

@brandbarr Let's try resetting the project store for the language server.

Shutdown vscode
In your project root folder run rm -fr .sfdx/tools/248
Start vscode.

from salesforcedx-vscode.

brandbarr avatar brandbarr commented on June 20, 2024 1

@peternhale - this worked. Appreciate the help. Closing.

from salesforcedx-vscode.

peternhale avatar peternhale commented on June 20, 2024

Hi @brandbarr This appears to be an issue with Apple Sonoma 14.4 on arm processors. Here is an Apple Insiders article that discusses the issue.

from salesforcedx-vscode.

brandbarr avatar brandbarr commented on June 20, 2024

@peternhale - Updated to the latest version of MacOS - 14.4.1 (23E224) which corrects the java error. Getting the same issue.

Logs from 14.4.1

18:28:42.543 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types.
18:28:42.562 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Scanning built-in Apex types.
18:28:42.564 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Collecting built-in standard types from jar
18:28:42.720 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Done collecting built-in standard types from jar
18:28:42.720 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Scanning Apex Standard Library.
18:28:42.860 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Done scanning Apex Standard Library.
18:28:42.861 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Starting ApexIndexer.
18:28:42.862 [ApexIndexer STARTING] INFO  a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Start indexer.
18:28:42.865 [ApexIndexer STARTING] INFO  a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types.
18:28:42.865 [ApexIndexer STARTING] INFO  a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning workspace source.
18:28:43.123 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Error while scanning built-in and system Apex types.
java.lang.IllegalStateException: Expected the service ApexIndexer [FAILED] to be RUNNING, but the service has FAILED
	at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381)
	at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305)
	at com.google.common.util.concurrent.AbstractScheduledService.awaitRunning(AbstractScheduledService.java:456)
	at apex.jorje.lsp.impl.services.ApexPreludeManagedService.startUp(ApexPreludeManagedService.java:157)
	at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
	at com.google.common.util.concurrent.Callables$4.run(Callables.java:121)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.BufferUnderflowException: null
	at java.base/java.nio.CharBuffer.get(CharBuffer.java:798)
	at org.eclipse.jdt.internal.core.nd.db.Chunk.getChars(Chunk.java:286)
	at org.eclipse.jdt.internal.core.nd.db.LongString.getChars(LongString.java:121)
	at org.eclipse.jdt.internal.core.nd.db.LongString.comparePrefix(LongString.java:233)
	at org.eclipse.jdt.internal.core.nd.field.FieldSearchIndex$SearchCriteriaToBtreeVisitorAdapter.compare(FieldSearchIndex.java:130)
	at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:644)
	at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:649)
	at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:649)
	at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:655)
	at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:598)
	at org.eclipse.jdt.internal.core.nd.field.FieldSearchIndex.findAll(FieldSearchIndex.java:266)
	at apex.jorje.lsp.impl.db.nddb.NdApexIndex.fuzzyFindResourceFiles(NdApexIndex.java:271)
	at apex.jorje.lsp.impl.index.ApexIndexer.getApexResourceFiles(ApexIndexer.java:604)
	at apex.jorje.lsp.impl.index.ApexIndexer.getApexIndexerOperationsForUris(ApexIndexer.java:505)
	at apex.jorje.lsp.impl.index.ApexIndexer.startUp(ApexIndexer.java:432)
	at com.google.common.util.concurrent.AbstractScheduledService$ServiceDelegate$2.run(AbstractScheduledService.java:270)
	at com.google.common.util.concurrent.Callables$4.run(Callables.java:121)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	... 1 common frames omitted
18:28:43.128 [pool-1-thread-1] ERROR a.j.l.i.services.ApexLanguageServer - Error trying to initialize the language server
java.lang.IllegalStateException: Expected to be healthy after starting. The following services are not running: {FAILED=[Apex Prelude Service [FAILED]]}
	at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.checkHealthy(ServiceManager.java:769)
	at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.awaitHealthy(ServiceManager.java:581)
	at com.google.common.util.concurrent.ServiceManager.awaitHealthy(ServiceManager.java:295)
	at apex.jorje.lsp.impl.services.ApexLanguageServer.initialize(ApexLanguageServer.java:95)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
	Suppressed: com.google.common.util.concurrent.ServiceManager$FailedService: Apex Prelude Service [FAILED]
	Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Expected the service ApexIndexer [FAILED] to be RUNNING, but the service has FAILED
		at apex.jorje.lsp.impl.services.ApexPreludeManagedService.startUp(ApexPreludeManagedService.java:162)
		at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
		at com.google.common.util.concurrent.Callables$4.run(Callables.java:121)
		at java.base/java.lang.Thread.run(Thread.java:840)
	Caused by: java.lang.IllegalStateException: Expected the service ApexIndexer [FAILED] to be RUNNING, but the service has FAILED
		at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381)
		at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305)
		at com.google.common.util.concurrent.AbstractScheduledService.awaitRunning(AbstractScheduledService.java:456)
		at apex.jorje.lsp.impl.services.ApexPreludeManagedService.startUp(ApexPreludeManagedService.java:157)
		... 3 common frames omitted
	Caused by: java.nio.BufferUnderflowException: null
		at java.base/java.nio.CharBuffer.get(CharBuffer.java:798)
		at org.eclipse.jdt.internal.core.nd.db.Chunk.getChars(Chunk.java:286)
		at org.eclipse.jdt.internal.core.nd.db.LongString.getChars(LongString.java:121)
		at org.eclipse.jdt.internal.core.nd.db.LongString.comparePrefix(LongString.java:233)
		at org.eclipse.jdt.internal.core.nd.field.FieldSearchIndex$SearchCriteriaToBtreeVisitorAdapter.compare(FieldSearchIndex.java:130)
		at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:644)
		at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:649)
		at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:649)
		at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:655)
		at org.eclipse.jdt.internal.core.nd.db.BTree.accept(BTree.java:598)
		at org.eclipse.jdt.internal.core.nd.field.FieldSearchIndex.findAll(FieldSearchIndex.java:266)
		at apex.jorje.lsp.impl.db.nddb.NdApexIndex.fuzzyFindResourceFiles(NdApexIndex.java:271)
		at apex.jorje.lsp.impl.index.ApexIndexer.getApexResourceFiles(ApexIndexer.java:604)
		at apex.jorje.lsp.impl.index.ApexIndexer.getApexIndexerOperationsForUris(ApexIndexer.java:505)
		at apex.jorje.lsp.impl.index.ApexIndexer.startUp(ApexIndexer.java:432)
		at com.google.common.util.concurrent.AbstractScheduledService$ServiceDelegate$2.run(AbstractScheduledService.java:270)
		at com.google.common.util.concurrent.Callables$4.run(Callables.java:121)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
		... 1 common frames omitted
[Error - 6:28:43 PM] Server initialization failed.
TypeError: Cannot read properties of null (reading 'capabilities')
	at Fb.doInitialize (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:165:5812)
	at async Fb.start (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:165:4599)
	at async iue (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:188:5833)
	at async eue (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:188:2919)
	at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)
[Error - 6:28:43 PM] Apex Language Server client: couldn't create connection to server.
TypeError: Cannot read properties of null (reading 'capabilities')
	at Fb.doInitialize (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:165:5812)
	at async Fb.start (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:165:4599)
	at async iue (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:188:5833)
	at async eue (/Users/bb/.vscode/extensions/salesforce.salesforcedx-vscode-apex-60.4.1/dist/index.js:188:2919)
	at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

from salesforcedx-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.