JuliaGizmos / Blink.jl

Web-based GUIs for Julia
Other
355 stars 74 forks source link

` AssertionError: isfile(f)` on Windows 10 with Julia `1.9.1` #311

Closed RoyiAvital closed 11 months ago

RoyiAvital commented 12 months ago

On a clean environment:

julia> using Blink;
ERROR: InitError: AssertionError: isfile(f)
Stacktrace:
  [1] resource
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5 [inlined]
  [2] resource(f::String)
    @ Blink D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5
  [3] macro expansion
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\AtomShell\webio.jl:34 [inlined]
  [4] (::Blink.AtomShell.var"#21#22")()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:346
  [5] __init__()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:341
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1115
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1506
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1783
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
 [11] macro expansion
    @ .\loading.jl:1648 [inlined]
 [12] macro expansion
    @ .\lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
during initialization of module AtomShell

My system is Windows 10 (Fully updated), Julia 1.9.1.

Caught this using Bokeh.jl: https://github.com/cjdoris/Bokeh.jl/issues/26.

pfitzseb commented 12 months ago

What version of Blink is this happening for?

RoyiAvital commented 12 months ago

I guess the latest. I just added it to a fresh environment.

mzaffalon commented 12 months ago

Hit ] and when the prompt changes, type st.

RoyiAvital commented 12 months ago

What I get is: [ad839575] Blink v0.12.8. But I did some operations since the issue.

Why, was it known on other versions?

mzaffalon commented 12 months ago

Not that I know and I cannot reproduce the error.

RoyiAvital commented 12 months ago

Could be pre compilations of 1.9.x thing? I will remove compiled data and recheck.

RoyiAvital commented 12 months ago

I removed everything in .julia\compiled. Still got:

julia> using Blink;
[ Info: Precompiling Blink [ad839575-38b3-5650-b840-f874b8c74a25]
ERROR: InitError: AssertionError: isfile(f)
Stacktrace:
  [1] resource
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5 [inlined]
  [2] resource(f::String)
    @ Blink D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5
  [3] macro expansion
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\AtomShell\webio.jl:34 [inlined]
  [4] (::Blink.AtomShell.var"#21#22")()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:346
  [5] __init__()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:341
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1115
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _tryrequire_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String)
    @ Base .\loading.jl:1442
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1816
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
 [11] macro expansion
    @ .\loading.jl:1648 [inlined]
 [12] macro expansion
    @ .\lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
during initialization of module AtomShell
RoyiAvital commented 11 months ago

OK, I had to clean: artifacts, compiled, packages and scratchspaces. Then installing and precompiling worked.

I guess some issue with the precompilation or something.

jonCAstickel commented 7 months ago

I am experiencing the same error on Ubuntu 22.04. Deleting all of artifacts, compiled, packages, and scratchspaces seems a bit excessive to me as a solution. Any ideas for a more tidy cleanup to resolve this? FWIW, I get no error if I restrict Blink to 0.12.5.

Edit: when downgrading Blink to 0.12.5, using Blink prompted me to build WebIO. Doing that, and then upgrading Blink back to 0.12.8, has resolved the problem for me. Hopefully this helps someone else.