devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Does not run at all on my Mac M1

Open peterwwillis opened this issue 2 years ago • 10 comments

What happened?

Went to devpod main page, clicked download button, when downloaded, ran file, copied to Applications folder, opened Launchpad, clicked Devpod. Nothing. Clicked many times, nothing.

What did you expect to happen instead?

....something?

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Download app on a Macbook Pro (16-inch, 2021) Apple M1 Max CPU, MacOS Monterey 12.6.6.
  2. Try to run the app

Local Environment:

  • DevPod Version: v0.1.9
  • Operating System: macOS Monterey 12.6.6
  • ARCH of the OS: ARM64

DevPod Provider:

  • Cloud Provider: google
  • Kubernetes Provider:
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.23.17-gke.2000
  • Local/remote provider: docker
  • Custom provider:

Anything else we need to know?

$ RUST_BACKTRACE=full /Applications/DevPod.app/Contents/MacOS/DevPod
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/runner/.cargo/git/checkouts/fix-path-env-rs-d4399d7a9536d2b2/6c63c49/src/lib.rs:44:62
stack backtrace:
   0:        0x10331fc58 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h819e9cbdf1a9e730
   1:        0x10333e408 - core::fmt::write::ha5e9bf3131ecb7c0
   2:        0x10331b934 - std::io::Write::write_fmt::h414ce9994bf17404
   3:        0x10331fa6c - std::sys_common::backtrace::print::h8072db0bbd5bcc3d
   4:        0x10332136c - std::panicking::default_hook::{{closure}}::h2c85c5b0c2ede151
   5:        0x10332112c - std::panicking::default_hook::hcf2f70992d02f6fe
   6:        0x103321844 - std::panicking::rust_panic_with_hook::h023af7f90b47eb8b
   7:        0x103321738 - std::panicking::begin_panic_handler::{{closure}}::h14283519edc1d634
   8:        0x103320078 - std::sys_common::backtrace::__rust_end_short_backtrace::hc366c0b0cef5b747
   9:        0x10332150c - _rust_begin_unwind
  10:        0x103367258 - core::panicking::panic_fmt::h324f50b29db90195
  11:        0x1033672c8 - core::panicking::panic::h0335fbd7add43117
  12:        0x1030b4458 - fix_path_env::fix_vars::h1497959500be3ec4
  13:        0x102fbe620 - devpod_desktop::main::h30e90acb0874e618
  14:        0x10303e864 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf067c05ed44d88b0
  15:        0x102fab1e4 - std::rt::lang_start::{{closure}}::h6321cd102d1baf37
  16:        0x103316fc8 - std::rt::lang_start_internal::h8ee16b8f6c950a26
  17:        0x102fc12e0 - _main

peterwwillis avatar Jun 14 '23 15:06 peterwwillis

Hey @peterwwillis, thanks for opening the issues, we'll look into it asap

pascalbreuninger avatar Jun 15 '23 05:06 pascalbreuninger

What's the output on your machine if you run echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_\""? Important: Please redact the actual env vars before you paste a response here

pascalbreuninger avatar Jun 15 '23 05:06 pascalbreuninger

I have a similar issue in MacOS Ventura 13.4 (M1 as well), but I can make DevPod launch if I do so from the terminal. Running it from Launchpad does not work at all.

stormqueen1990 avatar Jun 15 '23 14:06 stormqueen1990

@stormqueen1990 super interesting, thanks. I tried to start from launchpad on my machine (m2) as well and that worked fine. I'm very curious what might cause this issue.

We can fix the behaviour by wrapping the library we use for the env vars but that might cause issues down the line so I'd prefer to get to the root of this.

Does starting devpod from the dock work for you?

pascalbreuninger avatar Jun 15 '23 15:06 pascalbreuninger

Does starting devpod from the dock work for you?

Hello there, @pascalbreuninger! 👋

That doesn't work either. Something interesting I found out is that launching from the command line using & to run it in the background also doesn't work. The process immediately stops:

$ ./DevPod &
[1] <pid>

[1]+  Stopped                 ./DevPod

bg 1 absolutely doesn't work and only results in DevPod being stopped again:

$ bg 1
[1]+ ./DevPod &

[1]+  Stopped                 ./DevPod

I can only make it work in the terminal as a foreground process.

Not sure if relevant but I'm using bash as my shell.

stormqueen1990 avatar Jun 15 '23 15:06 stormqueen1990

I found out what the issue is for me. I have a directive in my bashrc to open tmux for any new shell session. Removing that results in DevPod starting up as expected from Launchpad/MacOS dock. That doesn't affect the & issue however (even running outside of tmux doesn't seem to have any kind of effect on that).

stormqueen1990 avatar Jun 15 '23 15:06 stormqueen1990

@stormqueen1990 glad you could resolve one of the issues. Tbh, starting from the terminal in the background isn't too high up on the priority list right now 😅 I'll keep the issue open in case @peterwwillis comes back but if you need background support, please open a separate issue or maybe give it a shot yourself

pascalbreuninger avatar Jun 19 '23 05:06 pascalbreuninger

@pascalbreuninger

What's the output on your machine if you run echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_\""? Important: Please redact the actual env vars before you paste a response here

it just waits for the end of the command...

[user@hostname devspace (main)]$ echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_\""
>
>
> ^C
[user@hostname devspace (main)]$ echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_\""
>
> ^C

were you looking for just all my environment vars from env? if so here's the list, redacted:

ASDF_DIR=/opt/homebrew/opt/asdf/libexec
CLOUDSDK_PYTHON_SITEPACKAGES=1
COLORFGBG=7;0
COLORTERM=truecolor
COMMAND_MODE=unix2003
DISPLAY=/private/tmp/com.apple.launchd.8ufoMQwr6l/org.xquartz:0
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=/Users/REDACTED/bundle.pem
HELM_CACHE_HOME=/Users/REDACTED/.cache/helm
HELM_CONFIG_HOME=/Users/REDACTED/.config/helm
HELM_DATA_HOME=/Users/REDACTED/.local/share/helm
HOME=/Users/REDACTED
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_REPOSITORY=/opt/homebrew
HTTPS_PROXY=http://REDACTED:REDACTED
HTTP_PROXY=http://REDACTED:REDACTED
INFOPATH=/opt/homebrew/share/info:
ITERM_PROFILE=Default
ITERM_SESSION_ID=w0t4p0:47975043-4E81-46F6-AFE4-0862E42E561B
LANG=en_US.UTF-8
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.4.18
LOGNAME=REDACTED
MANPATH=/opt/homebrew/share/man:
NO_PROXY=*.local, *0, *1, *2, *3, *4, *5, *6, *7, *8, *9, 169.254.0.0/16, 10.*.*.*, 10.0/8, REDACTED, 192.168.*.*., 192.168/16, 172.16.0.0/12, REDACTED, *.us-east1.elb.amazonaws.com, localhost, localhost.localdomain, 127.0.0.*, 127.0.0.1
OLDPWD=/Users/REDACTED
PATH=/Users/REDACTED/.kubectx:/Users/REDACTED/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Users/REDACTED/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/REDACTED/perl5/bin:/Users/REDACTED/.krew/bin:/Users/REDACTED/git/PUBLIC/GITHUB.COM/PETERWWILLIS/junkdrawer:/Users/REDACTED/.local/bin:/Users/REDACTED/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
PERL5LIB=/Users/REDACTED/perl5/lib/perl5
PERL_LOCAL_LIB_ROOT=/Users/REDACTED/perl5
PERL_MB_OPT=--install_base "/Users/REDACTED/perl5"
PERL_MM_OPT=INSTALL_BASE=/Users/REDACTED/perl5
PWD=/Users/REDACTED/devspace
REQUESTS_CA_BUNDLE=/Users/REDACTED/bundle.pem
SHELL=/bin/bash
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E3d55GKfPH/Listeners
SSL_CERT_FILE=/Users/REDACTED/bundle.pem
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.4.18
TERM_SESSION_ID=w0t4p0:47975043-4E81-46F6-AFE4-0862E42E561B
TMPDIR=/var/folders/jk/5jpk49vj5_j58_k4vbdr2wl80000gq/T/
USER=REDACTED
USE_GKE_GCLOUD_AUTH_PLUGIN=True
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=/usr/bin/env
__CFBundleIdentifier=com.googlecode.iterm2
__CF_USER_TEXT_ENCODING=0x1F7:0x0:0x0
http_proxy=http://REDACTED:REDACTED
https_proxy=http://REDACTED:REDACTED
no_proxy=*.local, *0, *1, *2, *3, *4, *5, *6, *7, *8, *9, 169.254.0.0/16, 10.*.*.*, 10.0/8, REDACTED, 192.168.*.*., 192.168/16, 172.16.0.0/12, REDACTED, *.us-east1.elb.amazonaws.com, localhost, localhost.localdomain, 127.0.0.*, 127.0.0.1

and for what it's worth:

BASH_VERSINFO=([0]="5" [1]="2" [2]="15" [3]="1" [4]="release" [5]="aarch64-apple-darwin21.6.0")
BASH_VERSION='5.2.15(1)-release'

peterwwillis avatar Jun 20 '23 03:06 peterwwillis

@peterwwillis thanks for testing, I just realized there is one " to many in the command, needs to be echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_". This step is necessary to patch your env vars from your shell into the GUI process. We can catch the panic that happened in your case but this might lead to issues further down the line, so I'd prefer to fix the root cause if possible

pascalbreuninger avatar Jun 21 '23 08:06 pascalbreuninger

@pascalbreuninger that's still not the right command as it now lacks a needed backslash; correct command is:

echo -n \"_SHELL_ENV_DELIMITER_\"; env; echo -n \"_SHELL_ENV_DELIMITER_\"

results:

"_SHELL_ENV_DELIMITER_"SHELL=/bin/bash
ITERM_PROFILE=Default
COLORTERM=truecolor
XPC_FLAGS=0x0
no_proxy=*.local, *0, *1, *2, *3, *4, *5, *6, *7, *8, *9, 169.254.0.0/16, 10.*.*.*, 10.0/8, 192.168.*.*., 192.168/16, 172.16.0.0/12, *.us-east1.elb.amazonaws.com, localhost, localhost.localdomain, 127.0.0.*, 127.0.0.1
TERM_PROGRAM_VERSION=3.4.18
__CFBundleIdentifier=com.googlecode.iterm2
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.kHm7Cy8abx/Listeners
TERM_SESSION_ID=w0t4p0:00EF23FE-FD3F-4A95-8F55-533425771764
HOMEBREW_PREFIX=/opt/homebrew
PWD=/Users/REDACTED
LOGNAME=REDACTED
MANPATH=/opt/homebrew/share/man:
LaunchInstanceID=E61E2ECF-36AE-47E5-9C3E-D5AA2816B860
COMMAND_MODE=unix2003
ITERM_SESSION_ID=w0t4p0:00EF23FE-FD3F-4A95-8F55-533425771764
HOME=/Users/REDACTED
LANG=en_US.UTF-8
SECURITYSESSIONID=186ac
TMPDIR=/var/folders/jk/5jpk49vj5_j58_k4vbdr2wl80000gq/T/
LC_TERMINAL=iTerm2
https_proxy=http://REDACTED:REDACTED
PERL5LIB=/Users/REDACTED/perl5/lib/perl5
INFOPATH=/opt/homebrew/share/info:
HELM_CONFIG_HOME=/Users/REDACTED/.config/helm
TERM=xterm-256color
HELM_CACHE_HOME=/Users/REDACTED/.cache/helm
PERL_MB_OPT=--install_base "/Users/REDACTED/perl5"
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
USER=REDACTED
NO_PROXY=*.local, *0, *1, *2, *3, *4, *5, *6, *7, *8, *9, 169.254.0.0/16, 10.*.*.*, 10.0/8, 192.168.*.*., 192.168/16, 172.16.0.0/12, *.us-east1.elb.amazonaws.com, localhost, localhost.localdomain, 127.0.0.*, 127.0.0.1
COLORFGBG=7;0
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HELM_DATA_HOME=/Users/REDACTED/.local/share/helm
LC_TERMINAL_VERSION=3.4.18
PERL_MM_OPT=INSTALL_BASE=/Users/REDACTED/perl5
DISPLAY=/private/tmp/com.apple.launchd.Bp0FFt0UWc/org.xquartz:0
SHLVL=1
HTTPS_PROXY=http://REDACTED:REDACTED
HTTP_PROXY=http://REDACTED:REDACTED
HOMEBREW_REPOSITORY=/opt/homebrew
http_proxy=http://REDACTED:REDACTED
XPC_SERVICE_NAME=0
SSL_CERT_FILE=/Users/REDACTED/bundle.pem
REQUESTS_CA_BUNDLE=/Users/REDACTED/bundle.pem
CLOUDSDK_PYTHON_SITEPACKAGES=1
PERL_LOCAL_LIB_ROOT=/Users/REDACTED/perl5
PATH=/Users/REDACTED/.kubectx:/Users/REDACTED/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Users/REDACTED/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/REDACTED/perl5/bin:/Users/REDACTED/.krew/bin:/Users/REDACTED/git/PUBLIC/GITHUB.COM/PETERWWILLIS/junkdrawer:/Users/REDACTED/.local/bin:/Users/REDACTED/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=/Users/REDACTED/bundle.pem
USE_GKE_GCLOUD_AUTH_PLUGIN=True
__CF_USER_TEXT_ENCODING=0x1F7:0x0:0x0
TERM_PROGRAM=iTerm.app
_=/usr/bin/env
"_SHELL_ENV_DELIMITER_"

peterwwillis avatar Jun 22 '23 16:06 peterwwillis