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

Error running devpod with fish: 'fatal didn't receive a result back from agent' #1235

Closed
atlasfoo opened this issue Aug 31, 2024 · 5 comments
Labels

Comments

@atlasfoo
Copy link

What happened?

Downloaded Devpod binaries at official site in .tar.gz format for Manjaro Linux, trying to run a sample devcontainer with local docker provider and it failed immediately. Starting the same devcontainer from vscode works fine.

Stack trace

21:22:22 info Workspace vscode-remote-try-dotnet already exists
21:22:22 debug Acquire workspace lock...
21:22:22 debug Acquired workspace lock...
21:22:22 info Creating devcontainer...
21:22:22 debug Inject and run command: '/usr/local/bin/devpod' helper ssh-server --stdio --debug
21:22:22 debug Attempting to create SSH client
21:22:22 debug Execute command locally
21:22:23 debug SSH client created
21:22:23 debug SSH session created
21:22:23 info Execute SSH server command: fish -c '/usr/local/bin/devpod' agent workspace up --workspace-info '****' --debug
21:22:23 info Use /home/user/.devpod/agent/contexts/default/workspaces/vscode-remote-try-dotnet as workspace dir
21:22:23 debug Connection to SSH Server closed
21:22:23 debug Done executing ssh server helper command
21:22:23 debug Done creating devcontainer
21:22:23 fatal didn't receive a result back from agent

No docker image was downloaded neither a container was created. Docker is accessible for both my user and root.

Local Environment:

  • DevPod Version: v0.5.19
  • Operating System: linux (Manjaro KDE v24.0.7)
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker
@pascalbreuninger
Copy link
Member

Hi @atlasfoo, thanks for reporting this issue.
Could you try to set you default shell to a non-fish one and try again to see if this is the problem please?

@atlasfoo
Copy link
Author

Yep, doing that worked fine.

I've changed my default shell to zsh (using chsh because logging into zsh was not enough) and it worked fine. I could even boot into the container using vscode.

Is there an issue with fish shell?

@pascalbreuninger
Copy link
Member

Perfect, at least there’s a possible remedy.
I’ll leave this ticket open for now in case someone wants to take a stab at it.
we’ve had problem with fish before, I can't remember why specifically though

@atlasfoo
Copy link
Author

atlasfoo commented Sep 6, 2024

I found the problem. It was my custom configuration that I had in my config.fish file where I configured a custom prompt and stuff like that.

It seems that when you have customizations in the file, they run every time a fish -c command is called, so this processes somewhat get on the way of devpod agent workspace up, that is the process that was failing before.

The solution was to move the customizations inside the if status is-interactive case.

From this

if status is-interactive
    # Commands to run in interactive sessions can go here
end
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

# customizations

to this

if status is-interactive
    # Commands to run in interactive sessions can go here
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
    
    # customizations
end

Doing that change the command succeeds when using fish.

devpod up . --debug
20:26:02 info Workspace vscode-remote-try-dotnet already exists
20:26:02 debug Acquire workspace lock...
20:26:02 debug Acquired workspace lock...
20:26:02 info Creating devcontainer...
20:26:02 debug Inject and run command: '/usr/local/bin/devpod' helper ssh-server --stdio --debug
20:26:02 debug Attempting to create SSH client
20:26:02 debug Execute command locally
20:26:02 debug SSH client created
20:26:02 debug SSH session created
20:26:02 info Execute SSH server command: fish -c '/usr/local/bin/devpod' agent workspace up --workspace-info '****' --debug
20:26:02 info Use /home/atlasfoo/.devpod/agent/contexts/default/workspaces/vscode-remote-try-dotnet as workspace dir
20:26:02 debug Created logger
20:26:02 debug Received ping from agent
20:26:02 debug Credentials server started on port 15978...
20:26:03 debug Incoming client connection at /
20:26:03 debug Credentials server started...
20:26:03 debug Workspace Folder already exists /home/atlasfoo/repos/vscode-remote-try-dotnet
20:26:03 debug Workspace exists, skip downloading
20:26:03 debug Using docker command 'docker'
20:26:04 debug execute inject script
20:26:04 debug Received line after pong: done
20:26:04 debug done injecting
20:26:04 debug done inject
20:26:04 debug Done InjectAgentAndExecute
20:26:04 debug Injected into container
20:26:04 debug done exec
20:26:04 info Setup container...
20:26:04 debug Attempting to create SSH client
20:26:04 debug Inject and run command: '/usr/local/bin/devpod' helper ssh-server --stdio --debug
20:26:04 debug SSH client created
20:26:04 debug SSH session created
20:26:04 info Execute SSH server command: bash -c '/usr/local/bin/devpod' agent container setup --setup-info '***' --container-workspace-info '***' --chown-workspace --inject-git-credentials --debug
20:26:04 debug Created logger
20:26:04 debug Received ping from agent
20:26:04 debug Start setting up container...
20:26:04 debug Credentials server started on port 13913...
20:26:05 debug Incoming client connection at /
20:26:05 debug Credentials server started...
20:26:05 debug Patch etc environment & profile...
20:26:05 debug Run lifecycle hooks commands...
20:26:05 debug running user env probe with shell "bash", probe "loginInteractiveShell", user "vscode" and command "cat /proc/self/environ"
20:26:05 debug Done setting up environment
20:26:05 debug Unset setup system credential helper
20:26:05 error unset system credential helper exit status 5
20:26:05 debug Connection to SSH Server closed
20:26:05 debug Done setting up container
20:26:05 debug Done executing ssh server helper command
20:26:05 debug Connection to SSH Server closed
20:26:05 debug Done executing ssh server helper command
20:26:05 debug Done creating devcontainer

So that was it. I´d like to contribute with this annotation in the docs if you like.

Thanks 💪🏼

@atlasfoo atlasfoo changed the title Error running devpod at Manjaro 'fatal didn't receive a result back from agent' Error running devpod with fish: 'fatal didn't receive a result back from agent' Sep 6, 2024
@pascalbreuninger
Copy link
Member

@atlasfoo very cool, thanks for digging in!

I´d like to contribute with this annotation in the docs if you like.

That'd be fantastic! What do you think of a dedicated "linux troubleshooting" page here?
Well strictly speaking other OSs could also use the fish shell but I bet the chances are 95% fish users are on linux

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

No branches or pull requests

4 participants
@bkneis @atlasfoo @pascalbreuninger and others