fonsp/pluto-on-binder

Failed to precompile Plots on opening notebook on binder

karthink opened this issue · 3 comments

I used http://pluto-on-binder.glitch.me/ to generate a link to a Pluto notebook, but it failed to run/initialize with this error:

Distributed.ProcessExitedException(2)

The code that generated this error is:

begin
	using Pkg
	Pkg.activate(mktempdir())
	Pkg.add([Pkg.PackageSpec(name="PlutoUI",version="0.7"),
		 Pkg.PackageSpec(name="Plots"),])
	using PlutoUI, Plots
end

The full notebook is here. Am I doing something wrong?


EDIT: I changed this block into two blocks:

begin
	using Pkg
	Pkg.activate(mktempdir())
end

This block ran without error.

begin
	Pkg.add("PlutoUI")
	Pkg.add("Plots")
	using PlutoUI, Plots
end

This block now failed with the following error:

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /srv/julia/pkg/compiled/v1.5/Plots/ld3vC_L1MAE.ji.

error(::String)@error.jl:33
compilecache(::Base.PkgId, ::String)@loading.jl:1305
_require(::Base.PkgId)@loading.jl:1030
require(::Base.PkgId)@loading.jl:928
require(::Module, ::Symbol)@loading.jl:923
top-level scope@Local: 4
fonsp commented

I just ran it again with the updated binder (Julia 1.6.0, Pluto 0.14.1, running on gke2) and I get an error that the registry is corrupted... image

EDIT: it looks like I accidentally opened the notebook twice on the same binder, the Pkg corruption was because of JuliaLang/Pkg.jl#2219

After restarting, I get the same error.

I retried it today and it worked fine! (It appears to be running on Julia 1.6.0.)

I need to share this notebook with a class of students so I want to be sure it runs without errors every time. I'll close this for now. Can I reopen it if it fails again?

fonsp commented

I tried it today and it failed, so let's not close this yet. Unfortunately this means that the system is not entirely stable.

Binder has "mood swings", and the behavior often depends on your location (which binder provider will you connect to? GKE, turing, etc.) and the time of day (how busy are they?).