dvic
Observer in iex -S mix error: (UndefinedFunctionError) function :wx_object.start/3 is undefined
Is there a known issue with :observer with Elixir 1.15 that I’m unaware of? I’ve added :observer to :extra_applications but it gives this error:
iex(1)> :observer.start
** (UndefinedFunctionError) function :wx_object.start/3 is undefined (module :wx_object is not available)
:wx_object.start(:observer_wx, [], [])
(observer 2.15.1) observer_wx.erl:70: :observer_wx.start/0
iex:1: (file)
If I start just iex (as opposed to iex -S mix), it works just fine. Is there something else I must add to the mix config?
Marked As Solved
kotolex_23
works for me
extra_applications: [:logger, :wx, :observer, :runtime_tools]
Also Liked
josevalim
I can confirm that, from Erlang/OTP 27, only:
Mix.ensure_application!(:observer)
:observer.start()
is required.
axelson
If you don’t want to modify your application you could also run this in IEx:
Mix.ensure_application!(:wx)
Mix.ensure_application!(:runtime_tools)
Mix.ensure_application!(:observer)
:observer.start()
ppicom
In case it can affect someone else, I had to reinstall Erlang with wx following the steps from this Gihub issue (Unable to install Erlang/OTP 27.1 and 26.2.5.3 on Apple Silicon macOS and Xcode 16.0 · Issue #319 · asdf-vm/asdf-erlang · GitHub), and now I can:
iex -S mix
> Mix.ensure_application! :observer
> :observer.start
josevalim
You need to add :wx to extra applications because it is an optional dependency of :observer. The ensure_application! also considers optional dependencies.
josevalim
I did some tests locally and that did not seem to be required, only Mix.ensure_application!(:observer); :observer.start() from Erlang/OTP 27.







