marcandre
iex errors when trying to output the result of an expression I type in for recent installs of erlang (errors with 26.1 and 26.1 but not 26.0.2).
$ asdf shell erlang 26.0.2
$ iex
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Interactive Elixir (1.15.7) - press Ctrl+C to exit (type h() ENTER for help)
iex> 2 + 2
4
$ asdf shell erlang 26.1
$ iex
Erlang/OTP 26 [erts-14.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Interactive Elixir (1.15.7) - press Ctrl+C to exit (type h() ENTER for help)
iex> 2 + 2
Failed to write log message to stdout, trying stderr
09:26:39.936 [error] GenServer #PID<0.64.0> terminating
** (FunctionClauseError) no function clause matching in :prim_tty.cols/2
(kernel 9.1) prim_tty.erl:980: :prim_tty.cols([{:ansi, "\e[G"}, "\e[35m", 105, 101, 120, 62, "\e[0m", 32, 50, 32, 43, 32, 50], true)
(kernel 9.1) prim_tty.erl:978: :prim_tty."-cols_multiline/4-lc$^0/1-0-"/3
(kernel 9.1) prim_tty.erl:978: :prim_tty.cols_multiline/4
(kernel 9.1) prim_tty.erl:915: :prim_tty.in_view/1
(kernel 9.1) prim_tty.erl:597: :prim_tty.handle_request/2
(kernel 9.1) prim_tty.erl:590: :prim_tty.handle_request/2
(kernel 9.1) user_drv.erl:779: :user_drv.io_request/2
(kernel 9.1) user_drv.erl:828: :user_drv.io_requests/2
Last message: {:EXIT, #PID<0.69.0>, {:function_clause, [{:prim_tty, :cols, [[{:ansi, "\e[G"}, "\e[35m", 105, 101, 120, 62, "\e[0m", 32, 50, 32, 43, 32, 50], true], [file: ~c"prim_tty.erl", line: 980]}, {:prim_tty, :"-cols_multiline/4-lc$^0/1-0-", 3, [file: ~c"prim_tty.erl", line: 978]}, {:prim_tty, :cols_multiline, 4, [file: ~c"prim_tty.erl", line: 978]}, {:prim_tty, :in_view, 1, [file: ~c"prim_tty.erl", line: 915]}, {:prim_tty, :handle_request, 2, [file: ~c"prim_tty.erl", line: 597]}, {:prim_tty, :handle_request, 2, [file: ~c"prim_tty.erl", line: 590]}, {:user_drv, :io_request, 2, [file: ~c"user_drv.erl", line: 779]}, {:user_drv, :io_requests, 2, [file: ~c"user_drv.erl", line: 828]}]}}
State: {:state, :user_sup, :undefined, #PID<0.69.0>, {#PID<0.64.0>, :user_sup}}
I just installed erlang 26.1.2, same effect.
I tried googling the function clause error but didn’t find an exact match.
Everything else seems to function normally.
Any help and hints much appreciated.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
josevalim
I cannot reproduce it locally. Do you have a custom prompt or any IEx configuration?
marcandre
Sometimes I feel very dumb. Turns out I do have a custom .iex.exs, I just didn’t recall creating it.
I have no idea where that comes from. Removing it resolves the issue (of course).
Thank you
josevalim
This is definitely a bug though, we would need to isolate and report it upstream. My guess is that Erlang doesn’t like ANSI in prompts.
AlchemistCamp
I have a similar customized terminal prompt and recently hit this same error (on ubuntu 20.04) after upgrading to OTP-26.
After eliminating the first line that moves the cursor to column 1 and converting the other values to atoms resolved the error for me:
tmock12
I tried this, but without the “move cursor to column 1” when you hit up or down arrows to scroll through history, it seems to continuously build the prompt. (ie: keeps adding additional
to start of prompt)
AlchemistCamp
Yes. I previously had that line in my
.iex.exsfile but it broke functionality after upgrading to OTP 26. By this I mean that hitting up and trying to rerun previous commands failed.Removing the line, IEX is usable, but the UI issue with duplicating
s in the prompt happens. I’m not sure why the
"\e[G"(move cursor to column 1) line broke on OTP 26, and still need to look into it further.AlchemistCamp
I just tested the quoted code above with Elixir 1.17 and OTP 27 and the ANSI CHA line still causes crashes.
However the issue of duplicating
s when the line is removed. I.e., the config you quoted above behaves normally when scrolling through IEX history on current language versions.
AlchemistCamp
As of Elixir 1.17.2-otp-27, this problem resolved for me and I reverted the
default_promptsection of my IEx.configure back to the following: