devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Adding AWS Provider throws fatal error "not found, exit status 127"

Open sowhatdoido opened this issue 1 year ago • 3 comments

What happened?
When running devpod provider add aws --debug, a fatal error is thrown.

What did you expect to happen instead?
AWS provider to be added properly

Local Environment:

  • DevPod Version: v0.5.16
  • Operating System: windows
  • ARCH of the OS: i386

DevPod Provider:

  • Cloud Provider: aws

Anything else we need to know?

$ devpod provider add aws --debug
14:03:01 done Successfully installed provider aws
14:03:02 debug Run init provider command: ${AWS_PROVIDER} init
14:03:02 error not found
14:03:02 fatal exit status 127
init
github.com/loft-sh/devpod/cmd/provider.initProvider
        D:/a/devpod/devpod/cmd/provider/use.go:191
github.com/loft-sh/devpod/cmd/provider.setOptions
        D:/a/devpod/devpod/cmd/provider/use.go:164
github.com/loft-sh/devpod/cmd/provider.ConfigureProvider
        D:/a/devpod/devpod/cmd/provider/use.go:99
github.com/loft-sh/devpod/cmd/provider.(*AddCmd).Run
        D:/a/devpod/devpod/cmd/provider/add.go:96
github.com/loft-sh/devpod/cmd/provider.NewAddCmd.func2
        D:/a/devpod/devpod/cmd/provider/add.go:51
github.com/spf13/cobra.(*Command).execute
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:1115
github.com/spf13/cobra.(*Command).Execute
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:1039
github.com/loft-sh/devpod/cmd.Execute
        D:/a/devpod/devpod/cmd/root.go:90
main.main
        D:/a/devpod/devpod/main.go:6
runtime.main
        C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/runtime/proc.go:271
runtime.goexit
        C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1695
configure provider
github.com/loft-sh/devpod/cmd/provider.(*AddCmd).Run
        D:/a/devpod/devpod/cmd/provider/add.go:108
github.com/loft-sh/devpod/cmd/provider.NewAddCmd.func2
        D:/a/devpod/devpod/cmd/provider/add.go:51
github.com/spf13/cobra.(*Command).execute
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:1115
github.com/spf13/cobra.(*Command).Execute
        D:/a/devpod/devpod/vendor/github.com/spf13/cobra/command.go:1039
github.com/loft-sh/devpod/cmd.Execute
        D:/a/devpod/devpod/cmd/root.go:90
main.main
        D:/a/devpod/devpod/main.go:6
runtime.main
        C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/runtime/proc.go:271
runtime.goexit
        C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1695

sowhatdoido avatar Jul 11 '24 21:07 sowhatdoido

Hi @sowhatdoido, thanks for reporting the issue. Is the AWS cli installed and in your PATH?

pascalbreuninger avatar Jul 12 '24 05:07 pascalbreuninger

Why so rude

Waannaabbee avatar Jul 14 '24 09:07 Waannaabbee

Hi @sowhatdoido, thanks for reporting the issue. Is the AWS cli installed and in your PATH?

AWS is installed, I don't see it in my path but where aws

C:\Users\sowhatdoido\AppData\Local\Programs\Python\Python39-32\Scripts\aws
C:\Users\sowhatdoido\AppData\Local\Programs\Python\Python39-32\Scripts\aws.cmd
C:\Program Files\Amazon\AWSCLIV2\aws.exe

and devpod is installed, PATH has C:\Users\sowhatdoido\AppData\Roaming\sh.loft.devpod\bin and where devpod returns

C:\Users\sowhatdoido\AppData\Roaming\sh.loft.devpod\bin\devpod
C:\Users\sowhatdoido\AppData\Roaming\sh.loft.devpod\bin\devpod.cmd

sowhatdoido avatar Jul 19 '24 05:07 sowhatdoido

Hi @sowhatdoido can you add the aws binary to your PATH and try again?

bkneis avatar Oct 04 '24 10:10 bkneis

I added AWS to my path, but it still has the same error message: image

image

I am able to run aws in my terminal without any issues: image

sowhatdoido avatar Oct 05 '24 14:10 sowhatdoido

@sowhatdoido Another user reported something similiar in https://github.com/loft-sh/devpod/issues/1250, could you try the fix there and see if that works for you? Simply wrap the call to DevPod Desktop in a shell, something like

#! /usr/bin/env sh

exec $SHELL -c 'exec /Applications/DevPod.app/Contents/MacOS/DevPod'

bkneis avatar Oct 17 '24 14:10 bkneis

I don't think wrapping a GUI tool in a shell call is a long term fix for this. It's a short term workaround sure, but I'd like to see this get a real fix.

Bak3y avatar Nov 13 '24 16:11 Bak3y

Completely agree, that's why I left this open. I've been closing similar issues to reduce the number of duplicates, since the root cause is the same

bkneis avatar Nov 14 '24 08:11 bkneis

@bkneis, I can't give this a try as I no longer have access to the machine that I reported this problem on. I'm going to close this out, but I can't confirm if this would have solved the problem for me.

sowhatdoido avatar Nov 19 '24 07:11 sowhatdoido

No worries @sowhatdoido, I'm going to keep this open as I only wanted to test a workaround. The root cause is still an issue so will keep open until we can get a fix.

bkneis avatar Nov 19 '24 08:11 bkneis

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jan 19 '25 02:01 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Feb 19 '25 01:02 github-actions[bot]