dvic

dvic OP

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?

First 10 of 13 Posts Switch mode

LostKobrakai

LostKobrakai

:observer is a module in the :runtime_tools application. You’d need to add the latter.

kotolex_23

kotolex_23

works for me

extra_applications: [:logger, :wx, :observer, :runtime_tools]
dvic

dvic OP

Thanks! I had :runtime_tools but missed :wx, it works!

axelson

axelson

Scenic Core Team

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()
23
Post #4
josevalim

josevalim

Creator of Elixir

I can confirm that, from Erlang/OTP 27, only:

Mix.ensure_application!(:observer)
:observer.start()

is required.

24
Post #5
harrisi

harrisi

This does seem to work, but it’s still necessary to include both :wx and :observer in :extra_applications. Is this intended?

josevalim

josevalim

Creator of Elixir

I did some tests locally and that did not seem to be required, only Mix.ensure_application!(:observer); :observer.start() from Erlang/OTP 27.

harrisi

harrisi

Sorry, I wasn’t very clear. What I mean is that the following works:

$ mix new foo && cd foo
$ iex -S mix
iex> Mix.ensure_application!(:observer); :observer.start()

But this doesn’t:

$ mix new foo && cd foo
$ vim mix.exs # or whatever
# add :observer to :extra_applications list in application/0
$ iex -S mix
iex> :observer.start()

I thought both should work, and the docs for Mix.ensure_application!/1 sort of imply they’re typically functionally equivalent.

josevalim

josevalim

Creator of Elixir

You need to add :wx to extra applications because it is an optional dependency of :observer. The ensure_application! also considers optional dependencies.

ppicom

ppicom

Hi there! :wave:

I might misunderstood what you said there, but despite running Erlang/OTP 27 and Elixir 1.17 it still seems that :observer is not enough:

iex -S mix
iex(1)> Mix.ensure_application!(:observer)
:ok
iex(2)> :observer.start()
** (UndefinedFunctionError) function :wx_object.start/3 is undefined (module :wx_object is not available)
    :wx_object.start(:observer_wx, [], [])
    (observer 2.16) observer_wx.erl:71: :observer_wx.start/0
    iex:2: (file)

From what I understand from this:

Is that Mix.ensure_application!(:observer) should be failing due to :wx not being there. Is that correct?

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
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
spammy
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
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
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
roeland
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
rahultumpala
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 Top

JesseHerrick
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
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
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement