Kenny
Kenny

Reputation: 191

wxmac elixir error when trying to run :observer.start in iex

After running :observer.start in iex I received the follwing messages. I tried uninstalling and reinstalling both Elixir and Homebrew but to no avail.

objc[58977]: Class wxNSProgressIndicator is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5e9fc0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1ef61fc0). One of the two will be used. Which one is undefined.

objc[58977]: Class wxNSTableDataSource is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5ea038) and /usr/local/opt/wxmac/lib/libwx_osxzsh: segmentation fault

Upvotes: 1

Views: 546

Answers (3)

rld
rld

Reputation: 2763

I uninstall the wxmac:

brew uninstall wxmac

and reinstalled to build wxmac locally instead of installing already built binary using the extra flag:

brew install --build-from-source wxmac

Update the plugin erlang for asdf:

asdf plugin-update erlang

and then install the last version of the Erlang:

asdf install erlang latest

and now when I try to run the :observer.start() it work's!

Upvotes: 3

Boobalan AP
Boobalan AP

Reputation: 11

Pass extra flag to brew install to build wxmac locally instead of installing already built binary.(There seems to be a bug in bigsur wxmac bottle). Elixir has dependency on Erlang which in turn has dependency on wxmac to show observer window. So execute this first before installing erlang or elixir.

brew install --build-from-source wxmac

Upvotes: 1

Daniel
Daniel

Reputation: 2554

Observer uses WXwidgets to render the window and the controls on your platform. As the error suggests you have 2 installations, not sure how you handle such errors on mac but I suppose deleting one of the versions will solve the error.

To make your life easier, there is now a new option to run observer in browser called Phoenix Live Dashboard that does not require any local renderer dependencies installed.

Upvotes: 1

Related Questions