RamiKrispin / vscode-r

A Tutorial for Setting R Development Environment with VScode, Dev Containers, and Docker
250 stars 31 forks source link

httpgd viewers not working when ./tests/plot.R is run #14

Open jimgar opened 11 months ago

jimgar commented 11 months ago

Hi Rami

Thank you for this interesting tutorial.

I'm in the section Running R code and experiencing some issues.

If I open ./tests/plot.R and run it, XQuartz opens and I get popup windows displaying the data previews and plots.

I cloned the repo and worked through all the other examples up to this point just fine. With this one, I open the repo as the root folder, then build the container. Something appears to go wrong with the postCreateCommand: A terminal launches with Radian as expected, but with the following

Running the postCreateCommand from devcontainer.json...

[4058 ms] Start: Run in container: /bin/sh -c radian
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file '/root/.vscode-R/init.R': No such file or directory
R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Platform: aarch64-unknown-linux-gnu (64-bit)

I'm not sure why it is saying that /root/.vscode-R/init.R doesn't exist, because I can open a bash terminal and cat the file contents.

It also took a while to build, over 20 minutes. This seems particularly long in my experience of using Docker at work, but I don't know if it indicates some sort of problem? I guess there are just a lot of dependencies and steps involved. Rebuilding is practically instantaneous of course but rebuilding without cache resulted in another 20+ min wait.

I noticed that there are a few issues with devcontainer.json and wondered if they could be the cause. I believe one is just a missing comma, but it doesn't make a difference if I put it in or not. And if I follow the other recommendation and put settings into customizations > vscode > settings that also does nothing.

Screenshot 2023-12-30 at 22 46 46

I'm at a loss for how to debug this any further.

I'm on a MacBook Pro with M1 chip, macOS Sonoma 14.0.

My VS Code "about" info:

Version: 1.85.1 (Universal)
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:48:06.308Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.0.0

Output from the build

[24 ms] Dev Containers 0.327.0 in VS Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2).
[24 ms] Start: Resolving Remote
[37 ms] Setting up container for folder or workspace: /Users/jim/git/vscode-r
[37 ms] Context: desktop-linux
[42 ms] Start: Check Docker is running
[42 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[88 ms] Server API version: 1.43
[88 ms] Start: Run: docker volume ls -q
[125 ms] Start: Run: docker inspect --type container 5000fb5edd243238cf6786dfeab73a0c364e26a51b20a00830b1903c5718c624
[161 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/Users/jim/git/vscode-r --filter label=vsch.quality=stable
[196 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r --filter label=devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json
[232 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r
[268 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r
[304 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/jim/.vscode/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/jim/git/vscode-r --id-label devcontainer.local_folder=/Users/jim/git/vscode-r --id-label devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/jim/git/vscode-r/.devcontainer/devcontainer.json --mount-workspace-git-root
[429 ms] @devcontainers/cli 0.54.1. Node.js v18.15.0. darwin 23.0.0 arm64.
[429 ms] Start: Run: git rev-parse --show-cdup
[446 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r --filter label=devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json
[1279 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/jim/.vscode/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/jim/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045 --workspace-folder /Users/jim/git/vscode-r --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/jim/git/vscode-r --id-label devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/jim/git/vscode-r/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[1438 ms] @devcontainers/cli 0.54.1. Node.js v18.15.0. darwin 23.0.0 arm64.
[1438 ms] Start: Run: docker buildx version
[1637 ms] github.com/docker/buildx v0.12.0-desktop.2 c5a13b51c1ae9358eb691e9a21c955590e26d0a0
[1637 ms] 
[1637 ms] Start: Resolving Remote
[1639 ms] Start: Run: git rev-parse --show-cdup
[2141 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r --filter label=devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json
[2213 ms] Start: Run: docker inspect --type image ubuntu:22.04
[2259 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/2p/dkzy9xq90rdbbnfb3k_fnn500000gn/T/devcontainercli/container-features/0.54.1-1703957675676/Dockerfile-with-features -t vsc-vscode-r-1ba15e73de2fab548ff386f800e3073b66d7ecb6df0ce76f2198fc44d8ec1b1e --target dev_containers_target_stage --no-cache --pull --build-arg VENV_NAME=R_ENV --build-arg R_VERSION_MAJOR=4 --build-arg R_VERSION_MINOR=3 --build-arg R_VERSION_PATCH=1 --build-arg CRAN_MIRROR=https://cran.rstudio.com/ --build-arg QUARTO_VER=1.3.450 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/jim/git/vscode-r/.devcontainer
[+] Building 5.9s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
[+] Building 6.1s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
[+] Building 6.1s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.3s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.3s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.5s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.6s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.8s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 6.9s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.1s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.2s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.4s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.5s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.7s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 7.8s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.0s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.1s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.3s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.4s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.5s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.7s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.7s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 8.9s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.0s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.2s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.3s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.5s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.6s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.8s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 9.9s (6/21)                                   docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.1s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.2s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.4s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.5s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.6s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.7s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.9s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 10.9s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.1s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.2s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.3s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.5s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.7s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 11.8s (6/21)                                  docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
[+] Building 1292.3s (23/23) FINISHED                      docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load build definition from Dockerfile-with-features         0.0s
 => => transferring dockerfile: 3.16kB                                     0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04            4.2s
 => [auth] library/ubuntu:pull token for registry-1.docker.io              0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 174B                                          0.0s
 => CACHED [dev_container_auto_added_stage_label  1/16] FROM docker.io/li  0.0s
 => => resolve docker.io/library/ubuntu:22.04@sha256:6042500cf4b44023ea18  0.0s
 => [dev_container_auto_added_stage_label  2/16] RUN apt-get update &&   332.1s
 => [dev_container_auto_added_stage_label  3/16] RUN wget https://cran.rs  6.4s 
 => [dev_container_auto_added_stage_label  4/16] WORKDIR /R-4.3.1          0.0s 
 => [dev_container_auto_added_stage_label  5/16] RUN ./configure --with  266.9s 
 => [dev_container_auto_added_stage_label  6/16] RUN locale-gen en_US.UTF  1.6s 
 => [dev_container_auto_added_stage_label  7/16] WORKDIR /root             0.0s 
 => [dev_container_auto_added_stage_label  8/16] RUN mkdir settings        0.1s 
 => [dev_container_auto_added_stage_label  9/16] COPY packages.json insta  0.0s 
 => [dev_container_auto_added_stage_label 10/16] RUN Rscript ./settings  632.6s 
 => [dev_container_auto_added_stage_label 11/16] RUN bash ./settings/ins  15.9s 
 => [dev_container_auto_added_stage_label 12/16] RUN echo "test"           0.2s 
 => [dev_container_auto_added_stage_label 13/16] RUN echo "test2"          0.1s 
 => [dev_container_auto_added_stage_label 14/16] COPY .Rprofile /root/     0.0s
 => [dev_container_auto_added_stage_label 15/16] RUN python3 -m venv /opt  1.9s
 => [dev_container_auto_added_stage_label 16/16] RUN pip3 install -r ./s  14.6s
 => preparing layers for inline cache                                     15.4s
 => exporting to image                                                     0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:78bfe768e546590140ae9a569c723089377cfe36da369  0.0s
 => => naming to docker.io/library/vsc-vscode-r-1ba15e73de2fab548ff386f80  0.0s
[1294833 ms] Start: Run: docker events --format {{json .}} --filter event=start
[1294836 ms] Start: Starting container
[1294836 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/Users/jim/git/vscode-r,target=/workspaces/vscode-r,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/Users/jim/git/vscode-r -l devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json --env-file .devcontainer/devcontainer.env --entrypoint /bin/sh vsc-vscode-r-1ba15e73de2fab548ff386f800e3073b66d7ecb6df0ce76f2198fc44d8ec1b1e -c echo Container started
Container started
[1295263 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/jim/git/vscode-r --filter label=devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json
[1295319 ms] Start: Run: docker inspect --type container 02cef94137d9
[1295361 ms] Start: Inspecting container
[1295361 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1295403 ms] Start: Run in container: /bin/sh
[1295404 ms] Start: Run in container: uname -m
[1295479 ms] aarch64
[1295479 ms] 
[1295479 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[1295482 ms] PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
[1295482 ms] 
[1295482 ms] Start: Run in container:  (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true)
[1295485 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcEnvironmentMarker'
[1295486 ms] 
[1295486 ms] 
[1295486 ms] Exit code 1
[1295486 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcEnvironmentMarker' ; } 2> /dev/null
[1295488 ms] 
[1295488 ms] 
[1295488 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF'
[1295490 ms] 
[1295490 ms] 
[1295490 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker'
[1295491 ms] 
[1295491 ms] 
[1295491 ms] Exit code 1
[1295491 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcProfileMarker' ; } 2> /dev/null
[1295492 ms] 
[1295492 ms] 
[1295492 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true
[1295494 ms] 
[1295494 ms] 
[1295500 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1295541 ms] Start: Run: docker exec -i -u root 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54 /bin/sh -c echo "New container started. Keep-alive process started." ; export VSCODE_REMOTE_CONTAINERS_SESSION=ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045 ; /bin/sh
[1295542 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/jim/.vscode/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/jim/git/vscode-r --id-label devcontainer.local_folder=/Users/jim/git/vscode-r --id-label devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json --container-id 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54 --log-level debug --log-format json --config /Users/jim/git/vscode-r/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root
[1295599 ms] New container started. Keep-alive process started.
[1295703 ms] @devcontainers/cli 0.54.1. Node.js v18.15.0. darwin 23.0.0 arm64.
[1295703 ms] Start: Run: git rev-parse --show-cdup
[1295726 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1295768 ms] Start: Inspecting container
[1295768 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1295809 ms] Start: Run in container: /bin/sh
[1295810 ms] Start: Run in container: uname -m
[1295897 ms] aarch64
[1295898 ms] 
[1295898 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[1295900 ms] PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
[1295900 ms] 
[1295900 ms] Start: Run in container:  (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true)
[1295902 ms] Start: Run in container: command -v git >/dev/null 2>&1 && cd '/workspaces/vscode-r' && test -d .git && test "$(stat -c %u .)" != "$(id -u)"
[1295908 ms] 
[1295908 ms] 
[1295908 ms] Exit code 1
[1295909 ms] Start: Updating configuration state
[1295912 ms] Start: Setup shutdown monitor
[1295914 ms] Forking shutdown monitor: /Users/jim/.vscode/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/shutdown/shutdownMonitorProcess /var/folders/2p/dkzy9xq90rdbbnfb3k_fnn500000gn/T/vscode-remote-containers-f432da2f-5f22-4cb7-8a95-efa526978ac6.sock singleContainer Debug /Users/jim/Library/Application Support/Code/logs/20231230T130243/window1/exthost/ms-vscode-remote.remote-containers 1703957673418
[1295916 ms] Start: Run in container: test -d /root/.vscode-server
[1295918 ms] 
[1295918 ms] 
[1295918 ms] Exit code 1
[1295918 ms] Start: Run in container: test -d /root/.vscode-remote
[1295920 ms] 
[1295920 ms] 
[1295920 ms] Exit code 1
[1295921 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[1295925 ms] 
[1295925 ms] 
[1295925 ms] Start: Run in container: mkdir -p '/root/.vscode-server/data/Machine' && cat >'/root/.vscode-server/data/Machine/settings.json' <<'settingsJSON'
[1295928 ms] 
[1295928 ms] 
[1295928 ms] 
Support for ARM64 is in preview.

[1295928 ms] Start: Run in container: test -d /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
[1295930 ms] 
[1295930 ms] 
[1295930 ms] Exit code 1
[1295931 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-arm64/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
[1295932 ms] 
[1295933 ms] 
[1295933 ms] Start: Run in container: mkdir -p '/root/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-arm64/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2' '/root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2'
[1295936 ms] 
[1295936 ms] 
[1295936 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-arm64/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2'
[1295936 ms] Start: Launching Dev Containers helper.
[1295936 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-3926b269-860e-40f5-a36e-efd878a8be37.sock) forwarded to local host (/private/tmp/com.apple.launchd.Ke9eBmech6/Listeners).
[1295937 ms] 
[1295937 ms] 
[1295938 ms] Start: Run in container: test -e /tmp/.X11-unix/X0
[1295939 ms] 
[1295939 ms] 
[1295939 ms] Exit code 1
[1295939 ms] Start: Run in container: mkdir -p '/tmp/.X11-unix'
[1295941 ms] 
[1295942 ms] 
[1295942 ms] X11 forwarding: DISPLAY in container (:0) forwarded to local host (/private/tmp/com.apple.launchd.WCwmRD5GAb/org.xquartz:0).
[1295942 ms] Start: Run in container: gpgconf --list-dir agent-socket
[1295944 ms] 
[1295944 ms] /bin/sh: 22: gpgconf: not found
[1295944 ms] Exit code 127
[1295944 ms] gpg-agent: No agent-socket found in container.
[1295945 ms] Start: Run in container: command -v docker >/dev/null 2>&1
[1295947 ms] 
[1295947 ms] 
[1295947 ms] Exit code 127
[1295947 ms] Start: Run in container: /bin/sh
[1295948 ms] userEnvProbe: loginInteractiveShell (default)
[1295948 ms] Start: Run in container: test -f '/tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045/env-loginInteractiveShell.json'
[1295949 ms] Start: Run in container: echo ~
[1295951 ms] 
[1295951 ms] 
[1295951 ms] Exit code 1
[1295951 ms] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh
[1295951 ms] userEnvProbe: not found in cache
[1295951 ms] userEnvProbe shell: /bin/bash
[1295953 ms] ssh not found
[1295954 ms] 
[1295954 ms] Exit code 1
[1295954 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node /tmp/vscode-remote-containers-3926b269-860e-40f5-a36e-efd878a8be37.js git-credential-helper $*; }; f' || true
[1295957 ms] 
[1295957 ms] 
[1295958 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd || echo ; readlink /proc/$pid/ns/mnt || echo ; cat /proc/$pid/stat | tr "
[1295997 ms] Start: Run in container: cat '/root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/product.json'
[1296000 ms] Start: Run in container: cat '/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2' 2>/dev/null || (umask 377 && echo 'bd644f4b-f7e7-4d6b-9643-94c1fe3322f2' >'/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2-570a9afe-6746-4e18-a940-bd1e5b761f8a' && mv -n '/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2-570a9afe-6746-4e18-a940-bd1e5b761f8a' '/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2' && rm -f '/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2-570a9afe-6746-4e18-a940-bd1e5b761f8a' && cat '/root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2')
[1296003 ms] bd644f4b-f7e7-4d6b-9643-94c1fe3322f2
[1296003 ms] 
[1296003 ms] Start: Starting VS Code Server
[1296003 ms] Start: Preparing Extensions
[1296003 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[1296005 ms] 
[1296005 ms] 
[1296006 ms] Extensions cache, install extensions: rdebugger.r-debugger, reditorsupport.r, quarto.quarto, purocean.drawio-preview, redhat.vscode-yaml, yzhang.markdown-all-in-one, ms-azuretools.vscode-docker, ms-vscode-remote.remote-containers, ms-python.python, ms-toolsai.jupyter
[1296006 ms] Start: Run in container: test -d /root/.vscode-server/extensionsCache && ls /root/.vscode-server/extensionsCache || true
[1296008 ms] 
[1296008 ms] 
[1296008 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[1296011 ms] ms-azuretools.vscode-docker-1.28.0
ms-python.python-2023.22.1
ms-python.vscode-pylance-2023.12.1
ms-toolsai.jupyter-2023.11.1003402403-linux-arm64
ms-toolsai.jupyter-keymap-1.1.2
ms-toolsai.jupyter-renderers-1.0.17
ms-toolsai.vscode-jupyter-cell-tags-0.1.8
ms-toolsai.vscode-jupyter-slideshow-0.1.5
ms-vscode-remote.remote-containers-0.327.0
purocean.drawio-preview-0.2.0
quarto.quarto-1.109.0
rdebugger.r-debugger-0.5.4
redhat.vscode-yaml-1.14.0
reditorsupport.r-2.8.2
yzhang.markdown-all-in-one-3.5.1
[1296011 ms] 
[1296011 ms] Extensions cache, link in container: ms-azuretools.vscode-docker-1.28.0, ms-python.python-2023.22.1, ms-toolsai.jupyter-2023.11.1003402403-linux-arm64, ms-toolsai.jupyter-keymap-1.1.2, ms-toolsai.jupyter-renderers-1.0.17, ms-vscode-remote.remote-containers-0.327.0, purocean.drawio-preview-0.2.0, quarto.quarto-1.109.0, rdebugger.r-debugger-0.5.4, redhat.vscode-yaml-1.14.0, reditorsupport.r-2.8.2, yzhang.markdown-all-in-one-3.5.1
[1296011 ms] Start: Run in container: mkdir -p '/root/.vscode-server/extensionsCache' && ln -s '/vscode/vscode-server/extensionsCache'/* '/root/.vscode-server/extensionsCache' || true
[1296016 ms] 
[1296016 ms] 
[1296017 ms] Optimizing extensions for quality: stable
[1296017 ms] Start: Run in container: cd /vscode/vscode-server/extensionsCache && touch 'ms-azuretools.vscode-docker-1.28.0' 'ms-python.python-2023.22.1' 'ms-toolsai.jupyter-2023.11.1003402403-linux-arm64' 'ms-toolsai.jupyter-keymap-1.1.2' 'ms-toolsai.jupyter-renderers-1.0.17' 'ms-vscode-remote.remote-containers-0.327.0' 'purocean.drawio-preview-0.2.0' 'quarto.quarto-1.109.0' 'rdebugger.r-debugger-0.5.4' 'redhat.vscode-yaml-1.14.0' 'reditorsupport.r-2.8.2' 'yzhang.markdown-all-in-one-3.5.1'
[1296017 ms] Start: Run in container: /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/bin/code-server --log debug --force-disable-user-env --server-data-dir /root/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /root/.vscode-server/data/Machine/.connection-token-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 --extensions-download-dir /root/.vscode-server/extensionsCache --install-extension rdebugger.r-debugger --install-extension reditorsupport.r --install-extension quarto.quarto --install-extension purocean.drawio-preview --install-extension redhat.vscode-yaml --install-extension yzhang.markdown-all-in-one --install-extension ms-azuretools.vscode-docker --install-extension ms-vscode-remote.remote-containers --install-extension ms-python.python --install-extension ms-toolsai.jupyter --start-server --disable-websocket-compression
[1296019 ms] 
[1296019 ms] 
[1296054 ms] /root
[1296054 ms] 
[1296054 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-3926b269-860e-40f5-a36e-efd878a8be37.js' >/tmp/vscode-remote-containers-3926b269-860e-40f5-a36e-efd878a8be37.js
[1296056 ms] 
[1296056 ms] 
[1296057 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-3926b269-860e-40f5-a36e-efd878a8be37.js' >/tmp/vscode-remote-containers-server-3926b269-860e-40f5-a36e-efd878a8be37.js_1703958969475
[1296063 ms] 
[1296063 ms] 
[1296192 ms] *
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
[1296196 ms] Server bound to 127.0.0.1:45483 (IPv4)
Extension host agent listening on 45483

[1296197 ms] Start: Run in container: echo 45483 >'/root/.vscode-server/data/Machine/.devport-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2'
[1296198 ms] 
[1296198 ms] 
[1296198 ms] Port forwarding for container port 45483 starts listening on local port.
[1296199 ms] Port forwarding local port 45483 to container port 45483
[1296205 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/jim/.vscode/extensions/ms-vscode-remote.remote-containers-0.327.0/dist/spec-node/devContainersSpecCLI.js run-user-commands --user-data-folder /Users/jim/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045 --workspace-folder /Users/jim/git/vscode-r --id-label devcontainer.local_folder=/Users/jim/git/vscode-r --id-label devcontainer.config_file=/Users/jim/git/vscode-r/.devcontainer/devcontainer.json --container-id 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54 --log-level debug --log-format json --config /Users/jim/git/vscode-r/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands false --prebuild false --stop-for-personalization true --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-3926b269-860e-40f5-a36e-efd878a8be37.sock --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-3926b269-860e-40f5-a36e-efd878a8be37.sock --remote-env DISPLAY=:0 --remote-env REMOTE_CONTAINERS_DISPLAY_SOCK=/tmp/.X11-unix/X0 --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root --terminal-columns 140 --terminal-rows 48 --dotfiles-target-path ~/dotfiles
[1296218 ms] userEnvProbe PATHs:
Probe:     '/opt/R_ENV/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Container: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[1296218 ms] Start: Run in container: mkdir -p '/tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045' && cat > '/tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045/env-loginInteractiveShell.json' << 'envJSON'
[1296220 ms] 
[1296220 ms] 
[1296234 ms] Port forwarding connection from 54137 > 45483 > 45483 in the container.
[1296234 ms] Start: Run in container: /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node -e 
[1296365 ms] [17:56:09] 

[1296386 ms] [17:56:09] Installing extensions...
[1296391 ms] @devcontainers/cli 0.54.1. Node.js v18.15.0. darwin 23.0.0 arm64.
[1296390 ms] Start: Run: docker buildx version
[1296395 ms] [17:56:09] Extension host agent started.
[1296415 ms] Port forwarding 54137 > 45483 > 45483 stderr: Connection established
[1296445 ms] [17:56:09] Started initializing default profile extensions in extensions installation folder. file:///root/.vscode-server/extensions
[1296449 ms] Port forwarding connection from 54141 > 45483 > 45483 in the container.
[1296449 ms] Start: Run in container: /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node -e 
[1296455 ms] [17:56:09] [127.0.0.1][ccb9bf8d][ManagementConnection] New connection established.
[1296456 ms] [17:56:09] ComputeTargetPlatform: linux-arm64
[1296464 ms] [17:56:09] Completed initializing default profile extensions in extensions installation folder. file:///root/.vscode-server/extensions
[1296468 ms] [17:56:09] Log level changed to info
[1296607 ms] Port forwarding 54141 > 45483 > 45483 stderr: Connection established
[1296647 ms] github.com/docker/buildx v0.12.0-desktop.2 c5a13b51c1ae9358eb691e9a21c955590e26d0a0
[1296647 ms] 
[1296649 ms] Start: Run: git rev-parse --show-cdup
[1296670 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1296735 ms] Start: Inspecting container
[1296735 ms] Start: Run: docker inspect --type container 02cef94137d93249b889c43ffb3647bfb4aff4ef55bd13b32920670b47deac54
[1296738 ms] [17:56:10] [127.0.0.1][3405fa4d][ExtensionHostConnection] New connection established.
[1296753 ms] [17:56:10] [127.0.0.1][3405fa4d][ExtensionHostConnection] <266> Launched Extension Host Process.
[1296796 ms] Start: Run in container: /bin/sh
[1296802 ms] Start: Run in container: uname -m
[1296953 ms] aarch64
[1296954 ms] 
[1296954 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[1296959 ms] PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
[1296959 ms] 
[1296960 ms] Start: Run in container:  (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true)
[1296963 ms] userEnvProbe: loginInteractiveShell (default)
[1296963 ms] Start: Run in container: test -f '/tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045/env-loginInteractiveShell.json'
[1296965 ms] 
[1296965 ms] 
[1296965 ms] Start: Run in container: mkdir -p '/root/.devcontainer' && CONTENT="$(cat '/root/.devcontainer/.onCreateCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2023-12-30T17:56:08.34535776Z}" != '2023-12-30T17:56:08.34535776Z' ] && echo '2023-12-30T17:56:08.34535776Z' > '/root/.devcontainer/.onCreateCommandMarker'
[1296970 ms] 
[1296970 ms] 
[1296970 ms] Start: Run in container: cat '/tmp/devcontainers-ec9b96a3-fdf4-4f67-be02-388a8678e34b1703957673045/env-loginInteractiveShell.json'
[1296972 ms] {
        "HOSTNAME": "02cef94137d9",
        "R_VERSION_MAJOR": "4",
        "CRAN_MIRROR": "https://cran.rstudio.com/",
        "REMOTE_CONTAINERS_IPC": "/tmp/vscode-remote-containers-ipc-3926b269-860e-40f5-a36e-efd878a8be37.sock",
        "TZ": "UTC",
        "HOME": "/root",
        "LS_COLORS": "",
        "VIRTUAL_ENV": "/opt/R_ENV",
        "R_VERSION_MINOR": "3",
        "VENV_NAME": "R_ENV",
        "R_VERSION_PATCH": "1",
        "REMOTE_CONTAINERS_SOCKETS": "[\"/tmp/vscode-ssh-auth-3926b269-860e-40f5-a36e-efd878a8be37.sock\",\"/tmp/.X11-unix/X0\"]",
        "SHLVL": "1",
        "QUARTO_VER": "1.3.450",
        "VIRTUAL_ENV_PROMPT": "(R_ENV) ",
        "VAR1": "VAR1",
        "VAR2": "VAR2",
        "PS1": "(R_ENV) ${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ",
        "PATH": "/opt/R_ENV/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "CONFIGURE_OPTIONS": "--with-cairo --with-jpeglib --enable-R-shlib --with-blas --with-lapack",
        "_": "/usr/bin/cat"
}
[1296972 ms] 
[1296972 ms] Start: Run in container: mkdir -p '/root/.devcontainer' && CONTENT="$(cat '/root/.devcontainer/.updateContentCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2023-12-30T17:56:08.34535776Z}" != '2023-12-30T17:56:08.34535776Z' ] && echo '2023-12-30T17:56:08.34535776Z' > '/root/.devcontainer/.updateContentCommandMarker'
[1296976 ms] 
[1296976 ms] 
[1296976 ms] Start: Run in container: mkdir -p '/root/.devcontainer' && CONTENT="$(cat '/root/.devcontainer/.postCreateCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2023-12-30T17:56:08.34535776Z}" != '2023-12-30T17:56:08.34535776Z' ] && echo '2023-12-30T17:56:08.34535776Z' > '/root/.devcontainer/.postCreateCommandMarker'
[1296980 ms] 
[1296980 ms] 
Running the postCreateCommand from devcontainer.json...

[1296980 ms] Start: Run in container: /bin/sh -c radian
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file '/root/.vscode-R/init.R': No such file or directory
R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Platform: aarch64-unknown-linux-gnu (64-bit)

r$> [1300774 ms] [17:56:14] Installing extension 'rdebugger.r-debugger'...
[1300775 ms] [17:56:14] Getting Manifest... rdebugger.r-debugger
[1300853 ms] [17:56:14] Installing extension 'purocean.drawio-preview'...
[1300853 ms] [17:56:14] Getting Manifest... purocean.drawio-preview
[1301000 ms] [17:56:14] Installing extension 'reditorsupport.r'...
[1301001 ms] [17:56:14] Getting Manifest... reditorsupport.r
[1301036 ms] [17:56:14] Installing extension 'redhat.vscode-yaml'...
[1301036 ms] [17:56:14] Getting Manifest... redhat.vscode-yaml
[1301097 ms] [17:56:14] Installing extension 'quarto.quarto'...
[1301097 ms] [17:56:14] Getting Manifest... quarto.quarto
[1301180 ms] [17:56:14] Installing extension 'yzhang.markdown-all-in-one'...
[17:56:14] Getting Manifest... yzhang.markdown-all-in-one
[1301385 ms] [17:56:14] Installing extension 'ms-vscode-remote.remote-containers'...
[1301385 ms] [17:56:14] Getting Manifest... ms-vscode-remote.remote-containers
[1301555 ms] [17:56:14] Installing extension 'ms-python.python'...
[17:56:14] Getting Manifest... ms-python.python
[1301562 ms] [17:56:14] Installing extension: rdebugger.r-debugger
[1301636 ms] [17:56:15] Installing extension 'ms-azuretools.vscode-docker'...
[17:56:15] Getting Manifest... ms-azuretools.vscode-docker
[1301702 ms] [17:56:15] Installing extension 'ms-toolsai.jupyter'...
[17:56:15] Getting Manifest... ms-toolsai.jupyter
[1301724 ms] [17:56:15] Installing extension: redhat.vscode-yaml
[1301872 ms] [17:56:15] Installing extension: purocean.drawio-preview
[1301934 ms] [17:56:15] Installing extension: reditorsupport.r
[1301968 ms] [17:56:15] Installing extension: quarto.quarto
[1302048 ms] [17:56:15] Installing extension: yzhang.markdown-all-in-one
[1302235 ms] [17:56:15] Installing extension: ms-vscode-remote.remote-containers
[1302406 ms] [17:56:15] Installing extension: ms-python.python
[1302477 ms] [17:56:15] Extracted extension to file:///root/.vscode-server/extensions/rdebugger.r-debugger-0.5.4: rdebugger.r-debugger
[1302480 ms] [17:56:15] Renamed to /root/.vscode-server/extensions/rdebugger.r-debugger-0.5.4
[1302482 ms] [17:56:15] Extracting extension completed. rdebugger.r-debugger
[1302488 ms] [17:56:15] Extension installed successfully: rdebugger.r-debugger
[1302489 ms] [17:56:15] Extension 'rdebugger.r-debugger' v0.5.4 was successfully installed.
[1302572 ms] [17:56:15] Extracted extension to file:///root/.vscode-server/extensions/redhat.vscode-yaml-1.14.0: redhat.vscode-yaml
[1302575 ms] [17:56:15] Renamed to /root/.vscode-server/extensions/redhat.vscode-yaml-1.14.0
[1302576 ms] [17:56:15] Extracting extension completed. redhat.vscode-yaml
[1302579 ms] [17:56:15] Extension installed successfully: redhat.vscode-yaml
[1302580 ms] [17:56:15] Extension 'redhat.vscode-yaml' v1.14.0 was successfully installed.
[1302665 ms] [17:56:16] Installing extension: ms-toolsai.jupyter
[1302748 ms] [17:56:16] Installing extension: ms-azuretools.vscode-docker
[1302929 ms] [17:56:16] Extracted extension to file:///root/.vscode-server/extensions/purocean.drawio-preview-0.2.0: purocean.drawio-preview
[1302933 ms] [17:56:16] Renamed to /root/.vscode-server/extensions/purocean.drawio-preview-0.2.0
[1302935 ms] [17:56:16] Extracting extension completed. purocean.drawio-preview
[1302943 ms] [17:56:16] Extension installed successfully: purocean.drawio-preview
[1302944 ms] [17:56:16] Extension 'purocean.drawio-preview' v0.2.0 was successfully installed.
[1302984 ms] [17:56:16] Extracted extension to file:///root/.vscode-server/extensions/yzhang.markdown-all-in-one-3.5.1: yzhang.markdown-all-in-one
[1302987 ms] [17:56:16] Renamed to /root/.vscode-server/extensions/yzhang.markdown-all-in-one-3.5.1
[1302989 ms] [17:56:16] Extracting extension completed. yzhang.markdown-all-in-one
[1302993 ms] [17:56:16] Extension installed successfully: yzhang.markdown-all-in-one
[1302994 ms] [17:56:16] Extension 'yzhang.markdown-all-in-one' v3.5.1 was successfully installed.
[1303152 ms] [17:56:16] Extracted extension to file:///root/.vscode-server/extensions/reditorsupport.r-2.8.2: reditorsupport.r
[1303157 ms] [17:56:16] Renamed to /root/.vscode-server/extensions/reditorsupport.r-2.8.2
[1303159 ms] [17:56:16] Extracting extension completed. reditorsupport.r
[1303164 ms] [17:56:16] Extension installed successfully: reditorsupport.r
[1303165 ms] [17:56:16] Extension 'reditorsupport.r' v2.8.2 was successfully installed.
[1303241 ms] Port forwarding connection from 54202 > 45483 > 45483 in the container.
[1303241 ms] Start: Run in container: /root/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node -e 
[1303350 ms] [17:56:16] Getting Manifest... ms-toolsai.jupyter-keymap
[1303436 ms] Port forwarding 54202 > 45483 > 45483 stderr: Connection established
[1303465 ms] [17:56:16] Extracted extension to file:///root/.vscode-server/extensions/ms-vscode-remote.remote-containers-0.327.0: ms-vscode-remote.remote-containers
[1303471 ms] [17:56:16] Renamed to /root/.vscode-server/extensions/ms-vscode-remote.remote-containers-0.327.0
[1303478 ms] [17:56:16] Extracting extension completed. ms-vscode-remote.remote-containers
[1303486 ms] [17:56:16] Extension installed successfully: ms-vscode-remote.remote-containers
[1303487 ms] [17:56:16] Extension 'ms-vscode-remote.remote-containers' v0.327.0 was successfully installed.
[1303591 ms] [17:56:17] Extracted extension to file:///root/.vscode-server/extensions/quarto.quarto-1.109.0: quarto.quarto
[1303593 ms] [17:56:17] Renamed to /root/.vscode-server/extensions/quarto.quarto-1.109.0
[1303594 ms] [17:56:17] Extracting extension completed. quarto.quarto
[1303596 ms] [17:56:17] Extension installed successfully: quarto.quarto
[1303598 ms] [17:56:17] Extension 'quarto.quarto' v1.109.0 was successfully installed.
[1304021 ms] [17:56:17] Getting Manifest... ms-toolsai.jupyter-renderers
[1304681 ms] [17:56:18] Getting Manifest... ms-toolsai.vscode-jupyter-cell-tags
[1304799 ms] [17:56:18] Extracted extension to file:///root/.vscode-server/extensions/ms-azuretools.vscode-docker-1.28.0: ms-azuretools.vscode-docker
[1304803 ms] [17:56:18] Renamed to /root/.vscode-server/extensions/ms-azuretools.vscode-docker-1.28.0
[1304806 ms] [17:56:18] Extracting extension completed. ms-azuretools.vscode-docker
[1304809 ms] [17:56:18] Extension installed successfully: ms-azuretools.vscode-docker
[1304811 ms] [17:56:18] Extension 'ms-azuretools.vscode-docker' v1.28.0 was successfully installed.
[1305238 ms] [17:56:18] Getting Manifest... ms-python.vscode-pylance
[1305398 ms] [17:56:18] Getting Manifest... ms-toolsai.vscode-jupyter-slideshow
[1306059 ms] [17:56:19] Installing extension: ms-toolsai.jupyter-keymap ms-toolsai.jupyter
[17:56:19] Installing extension: ms-toolsai.jupyter-renderers ms-toolsai.jupyter
[1306060 ms] [17:56:19] Installing extension: ms-toolsai.vscode-jupyter-cell-tags ms-toolsai.jupyter
[17:56:19] Installing extension: ms-toolsai.vscode-jupyter-slideshow ms-toolsai.jupyter
[1306226 ms] [17:56:19] Installing extension: ms-python.vscode-pylance ms-python.python
[1306878 ms] [17:56:20] Extracted extension to file:///root/.vscode-server/extensions/ms-toolsai.jupyter-keymap-1.1.2: ms-toolsai.jupyter-keymap
[1306882 ms] [17:56:20] Renamed to /root/.vscode-server/extensions/ms-toolsai.jupyter-keymap-1.1.2
[1306885 ms] [17:56:20] Extracting extension completed. ms-toolsai.jupyter-keymap
[1306900 ms] [17:56:20] Extracted extension to file:///root/.vscode-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.5: ms-toolsai.vscode-jupyter-slideshow
[1306902 ms] [17:56:20] Renamed to /root/.vscode-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.5
[1306905 ms] [17:56:20] Extracting extension completed. ms-toolsai.vscode-jupyter-slideshow
[1306922 ms] [17:56:20] Extracted extension to file:///root/.vscode-server/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.8: ms-toolsai.vscode-jupyter-cell-tags
[1306925 ms] [17:56:20] Renamed to /root/.vscode-server/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.8
[1306926 ms] [17:56:20] Extracting extension completed. ms-toolsai.vscode-jupyter-cell-tags
[1307136 ms] [17:56:20] Extracted extension to file:///root/.vscode-server/extensions/ms-toolsai.jupyter-renderers-1.0.17: ms-toolsai.jupyter-renderers
[1307138 ms] [17:56:20] Renamed to /root/.vscode-server/extensions/ms-toolsai.jupyter-renderers-1.0.17
[1307139 ms] [17:56:20] Extracting extension completed. ms-toolsai.jupyter-renderers
[1308507 ms] [17:56:21] Extracted extension to file:///root/.vscode-server/extensions/ms-toolsai.jupyter-2023.11.1003402403-linux-arm64: ms-toolsai.jupyter
[1308512 ms] [17:56:21] Renamed to /root/.vscode-server/extensions/ms-toolsai.jupyter-2023.11.1003402403-linux-arm64
[1308517 ms] [17:56:21] Extracting extension completed. ms-toolsai.jupyter
[1308520 ms] [17:56:21] Extension installed successfully: ms-toolsai.jupyter-keymap
[17:56:21] Extension installed successfully: ms-toolsai.vscode-jupyter-slideshow
[17:56:21] Extension installed successfully: ms-toolsai.vscode-jupyter-cell-tags
[17:56:21] Extension installed successfully: ms-toolsai.jupyter-renderers
[17:56:21] Extension installed successfully: ms-toolsai.jupyter
[1308522 ms] [17:56:21] Extension 'ms-toolsai.jupyter' v2023.11.1003402403 was successfully installed.
[1309888 ms] [17:56:23] Extracted extension to file:///root/.vscode-server/extensions/ms-python.python-2023.22.1: ms-python.python
[1309898 ms] [17:56:23] Renamed to /root/.vscode-server/extensions/ms-python.python-2023.22.1
[1309906 ms] [17:56:23] Extracting extension completed. ms-python.python
[1309965 ms] Port forwarding 54202 > 45483 > 45483 stderr: Remote close
[1309989 ms] Port forwarding 54202 > 45483 > 45483 terminated with code 0 and signal null.
[1315598 ms] [17:56:29] Extracted extension to file:///root/.vscode-server/extensions/ms-python.vscode-pylance-2023.12.1: ms-python.vscode-pylance
[1315610 ms] [17:56:29] Renamed to /root/.vscode-server/extensions/ms-python.vscode-pylance-2023.12.1
[1315612 ms] [17:56:29] Extracting extension completed. ms-python.vscode-pylance
[1315615 ms] [17:56:29] Extension installed successfully: ms-python.python
[17:56:29] Extension installed successfully: ms-python.vscode-pylance
[1315617 ms] [17:56:29] Extension 'ms-python.python' v2023.22.1 was successfully installed.
[1315628 ms] Port forwarding 54202 > 45483 > 45483: Local close
RamiKrispin commented 10 months ago

Hi Jim,

The init.R error you are getting is related to the vscode-R extension default path settings and for this open issue #10. I believe that once the .Rprofile file will be set properly that should solve the issue. Meanwhile, could you please check if the below code solve the issue:

# Source: https://github.com/REditorSupport/vscode-R/wiki/Plot-viewer#svg-in-httpgd-webpage
if (interactive() && Sys.getenv("TERM_PROGRAM") == "vscode") {
  if ("httpgd" %in% .packages(all.available = TRUE)) {
    options(vsc.plot = FALSE)
    options(device = function(...) {
      httpgd::hgd(silent = TRUE)
      .vsc.browser(httpgd::hgd_url(history = FALSE), viewer = "Beside")
    })
  }
}
jimgar commented 10 months ago

Hi @RamiKrispin

Thanks for getting back to me.

I ran the above code chunk in the postCreateCommand radian console. Then, I ran plot.R.

I get the following error.

Error in .vsc.browser(httpgd::hgd_url(history = FALSE), viewer = "Beside") : 
  could not find function ".vsc.browser"

XQuartz also opened to show a couple of pages from View(diamonds). No plots appeared.

RamiKrispin commented 10 months ago

Could you please try the following:

Screenshot 2024-01-06 at 21 56 42

Please let me know what you are getting.

jimgar commented 10 months ago

Yeah, that works, I see same as your screenshot and no XQuartz windows

Screenshot 2024-01-07 at 20 27 04
RamiKrispin commented 10 months ago

Great! I am trying to figure out how to solve it, I hope the setting of the.Rprofile will solve it.

RamiKrispin commented 10 months ago

@jimgar I was able to set the .Rprofile, and it should now be stable. If you want to check, an early version is available here, I am going to add documentation and update the tutorial as well.

jimgar commented 10 months ago

That's great @RamiKrispin! I don't have time for the next few days to get back into it, sorry, but please do let me know when the tutorial is all updated. I'll happily run through the whole thing at that point :)

jaredlander commented 5 months ago

I'm getting a similar issue. Sourcing '/root/.vscode-R/init.R' does not result in any of the .vsc.* objects being built. Even if I start a new R session and run source('/root/.vscode-R/init.R'), the objects do not get created. Nor does source('/root/.vscode-server/extensions/reditorsupport.r-2.8.4/R/session/init.R', chdir = TRUE). I have tried it in both R and radian.

Here is my .Rprofile for reference.

if (interactive() && Sys.getenv('TERM_PROGRAM') == 'vscode' && Sys.getenv('RSTUDIO') == '') { 
     source(file.path(Sys.getenv('HOME'), '.vscode-R', 'init.R')) 
     options(vsc.rstudioapi = TRUE) 
     if ('httpgd' %in% .packages(all.available = TRUE)) { 
        options(vsc.plot = FALSE) 
        options(device = function(...) { 
        httpgd::hgd(silent = TRUE) 
        .vsc.browser(httpgd::hgd_url(history = FALSE), viewer = 'Beside') 
        }) 
    } 
}
jaredlander commented 5 months ago

So it seems like the .Rprofile gets run before all the VS Code init files are created, so I fixed this by making sure those init files exist before running R/radian.

# devcontainer/devcontainer.json
"postStartCommand": "until [ -f /root/.vscode-R/init.R ]; do sleep 0.1; done; radian",

Also, I noticed that for the R/radian session created with the container that /root/.Rprofile was not actually executed. There are two good ways to fix this.

  1. Put all the code in ${R_HOME}/etc/Rprofile.site
  2. Specify the .Rprofile location in an environment variable in the "containerEnv" part of devcontainer/devcontainer.json: "R_PROFILE_USER": "/root/.Rprofile"