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

r-notebook kernel crashes because of png support #679

Closed
jeromekelleher opened this issue Jul 20, 2018 · 8 comments
Closed

r-notebook kernel crashes because of png support #679

jeromekelleher opened this issue Jul 20, 2018 · 8 comments
Labels
tag:Upstream A problem with one of the upstream packages installed in the docker images type:Bug A problem with the definition of one of the docker images maintained here

Comments

@jeromekelleher
Copy link

What docker image you are using?

jupyter/r-notebook:latest

What complete docker command do you run to launch the container (omitting sensitive values)?

docker run -p 8888:8888 jupyter/r-notebook

What steps do you take once the container is running to reproduce the issue?

  1. Point my browser at the URL output in the terminal and make a new notebook with an R kernel

  2. Execute any R code in the notebook (e.g. x <- 1), and the kernel crashes.

What do you expect to happen?

The kernel runs.

What actually happens?

The kernel crashes. The logs on the terminal are:

[I 09:08:39.035 NotebookApp] Creating new notebook in 
[I 09:08:39.065 NotebookApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
[I 09:08:39.756 NotebookApp] Kernel started: f5391eb1-3736-419b-be53-483e5c7ca6c6
[W 09:08:39.773 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180720090755 (172.17.0.1) 8.56ms referer=http://127.0.0.1:8888/notebooks/Untitled.ipynb?kernel_name=ir
[I 09:08:40.753 NotebookApp] Adapting to protocol v5.0 for kernel f5391eb1-3736-419b-be53-483e5c7ca6c6
Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  : 
  unable to start device PNG
Calls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device
In addition: Warning message:
In ok_device(filename, ...) : no png support in this version of R
Execution halted
@jeromekelleher
Copy link
Author

This looks like the same issue: IRkernel/IRkernel#388

@jeromekelleher
Copy link
Author

This is probably the root cause: conda-forge/r-base-feedstock#50

@parente
Copy link
Member

parente commented Jul 20, 2018

Thanks for the report and links @jeromekelleher. I believe this is the cause of #668 which I'm going to close as a duplicate.

@parente
Copy link
Member

parente commented Jul 20, 2018

/cc @dirkcgrunwald @nazamy

@parente parente added type:Bug A problem with the definition of one of the docker images maintained here tag:Upstream A problem with one of the upstream packages installed in the docker images labels Jul 20, 2018
@bbrauns
Copy link

bbrauns commented Jul 30, 2018

I get the same error message in our jupyterhub environment:

[I 2018-07-30 06:25:48.723 SingleUserNotebookApp kernelmanager:164] Kernel started: e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c
[I 2018-07-30 06:25:48.725 SingleUserNotebookApp log:122] 201 POST /user/bbrauns/api/sessions (bbrauns@::ffff:172.18.0.4) 55.23ms
[I 2018-07-30 06:25:48.730 SingleUserNotebookApp log:122] 200 GET /user/bbrauns/api/contents/R-Sample.ipynb/checkpoints?_=1532931948828 (bbr18.0.4) 2.97ms
[I 2018-07-30 06:25:50.354 SingleUserNotebookApp handlers:190] Adapting to protocol v5.0 for kernel e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c
[I 2018-07-30 06:25:50.356 SingleUserNotebookApp log:122] 101 GET /user/bbrauns/api/kernels/e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c/channels?secc43540f887a8b0461ebc834e (bbrauns@::ffff:172.18.0.4) 1606.07ms
Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  :
  unable to start device PNG
Calls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device
In addition: Warning message:
In ok_device(filename, ...) : no png support in this version of R
Execution halted
[I 2018-07-30 06:25:51.708 SingleUserNotebookApp restarter:110] KernelRestarter: restarting kernel (1/5), new random ports
kernel e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c restarted

Docker Image:

jupyter/datascience-notebook    latest              ee385992ea10

@Finesim97
Copy link

The capabilities seem to be fixed in the newer versions/builds of R-base. I fixed it for me by removing the version pinnings in the Dockerfile, is a version bump of the R packages an option? According to anaconda: R-Base is the 3.5.0 version, but for example, the forecast version has also to be bumped. Another option seems to be adding the anaconda-forge channel.
conda config --add channels conda-forge
I think the r-base package there is also the one being uploaded manually to the defaults channel. They have a working build for the 3.4.1 version.

The use of the conda-forge channel was also listed as a reason for this commit: Drop the r channel, so I think adding it would be the best option.

@romainx
Copy link
Collaborator

romainx commented Jan 1, 2019

Hello,

I think we could close this issue since the jupyter/r-notebook has been updated (in the PR #789) with the latest version of R-Base (3.5.1) and the kernel does not crash anymore.

$ conda list r-base
# packages in environment at /opt/conda:
#
# Name    Version  Build       Channel
# r-base    3.5.1  h391c2eb_5  conda-forge

@jeromekelleher
Copy link
Author

Thanks @romainx, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:Upstream A problem with one of the upstream packages installed in the docker images type:Bug A problem with the definition of one of the docker images maintained here
Projects
None yet
Development

No branches or pull requests

5 participants