WGLMakie not initialising when inside Pluto Notebook

WGLMakie is showing failed to initialise error while using pluto notebook. It is working as usual in julia REPL and while I use Pkg.add option inside notebook. The inbuild pluto package manager seems to be causing the issue. While I see the status , Bonito and WGLMakie are failing in the precompile phase.

Precompiling project...
  ✗ Bonito
  ✗ WGLMakie
  0 dependencies successfully precompiled in 22 seconds. 285 already precompiled.

Pkg error!
Precompilation failed

ERROR: The following 1 direct dependency failed to precompile:

WGLMakie 

Failed to precompile WGLMakie [276b4fcb-3e11-5398-bf8b-a0c2d153d008] to "C:\\Users\\Anandhu.Suresh\\.julia\\compiled\\v1.11\\WGLMakie\\jl_5159.tmp".
ERROR: LoadError: Failed to bundle https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.mjs: Warning "deno bundle" is deprecated and will be removed in the future.
Use alternative bundlers like "deno_emit", "esbuild" or "rollup" instead.
Download https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.mjs
Sending fatal alert UnknownCA

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.33.4
Args: ["C:\\Users\\Anandhu.Suresh\\.julia\\artifacts\\1d4894de7a95a1a5da32829c1a02be5fc56d7325\\bin\\deno.exe", "bundle", "https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.mjs"]

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', cli\tools\bundle.rs:78:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] generate_bundle_file(file::String, bundle_file::String)
    @ Bonito C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\asset-serving\asset.jl:155
  [3] Bonito.Asset(path_or_url::String; name::String, es6module::Bool, check_isfile::Bool, bundle_dir::Nothing, mediatype::Symbol)
    @ Bonito C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\asset-serving\asset.jl:177
  [4] ES6Module(path::String)
    @ Bonito C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\asset-serving\asset.jl:195
  [5] top-level scope
    @ C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\components.jl:608
  [6] include(mod::Module, _path::String)
    @ Base .\Base.jl:562
  [7] include(x::String)
    @ Bonito C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\Bonito.jl:1
  [8] top-level scope
    @ C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\Bonito.jl:65
  [9] include
    @ .\Base.jl:562 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base .\loading.jl:2881
 [11] top-level scope
    @ stdin:6
in expression starting at C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\components.jl:608
in expression starting at C:\Users\Anandhu.Suresh\.julia\packages\Bonito\j7uJq\src\Bonito.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile Bonito [824d6782-a2ef-11e9-3a09-e5662e0c26f8] to "C:\\Users\\Anandhu.Suresh\\.julia\\compiled\\v1.11\\Bonito\\jl_53F6.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base .\loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base .\loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\Anandhu.Suresh\.julia\juliaup\julia-1.11.6+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
  [5] #mkpidlock#6
    @ C:\Users\Anandhu.Suresh\.julia\juliaup\julia-1.11.6+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\Anandhu.Suresh\.julia\juliaup\julia-1.11.6+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
  [7] #invokelatest#2
    @ .\essentials.jl:1057 [inlined]
  [8] invokelatest
    @ .\essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:3698
 [10] maybe_cachefile_lock
    @ .\loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2388
 [13] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2375
 [16] macro expansion
    @ .\loading.jl:2314 [inlined]
 [17] macro expansion
    @ .\lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2271
 [19] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2260
 [22] include
    @ .\Base.jl:562 [inlined]
 [23] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base .\loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at C:\Users\Anandhu.Suresh\.julia\packages\WGLMakie\FbMOf\src\WGLMakie.jl:1
in expression starting at stdin:```

This looks like a precompilation/build issue of WGLMakie, unrelated to Pluto. Can you copy the precompilation error message and share it in a WGLMakie issue?

This could happen if you have a spotty connection I suppose.
I just added KaTex as a local dependency, so that it doesn’t need to get downloaded at precompile time.
Will tag a new Bonito version today.

1 Like

It is working everywhere except in Pluto’s automatic package manager. Even inside a Pluto notebook, when I manually add packages. That’s where I assumed that it might be how pluto manages the package dependencies or something in similar lines. Am I missing something?

Before the recent Julia update everything was working perfectly for me. Now even when I use an old version of julia the same error occurs. There is no problem when I use julia scripts (in VSCode) or while I add packages in notebook using Pkg.add. I am also curious as in why this persistently fail to recompile when I use Pluto’s automatic package manager.I did a clean reinstallation of julia to see if something is broken in my local Pluto installation. The error still persists.