Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Failed to start go devcontainer #236

Closed
weischermanuel opened this issue Feb 13, 2020 · 8 comments
Closed

Failed to start go devcontainer #236

weischermanuel opened this issue Feb 13, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug go upstream Issue identified as 'upstream' component related (exists outside of VS Code) workaround-exists

Comments

@weischermanuel
Copy link

Issue Type: Bug

Hi,

i'm trying to start a dev container from the example provided by microsoft
https://github.com/Microsoft/vscode-remote-try-go

im getting the following error message

[100739 ms] The command '/bin/sh -c apt-get update     && apt-get -y install --no-install-recommends apt-utils dialog 2>&1     && apt-get -y install git iproute2 procps lsb-release     && mkdir -p /tmp/gotools     && cd /tmp/gotools     && GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1     && GO111MODULE=on go get -v         honnef.co/go/tools/...@latest         golang.org/x/tools/cmd/gorename@latest         golang.org/x/tools/cmd/goimports@latest         golang.org/x/tools/cmd/guru@latest         golang.org/x/lint/golint@latest         github.com/mdempsky/gocode@latest         github.com/cweill/gotests/...@latest         github.com/haya14busa/goplay/cmd/goplay@latest         github.com/sqs/goreturns@latest         github.com/josharian/impl@latest         github.com/davidrjenni/reftools/cmd/fillstruct@latest         github.com/uudashr/gopkgs/cmd/gopkgs@latest          github.com/ramya-rao-a/go-outline@latest          github.com/acroca/go-symbols@latest          github.com/godoctor/
godoctor@latest          github.com/rogpeppe/godef@latest          github.com/zmb3/gogetdoc@latest         github.com/fatih/gomodifytags@latest          github.com/mgechev/revive@latest          github.com/go-delve/delve/cmd/dlv@latest 2>&1     && go get -v github.com/alecthomas/gometalinter 2>&1     && go get -x -d github.com/stamblerre/gocode 2>&1     && go build -o gocode-gomod github.com/stamblerre/gocode     && mv gocode-gomod $GOPATH/bin/     && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 2>&1     && groupadd --gid $USER_GID $USERNAME     && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME     && apt-get install -y sudo     && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME     && chmod 0440 /etc/sudoers.d/$USERNAME     && chmod -R a+w /go/pkg     && apt-get autoremove -y     && apt-get clean -y     && rm -rf /var/lib/apt/lists/* /go/src /tmp/gotools' returned a non-
zero code: 1

[100776 ms] Failed: Building an image from the Dockerfile (this can take a while).
[100778 ms] Command failed: C:\Program Files\Docker\Docker\resources\bin\docker.exe build -f c:\git\go\vscode-remote-try-go\.devcontainer\Dockerfile -t vsc-vscode-remote-try-go-9b871051e418f26c06e7f29e1759bc67 c:\git\go\vscode-remote-try-go\.devcontainer

did you know the problem ? i've updated all the tools like vscode and docker-desktop (windows 10)

VS Code version: Code 1.42.0 (ae08d5460b5a45169385ff3fd44208f431992451, 2020-02-06T10:51:34.058Z)
OS version: Windows_NT x64 10.0.17134
Remote OS version: Linux x64 4.19.76-linuxkit
Fetching remote diagnostics for 'Dev Container: Go Sample' failed.

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 x 3592)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.94GB (4.41GB free)
Process Argv C:\git|
Screen Reader no
VM 0%
Item Value
Remote Dev Container: Alpine 3.10
OS Linux x64 4.19.76-linuxkit
CPUs Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (2 x 3591)
Memory (System) 1.92GB (0.80GB free)
VM 0%

Fetching remote diagnostics for 'Dev Container: Go Sample' failed.

Extensions: none
@Chuxel Chuxel transferred this issue from microsoft/vscode Feb 13, 2020
@Chuxel
Copy link
Member

Chuxel commented Feb 13, 2020

I have seen some issues lately where certain go packages temporarily stopped working and then got fixed again. I will take a closer look

@TaylorBarrick
Copy link

TaylorBarrick commented Feb 13, 2020

It seems like github.com/uudashr/gopkgs/cmd/gopkgs is no longer present. Or not resolving in the same fashion as it did previously.

@TaylorBarrick
Copy link

I pulled that package out temporarily from the Dockerfile and was able to build

@Chuxel
Copy link
Member

Chuxel commented Feb 13, 2020

Yeah it's odd - error I see is:

[2020-02-13T23:06:39.608Z] [PID 70740] [34704 ms] go get: github.com/uudashr/gopkgs/cmd/[email protected] requires
	github.com/uudashr/gopkgs/[email protected] requires
	github.com/uudashr/[email protected]: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

...which implies the package is there (since we use latest and its finding 2.1.0).

@Chuxel
Copy link
Member

Chuxel commented Feb 13, 2020

Yep - there's an upstream issue for the package and a PR to fix it.

Issue: uudashr/gopkgs#22
PR: uudashr/gopkgs#24

@Chuxel Chuxel added bug Issue identified by VS Code Team member as probable bug go upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Feb 13, 2020
@Chuxel
Copy link
Member

Chuxel commented Feb 14, 2020

Latest upstream issue is here: uudashr/gopkgs#25

FWIW, you can tweak the Dockerfile to install the package without using a go module as a tactical solution - the upstream issue appears to be getting some traction, but if it dies I may update the repo with this workaround.

Remove:

        github.com/uudashr/gopkgs/cmd/gopkgs@latest  \

Then update ...

    #
    # Install Go tools w/o module support
    && go get -v github.com/alecthomas/gometalinter 2>&1 \

to...

    && go get -v github.com/alecthomas/gometalinter \
        github.com/uudashr/gopkgs/cmd/gopkgs 2>&1 \

@Chuxel
Copy link
Member

Chuxel commented Feb 18, 2020

The latest on this is that the bad gopkgs version is being cached by the global goproxy. So, to resolve this, updating to "v2" in the URI appears to fix the problem. This has been done in commit 4579be1 since this has been going on too long.

It changes

        github.com/uudashr/gopkgs/cmd/gopkgs@latest  \

to

        github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest  \

@Chuxel
Copy link
Member

Chuxel commented Feb 20, 2020

This workaround is in v0.101.1 of the stable extension and will be in the v0.102.0 insiders version that will be released soon. If you have an existing Dockerfile, make the small update above.

@Chuxel Chuxel closed this as completed Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug go upstream Issue identified as 'upstream' component related (exists outside of VS Code) workaround-exists
Projects
None yet
Development

No branches or pull requests

3 participants