rocker-org / devcontainer-images

R Docker images built with Dev Container Features
https://rocker-project.org/images/devcontainer/images.html
MIT License
12 stars 4 forks source link

R help doesn't work in R terminal #69

Closed royfrancis closed 3 months ago

royfrancis commented 3 months ago

When asking for help from the R terminal using ?, I get the following error: 'Couldn't show help for path:'.

Screenshot 2024-07-10 at 14 44 52

Details:

I am running a docker container (ghcr.io/rocker-org/devcontainer/geospatial:4.4) on a Mac M3. And I have attached to the running container through VS Code Dev Containers extension. I get this error in the R terminal (Maybe Radian?). If I open up a regular terminal and enter R and ask for help, it opens in the terminal itself.

Screenshot 2024-07-10 at 14 47 28

Not really sure if this is related to the container or VS Code or an extension. Anyone else experiencing this? Happy to give more info if needed.

Docker Desktop: 4.30.0
VS Code: 1.91.0
Extensions:
  REditorSupport: 2.8.4
  Dev Containers: 0.375.1
eitsupi commented 3 months ago

I have been using these images for the past several years on Windows and Linux and have never experienced such a situation.

Could it be due to the amd64 emulation of the arm mac? Does the same thing happen when using the arm64 images (such as ghcr.io/rocker-org/devcontainer/r-ver:4.4)? In any case I am unable to use macOS so debugging is not possible.

royfrancis commented 3 months ago

I have always used --platform linux/amd64 to avoid the apple silicon related issues, so i decided to try aarch64 as you suggested.

docker pull ghcr.io/rocker-org/devcontainer/r-ver:4.4
docker run -ti --rm ghcr.io/rocker-org/devcontainer/r-ver:4.4 bash

I see the same.

Screenshot 2024-07-11 at 10 03 29

The web based help is unable to open. If it works for you, then it cannot be an issue with the container. It's probably something to do with my local setup. I am not exactly sure how it's supposed to open. In the viewer? Or somewhere else? Is it a port issue? But, interactive graphics, htmlwidgets, shiny apps etc do work and open up in the viewer.

Screenshot 2024-07-11 at 10 17 03

@eitsupi Would you be able to share a screenshot of how it looks like for you?

eitsupi commented 3 months ago

@royfrancis If my guess is correct, you have misunderstood the use of VS Code Dev Container. Please check the documentation. https://code.visualstudio.com/docs/devcontainers/create-dev-container

You should be able to check with GitHub Codespaces for the correct behavior (I can share screenshots right now). https://github.com/rocker-org/devcontainer-try-r

royfrancis commented 3 months ago

Hmmm.. The examples you have linked uses devcontainer.json to set up some config, install extensions etc.. I just didn't use that for my example. I am not sure if that should make a difference with regard to the issue with R help.

Anyway, I also tried out the Github Codespaces link that you provided. Same result when I ran it in my local installation of VS Code.

Screenshot 2024-07-11 at 20 30 38

But it worked when I ran it in the browser.

Screenshot 2024-07-11 at 20 40 52

So, perhaps it's related to my VS Code installation? Hmmm 🤔

eitsupi commented 3 months ago

Interesting, since it seems to be a VSCode issue, I suggest you ask the question in the VSCode repository.

I will close this repository as it is irrelevant to this repository.