JuliaGizmos / Blink.jl

Web-based GUIs for Julia
Other
360 stars 75 forks source link

Failed to install PlotlyJS #286

Closed supersrh closed 2 years ago

supersrh commented 2 years ago

Julia-1.6.3, win10 PlotlyJS v0.18.8 Blink v0.12.5

ERROR: Error building `Blink`:
ʹ�á�2���������á�DownloadFile��ʱ�����쳣:���� WebClient �����ڼ䷢���쳣����
����λ�� ��:1 �ַ�: 82
+ ... pe]::Tls12; (new-object net.webclient).DownloadFile("https://github.c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

ERROR: LoadError: failed process: Process(`'C:\Windows\System32\WindowsPowerShell\v1.0\powershell' -NoProfile -Command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadFile("https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-win32-x64.zip", "electron-v4.0.4-win32-x64.zip")'`, ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ .\process.jl:525 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base .\process.jl:440
  [3] run
    @ .\process.jl:438 [inlined]
  [4] download
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:28 [inlined]
  [5] (::Main.BuildBlink.var"#1#2")()
    @ Main.BuildBlink C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:48
  [6] cd(f::Main.BuildBlink.var"#1#2", dir::String)
    @ Base.Filesystem .\file.jl:95
  [7] install()
    @ Main.BuildBlink C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:27
  [8] top-level scope
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\deps\build.jl:14
  [9] include(fname::String)
    @ Base.MainInclude .\client.jl:444
 [10] top-level scope
    @ none:5
in expression starting at C:\Users\shenr\.julia\packages\Blink\mwJC9\deps\build.jl:1

and I tried Blink.AtomShell.install(), but:

使用“2”个参数调用“DownloadFile”时发生异常:“在 WebClient 请求期间发生异常。”
所在位置 行:1 字符: 82
+ ... pe]::Tls12; (new-object net.webclient).DownloadFile("https://github.c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

ERROR: failed process: Process(`'C:\Windows\System32\WindowsPowerShell\v1.0\powershell' -NoProfile -Command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadFile("https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-win32-x64.zip", "electron-v4.0.4-win32-x64.zip")'`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ .\process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base .\process.jl:440
 [3] run
   @ .\process.jl:438 [inlined]
 [4] download
   @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:28 [inlined]
 [5] (::Blink.AtomShell.var"#1#2")()
   @ Blink.AtomShell C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:48
 [6] cd(f::Blink.AtomShell.var"#1#2", dir::String)
   @ Base.Filesystem .\file.jl:95
 [7] install()
   @ Blink.AtomShell C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\install.jl:27

After the interaption of the installation, Pkg.status() can find the PlotlyJS package, but it can not plot image:

julia> plot([1,1])
Error showing value of type PlotlyJS.SyncPlot:
ERROR: Cannot find Electron. Try `Blink.AtomShell.install()`.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] electron
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:70 [inlined]
  [3] init(; debug::Bool)
    @ Blink.AtomShell C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:88
  [4] #shell#9
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:149 [inlined]
  [5] shell
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:144 [inlined]
  [6] #Window#14
    @ C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\window.jl:89 [inlined]
  [7] Blink.AtomShell.Window(args::Dict{String, Int64})
    @ Blink.AtomShell C:\Users\shenr\.julia\packages\Blink\mwJC9\src\AtomShell\window.jl:89
  [8] display_blink(p::PlotlyJS.SyncPlot)
    @ PlotlyJS C:\Users\shenr\.julia\packages\PlotlyJS\4jzLr\src\display.jl:169
  [9] display(#unused#::PlotlyJS.PlotlyJSDisplay, p::PlotlyJS.SyncPlot)
    @ PlotlyJS C:\Users\shenr\.julia\packages\PlotlyJS\4jzLr\src\display.jl:160
 [10] display(x::Any)
    @ Base.Multimedia .\multimedia.jl:328
 [11] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [12] invokelatest
    @ .\essentials.jl:706 [inlined]
 [13] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:247
 [14] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:231
 [15] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:462
 [16] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:229
 [17] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:798
 [18] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [19] invokelatest
    @ .\essentials.jl:706 [inlined]
 [20] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [21] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [22] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:411
mzaffalon commented 2 years ago

I still have this issue on new installations with Julia v1.8 and on Windows (on Linux it works). Was it solved and how?

StefanPofahl commented 2 years ago

I still have this issue on new installations with Julia v1.8. Was it solved and how? Also for me the same issue. Problem is, I cannot use the command: "language-julia.plotpane-disable" (from the vscode julia-add-on).

The installation of "Blink" seem to work: import Pkg; Pkg.add("Blink")

But import.Blink; Blink.AtomShell.install()

fails :-)

mzaffalon commented 2 years ago

It looks like BinDeps.download_cmd fails to download the zipped electron file at https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-win32-x64.zip for Windows. You can manually download this file, unpack it into the directory .julia\packages\Blink\mwJC9\deps\atom (so that this directory contains the folders locales, resources...) and you can use Blink again.

I don't have an Apple computer so I have not tested if this procedure is necessary. If so, the file to download would be https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-darwin-x64.zip.

StefanPofahl commented 2 years ago

Thanks for your help! The folder ~/.julia/packages/Blink/mwJC9/deps/ is there, the sub-folder atom is missing. If I make a folder atom and copy the the zip-file to this new location it is deleted. here my error output:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to open the file electron-v4.0.4-linux-x64.zip: Permission 
Warning: denied
  0 71.6M    0 16375    0     0  55583      0  0:22:31 --:--:--  0:22:31 55583
curl: (23) Failure writing output to destination
ERROR: failed process: Process(`curl -f -o electron-v4.0.4-linux-x64.zip -L https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip`, ProcessExited(23)) [23]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:538 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:453
 [3] run
   @ ./process.jl:451 [inlined]
 [4] download
   @ ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:28 [inlined]
 [5] (::Blink.AtomShell.var"#1#2")()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:65
 [6] cd(f::Blink.AtomShell.var"#1#2", dir::String)
   @ Base.Filesystem ./file.jl:106
 [7] install()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:27
 [8] top-level scope
   @ REPL[3]:1
StefanPofahl commented 2 years ago

Output of include("/home/stefan/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl")

ERROR: ArgumentError: Package BinDeps not found in current path:
- Run `import Pkg; Pkg.add("BinDeps")` to install the BinDeps package.

Stacktrace:
 [1] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:893
 [2] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [3] top-level scope
   @ REPL[6]:1
StefanPofahl commented 2 years ago

Now the error message is:


julia> import.Blink; Blink.AtomShell.install()
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to open the file electron-v4.0.4-linux-x64.zip: Permission 
Warning: denied
  0 71.6M    0  1369    0     0   2205      0  9:27:59 --:--:--  9:27:59  2205
curl: (23) Failure writing output to destination
ERROR: failed process: Process(`curl -f -o electron-v4.0.4-linux-x64.zip -L https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip`, ProcessExited(23)) [23]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:538 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:453
 [3] run
   @ ./process.jl:451 [inlined]
 [4] download
   @ ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:28 [inlined]
 [5] (::Blink.AtomShell.var"#1#2")()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:65
 [6] cd(f::Blink.AtomShell.var"#1#2", dir::String)
   @ Base.Filesystem ./file.jl:106
 [7] install()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:27
 [8] top-level scope
   @ REPL[9]:1
mzaffalon commented 2 years ago

Sorry, I have missed your post.

src/AtomShell/install.jl does nothing else than unzipping electron*.zip into the directory atom and removing the zip file. You can unzip the file manually and it should work.

StefanPofahl commented 2 years ago

Thanks! On my Linux OS downloading: wget https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip and copy the content to the destination folder cured the issue :-) P.S.: once it is operational, you can find the link to the Official Guides