redhat-developer / vscode-server-connector

📦 Connects Visual Studio Code to your server adapters and run, deploy apps !!
Eclipse Public License 2.0
56 stars 26 forks source link

ERROR o.j.t.r.s.s.SecureStorageGuardian #601

Closed olkornii closed 8 months ago

olkornii commented 9 months ago

Error during creating local EAP server. The server is created, can be started/stopped, etc. Steps to reproduce:

  1. Install "Red Hat Server Connector"
  2. Create new server -> Use server on disk -> select eap8
  3. "Please provide a secure-storage password..." press Enter -> see output

Error:

4:31:59.595 [onPool-worker-1] ERROR o.j.t.r.s.s.SecureStorageGuardian:144 - org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request client/promptString failed with message: Cancelled by user
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request client/promptString failed with message: Cancelled by user
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
    at org.jboss.tools.rsp.server.secure.SecureStorageGuardian.authenticateClient(SecureStorageGuardian.java:86)
    at org.jboss.tools.rsp.server.secure.SecureStorageGuardian.getSecureStorage(SecureStorageGuardian.java:136)
    at org.jboss.tools.rsp.server.redhat.credentials.RedHatAccessCredentials.getGlobalRedhatUser(RedHatAccessCredentials.java:34)
    at org.jboss.tools.rsp.server.minishift.servertype.impl.CDKServerType.isRedHatUsernameSet(CDKServerType.java:47)
    at org.jboss.tools.rsp.server.minishift.servertype.impl.CDKServerType.fillRequiredAttributes(CDKServerType.java:66)
    at org.jboss.tools.rsp.server.minishift.servertype.BaseMinishiftServerType.getRequiredAttributes(BaseMinishiftServerType.java:34)
    at org.jboss.tools.rsp.server.model.ServerModel.hasSecureAttributes(ServerModel.java:577)
    at org.jboss.tools.rsp.server.model.ServerModel.getAccessibleServerTypes(ServerModel.java:558)
    at org.jboss.tools.rsp.server.ServerManagementServerImpl.getServerTypesSync(ServerManagementServerImpl.java:416)
    at org.jboss.tools.rsp.server.ServerManagementServerImpl.lambda$14(ServerManagementServerImpl.java:412)
    at org.jboss.tools.rsp.server.ServerManagementServerImpl.lambda$37(ServerManagementServerImpl.java:947)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request client/promptString failed with message: Cancelled by user
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
    at org.eclipse.lsp4j.jsonrpc.TracingMessageConsumer.consume(TracingMessageConsumer.java:114)
    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:833)
olkornii commented 9 months ago

@robstryker can I ask you to check it out?

robstryker commented 9 months ago

So... I'm not able to replicate this. When I type something I don't get that error.

If there's no secure file at the time, and I type anything other than the escape button, it will at least recognize my input. It may fail to decrypt the file, though, if the password isn't the same as was used to create the file.

I DO get the error you paste, though, if I press escape.

olkornii commented 9 months ago

@robstryker "When I type something I don't get that error." You don't need to type anything. Check steps to reproduce once more please. Field should be empty, just click "Enter" with empty field.

robstryker commented 8 months ago

I suppose this is intended, but could be improved? A user pressing enter with no content is treated the same a a user pressing escape.

olkornii commented 8 months ago

So is this error a normal behavior?

robstryker commented 8 months ago

I suppose this is normal behavior, though it is debatable whether an error should be logged on the console or not.

olkornii commented 8 months ago

Well, in summary:

  1. pressing "Enter" with an empty field means "Cancel", so the "...Cancelled by User" error makes sense.
  2. in my opinion, this error a bit confuse, so it also makes sense to change it somehow probably.

I'm closing this issue as it is not a bug. Can be reopened if needed or if someone plans to make some changes.