JuliaPluto / PlutoDesktop

Pluto.jl bundled into an easy-to-install desktop app — currently under development
MIT License
44 stars 1 forks source link

[Bug]: Julia depot is read-only in Windows installation #68

Closed ctrekker closed 1 year ago

ctrekker commented 1 year ago

Contact Details

No response

Process where you encountered the bug

Software Installation

Level of issue

Does not cause crash, but is a major issue [severe:s2]

What happened?

When opening PlutoDesktop, Julia attempts to write to the depot's manifest_usage.toml and is denied write permission since the depot is installed into C:\Program Files.

This issue also appears to be related to #64.

Version

0.0.1-alpha

Relevant log output from C:\Users{USER_NAME}\AppData\Roaming\pluto\logs\main.log

2023-04-26 10:10:09.293 verbose general > Executing C:\Program Files\Pluto\resources\assets\julia-1.8.5\bin\julia.exe with options --project=C:\Program Files\Pluto\resources\assets\env_for_julia C:\Program Files\Pluto\resources\assets\run_pluto.jl,,,C:\Users\ctrek\AppData\Roaming\pluto\unsaved_notebooks
2023-04-26 10:10:10.112 error julia > ERROR: 
2023-04-26 10:10:10.139 error julia > LoadError: 
2023-04-26 10:10:11.276 error julia > SystemError: opening file "C:\\Program Files\\Pluto\\resources\\assets\\julia_depot\\logs\\manifest_usage.toml": Permission denied
2023-04-26 10:10:11.277 error julia > 
Stacktrace:
  [1] systemerror(p::
2023-04-26 10:10:11.322 error julia > String, errno
2023-04-26 10:10:11.322 error julia > ::Int32; extrainfo::Nothing)
2023-04-26 10:10:11.323 error julia > 
    @ Base .\error.jl:176

2023-04-26 10:10:11.324 error julia >   [2] #systemerror#80
    @ .\error.jl:175 [inlined]
  [3] systemerror
    @ .\
2023-04-26 10:10:11.326 error julia > error.jl:175 [inlined]
  [4] open(fname::String; lock::Bool, read::
2023-04-26 10:10:11.326 error julia > Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Bool)
    @ Base .\
2023-04-26 10:10:11.327 error julia > iostream.jl:293
  [5] open(f::Pkg.Types.var"#44#46"{String}, args::
2023-04-26 10:10:11.328 error julia > String; kwargs::
2023-04-26 10:10:11.359 error julia > Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:append,), Tuple{Bool}}})

2023-04-26 10:10:11.360 error julia >     @ Base .\io.jl:382
  [6] 
2023-04-26 10:10:11.361 error julia > write_env_usage(source_file::String, usage_filepath::String
2023-04-26 10:10:11.362 error julia > )
    @ Pkg.Types 
2023-04-26 10:10:11.390 error julia > C:\Program Files\Pluto\resources\assets\julia-1.8.5\share\julia\stdlib\v1.8\Pkg\src\Types.jl:487
2023-04-26 10:10:11.391 error julia > 
  [7] 
2023-04-26 10:10:11.556 error julia > Pkg.Types.EnvCache(env::
2023-04-26 10:10:11.557 error julia > Nothing)
    @ Pkg.Types C:\Program Files\Pluto\resources\assets\julia-1.8.5\share\julia\stdlib\v1.8\Pkg\src\
2023-04-26 10:10:11.558 error julia > Types.jl:345
  [8] EnvCache
    @ 
2023-04-26 10:10:11.559 error julia > C:\Program Files\Pluto\resources\assets\julia-1.8.5\share\julia\stdlib\v1.8\Pkg\src\Types.jl:325 [inlined]
  [9] Pkg.Types.Context(
2023-04-26 10:10:11.560 error julia > )
    @ Pkg.Types .\util.jl:493

2023-04-26 10:10:11.561 error julia >  [10] #instantiate#284
    @ C:\Program Files\Pluto\resources\assets\julia-1.8.5\share\julia\stdlib\v1.8\Pkg\src\API.jl:1501 [inlined]
2023-04-26 10:10:11.561 error julia > 
 [11] instantiate()
    @ Pkg.API C:\Program Files\Pluto\resources\assets\julia-1.8.5\share\julia\stdlib\v1.8\Pkg\src\
2023-04-26 10:10:11.562 error julia > API.jl:1501
 [12] top-level scope
    @ C:\Program Files\Pluto\resources\assets\run_pluto.jl:13
in expression starting at C:\Program Files\Pluto\resources\assets\run_pluto.jl:13

2023-04-26 10:10:11.604 info julia > child process exited with code 1

Relevant output from C:\Users{USER_NAME}\AppData\Roaming\pluto\config.json

N/A

Relevant output from C:\Users{USER_NAME}\AppData\Roaming\pluto\userConfig.json

N/A