Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find task after rebuilding dev container #320

Open
chris780 opened this issue Mar 8, 2024 · 2 comments
Open

Unable to find task after rebuilding dev container #320

chris780 opened this issue Mar 8, 2024 · 2 comments

Comments

@chris780
Copy link

chris780 commented Mar 8, 2024

I'm new to Dapr but thanks to the great instructions here, I was able to launch and debug a simple application within my dev container.

However, after rebuilding the dev container, I get the following error when trying to run the app:
image

Re-running the Dapr: Scaffold Dapr Tasks command in VS Code and then reverting the changes it makes to launch.json and tasks.json fixes the issue - that is until the next dev container rebuild.

I have a single launch target set up in launch.json:

{
            "name": "Run User Poller",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceFolder}/cmd/user-poller/main.go",
            "args": [
                "-config=configuration/local.yaml"
            ],
            "console": "integratedTerminal",
            "env": {
                "DAPR_HTTP_PORT": "3502",
                "DAPR_GRPC_PORT": "50002"
            },
            "preLaunchTask": "dapr-debug",
            "postDebugTask": "daprd-down"
        },

My entire tasks.json is as follows:

{
    "version": "2.0.0",
    "tasks": [
        {
            "appId": "app",
            "appPort": 8080,
            "httpPort": 3502,
            "grpcPort": 50002,          
            "label": "dapr-debug",
            "type": "dapr"
        },
        {
            "appId": "app",
            "label": "daprd-down",
            "type": "daprd-down"
        }
    ]
}

Thanks in advance!

@philliphoff
Copy link
Member

@karpikpl If this is still an issue, can you provide a set of repro steps? My guess is that this might be a quirk of the way VS Code loads/refreshes task configurations when rebuilding the dev container--I've seen things like that from time to time, but haven't used dev containers in some time, so I don't know the current state.

@karpikpl
Copy link

karpikpl commented Jun 3, 2024

I think you tagged me by accident? @chris780 reported this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants