You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⋊>~ which elixir
/Users/jbrayton/.asdf/shims/elixir
Operating system: macOS Big Sur
How have you started Livebook (mix phx.server, livebook CLI, Docker, etc): macOS app
Livebook version (use git rev-parse HEAD if running with mix): 0.5.0
Browsers that reproduce this bug (the more the merrier): Chrome
Include what is logged in the browser console:
[Report Only] Refused to create a worker from 'http://localhost:8080/js/editor.worker.js' because it violates the following Content Security Policy directive: "worker-src 'none'".
This only happens on page load so I don't think it's relevant as nothing is emitted to the console when cleared.
Include what is logged to the server console:
Current behavior
Open the Elixir and Livebook notebook.
Click Evaluate under the section Autocompletion to evaluate the hello world Elixir code.
The error message Failed to setup runtime - no Elixir executable found in PATH is emitted.
Expected behavior
"Hello world" is output.
Workarounds tried
Configuring the Runtime settings for Embedded, code like Hello world executes but Mix.install fails with
** (UndefinedFunctionError) functionMix.install/1 is undefined (module Mix is not available)
Mix.install([kino: "~> 0.5.0"])
Configuring the Runtime settings for Attached node, the rest of the notebook executes as expected.
Summary
I'm pretty sure the cli launches as a current user context but the application seems to only resolve system-wide paths, likely due to Big Sur's sandboxing. The attached node works because I'm executing the elixir process instead of the app.
The function that triggers the error is find_elixir_executable/0 and if I could get System.find_executable("elixir") to return the ASDF shim then I suspect it would function as expected.
I could personally use a system-wide elixir install but it would be beneficial to avoid this if possible.
The text was updated successfully, but these errors were encountered:
We actually want to embed both Elixir and Erlang inside the release/app. Here is the plan:
Embed the release with include_erts: false
Copy Erlang into the release
Copy Elixir into the release
Add both to the path before starting Livebook
Copying Erlang into the release is relatively straight-forward and it is a matter of doing the steps here plus copying all applications in lib.
Copying Elixir there is no recipe but it shouldn't be complicated either. We can also just unpack the precompiled Elixir file.
Both of those steps could be done before invoking the app builder. All the app builder needs to know are the additional paths it needs to add before calling the executable.
Environment
git rev-parse HEAD
if running with mix): 0.5.0This only happens on page load so I don't think it's relevant as nothing is emitted to the console when cleared.
Current behavior
Elixir and Livebook
notebook.Evaluate
under the sectionAutocompletion
to evaluate the hello world Elixir code.Failed to setup runtime - no Elixir executable found in PATH
is emitted.Expected behavior
"Hello world"
is output.Workarounds tried
Runtime settings
forEmbedded
, code like Hello world executes butMix.install
fails withRuntime settings
forAttached node
, the rest of the notebook executes as expected.Summary
I'm pretty sure the cli launches as a current user context but the application seems to only resolve system-wide paths, likely due to Big Sur's sandboxing. The attached node works because I'm executing the elixir process instead of the app.
The function that triggers the error is find_elixir_executable/0 and if I could get
System.find_executable("elixir")
to return the ASDF shim then I suspect it would function as expected.I could personally use a system-wide elixir install but it would be beneficial to avoid this if possible.
The text was updated successfully, but these errors were encountered: