forcedotcom / salesforcedx-vscode-slds

BSD 3-Clause "New" or "Revised" License
27 stars 11 forks source link

Request textDocument/codeAction failed. - Error thrown when hovering over test failure in editor #107

Open Seadog18 opened 1 year ago

Seadog18 commented 1 year ago

After running test suite, hovering over the red-underlined failing element (see screenshot 1) results in SLDS Validator extension throwing an error to the output tab (see screenshot 2).

SLDS Validator version v1.4.8 VSCode version 1.73.1 (Universal) MacOS Ventura 13.1

Screenshot 2022-11-27 at 9 36 58 PM Screenshot 2022-11-27 at 9 39 05 PM

Content of error message:


  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:645)
    at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NullPointerException
    at com.salesforce.slds.lsp.codeactions.CodeActionConverter.process(CodeActionConverter.java:241)
    at com.salesforce.slds.lsp.codeactions.CodeActionConverter.lambda$convert$0(CodeActionConverter.java:53)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
    at com.salesforce.slds.lsp.codeactions.CodeActionConverter.convert(CodeActionConverter.java:75)
    at com.salesforce.slds.lsp.services.TextDocumentServiceImpl.lambda$codeAction$0(TextDocumentServiceImpl.java:48)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)
    ... 6 more``` 
steinwinde commented 1 year ago

Facing the same Exception again and again on VS Code 1.84.0, SLDS Validator v1.4.8, after clicking on "Run Test" or "Debug Test" of Jest tests and then hovering over the line with the error. Nothing has changed in the "Content of error message".