microsoft / vscode-dapr

A Visual Studio Code extension for Dapr development
Other
58 stars 18 forks source link

APPLICATIONS show "The Dapr CLI and runtime do not appear to be installed" #171

Closed john-deng closed 3 years ago

john-deng commented 3 years ago

Issue Type: Bug

  1. Install Dapr vscode extension
  2. Create a donet core app
    dotnet new webapi --no-https --name netcoreapp
  3. Run the app
    dapr run --app-id netcoreapp --dapr-http-port 3500

    Everything works in the command line, but the vsocde extension show the error message "The Dapr CLI and runtime do not appear to be installed "

WARNING: no application command found.
ℹ️  Starting Dapr with id netcoreapp. HTTP Port: 3500. gRPC Port: 61917
ℹ️  Checking if Dapr sidecar is listening on HTTP port 3500
INFO[0000] starting Dapr Runtime -- version 1.1.2 -- commit 3148f36  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] log level set to: info                        app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] metrics server started on :61918/             app_id=netcoreapp instance=Johns-MBP.local scope=dapr.metrics type=log ver=1.1.2
INFO[0000] standalone mode configured                    app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] app id: netcoreapp                            app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] mTLS is disabled. Skipping certificate request and tls validation  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] local service entry announced: netcoreapp -> 172.20.10.4:61922  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.contrib type=log ver=1.1.2
INFO[0000] Initialized name resolution to standalone     app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] component loaded. name: pubsub, type: pubsub.redis/v1  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] waiting for all outstanding components to be processed  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] component loaded. name: statestore, type: state.redis/v1  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] all outstanding components processed          app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] enabled gRPC tracing middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.grpc.api type=log ver=1.1.2
INFO[0000] enabled gRPC metrics middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.grpc.api type=log ver=1.1.2
INFO[0000] API gRPC server is running on port 61917      app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] enabled metrics http middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.http type=log ver=1.1.2
INFO[0000] enabled tracing http middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.http type=log ver=1.1.2
INFO[0000] http server is running on port 3500           app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] The request body size parameter is: 4         app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] enabled gRPC tracing middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.grpc.internal type=log ver=1.1.2
INFO[0000] enabled gRPC metrics middleware               app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.grpc.internal type=log ver=1.1.2
INFO[0000] internal gRPC server is running on port 61922  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.actor type=log ver=1.1.2
WARN[0000] failed to read from bindings: app channel not initialized   app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
INFO[0000] dapr initialized. Status: Running. Init Elapsed 7.381ms  app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime type=log ver=1.1.2
ℹ️  Checking if Dapr sidecar is listening on GRPC port 61917
ℹ️  Dapr sidecar is up and running.
✅  You're up and running! Dapr logs will appear here.

INFO[0002] placement tables updated, version: 0          app_id=netcoreapp instance=Johns-MBP.local scope=dapr.runtime.actor.internal.placement type=log ver=1.1.2

image

Extension version: 0.4.0 VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:44:30.902Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.09GB free)| |Process Argv|. --crash-reporter-id 109d37ad-8415-4725-be41-0fa7dc3fd14d| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551:30291414 vspre833:30267464 pythonptprofiler:30281270 vshan820:30294714 pythondataviewer:30285071 vscus158:30286553 vscgsv2ct:30307505 vscorehov:30302759 bridgeflight:30302069 vscod805cf:30301675 ```
philliphoff commented 3 years ago

@john-deng What version of Dapr is installed? What's the result of running dapr --version in a terminal window (outside of VS Code)? What's the result of running the command in a terminal window inside of VS Code? (Sometimes we see weird PATH issues on Mac that prevent the extension from finding the Dapr binaries.)

john-deng commented 3 years ago

@philliphoff Here is dapr info in terminal (inside and outside of vscode are the same, both use zsh with ohmyzsh theme)

dapr --version
CLI version: edge
Runtime version: 1.1.2

image

philliphoff commented 3 years ago

Ok, I see the problem; we're trying to parse the CLI version and not recognizing edge as a valid version number. (Is this a locally-built version of the CLI?) I don't know why I did that originally, but I can't think of a reason today why we should be that strict. In any case, I'll designate this as a bug! As a workaround, try using a released/RC version of Dapr (which I suppose isn't really a workaround, but it's the best I have at the moment).

john-deng commented 3 years ago

@philliphoff yes, the cli is built by myself.

philliphoff commented 3 years ago

@john-deng Another workaround, now that I'm thinking about it, would be to modify your local build to generate a semver-compatible version number.

john-deng commented 3 years ago

@philliphoff Great, when will this workaround be available? however, even I downloaded the official binary relase v1.2.0, it still shows that 'No Dapr application are running', here is the screenshot,

image

image

philliphoff commented 3 years ago

Do you see the same thing if you start Dapr using a VS Code daprd task? If not, you might be seeing #169, in which VS Code may not see dapr CLI started sidecars.