1

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

Kenny
  • 21
  • 1
  • 2

3 Answers3

3

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!

rld
  • 2,603
  • 2
  • 25
  • 39
1

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.

Daniel
  • 2,320
  • 1
  • 14
  • 27
  • Ah thank you for commenting. I did think of deleting one of the installations but was concerned of the ramifications. After reinstalling elixir it looks like it adds both installations so I will give it a shot. Thank you for answering! – Kenny Jan 10 '21 at 14:42
  • I opened an issue awhile back here https://bugs.erlang.org/browse/ERL-1435 because I thought it had something to do with my recent Big Sur upgrade. Even prior to this installers like Brew and ASDF where installing old versions of WXwidgets that resulted in buggy behavior - see this thread here - https://github.com/elixir-lang/elixir/issues/9997 I think there's a cross section between Elixir, Erlang and the people who are writing installers. And that cross section is super confusing to me. FWIW I don't have problems in Linux, but OSX and Observer continue to be problematic. – Gregory Ostermayr Jan 10 '21 at 17:58
1

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