Fl4m3Ph03n1x

Fl4m3Ph03n1x

Cannot run desktop-example-app

Background

I am trying to run the demo app desktop-example-app showed in Elixir Berlin meetup February 2021:

I have followed all the necessary setup steps from the installation guide for Ubuntu:

sudo apt install inotify-tools libtool automake libgmp-dev make libwxgtk-webview3.0-gtk3-dev libssl-dev libncurses5-dev curl git
sudo apt install libjpeg-dev libpng-dev libtiff-dev zlib1g-dev libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libsctp-dev lksctp-tools build-essential libgtk-3-dev libnotify-dev libsecret-1-dev catch

mkdir ~/projects && cd ~/projects
git clone https://github.com/wxWidgets/wxWidgets.git
cd wxWidgets; 
git checkout v3.1.5
./configure --prefix=/usr/local/wxWidgets --enable-clipboard --enable-controls \
      --enable-dataviewctrl --enable-display \
      --enable-dnd --enable-graphics_ctx \
      --enable-std_string --enable-svg \
      --enable-unicode --enable-webview \
      --with-expat --with-libjpeg \
      --with-libpng --with-libtiff \
      --with-opengl --with-zlib \
      --disable-precomp-headers --disable-monolithic

make -j4

And I have the rest of the dependencies installed via asdf in the project:

erlang 24.0
elixir 1.12.2-otp-24
sqlite 3.36.0
nodejs 12.16.1

Problem

The installation went without any issues as far as I can tell. However, when I execute the script ./run to launch the application, I get the following error:

error] Process #PID<0.383.0> terminating
** (exit) {:bad_return, {{TodoApp, :start, [:normal, []]}, {:EXIT, {{:badmatch, {:error, {{:EXIT, {{:badmatch, {:error, {{:undefined_function, {:wxWebView, :new, 0}}, [{:wxe_util, :rec, 1, [file: 'wxe_util.erl', line: 110]}, {Desktop.Fallback, :webview_new, 1, [file: 'lib/desktop/fallback.ex', line: 88]}, {Desktop.Window, :init, 1, [file: 'lib/desktop/window.ex', line: 175]}, {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 404]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}}, [{Desktop.Window, :start_link, 1, [file: 'lib/desktop/window.ex', line: 103]}, {:supervisor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 414]}, {:supervisor, :do_start_child, 2, [file: 'supervisor.erl', line: 400]}, {:supervisor, :handle_start_child, 2, [file: 'supervisor.erl', line: 706]}, {:supervisor, :handle_call, 3, [file: 'supervisor.erl', line: 455]}, {:gen_server, :try_handle_call, 4, [file: 'gen_server.erl', line: 721]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 750]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}, {:child, :undefined, TodoWindow, {Desktop.Window, :start_link, [[app: :todo_app, id: TodoWindow, title: "TodoApp", size: {600, 500}, icon: "icon.png", menubar: TodoApp.MenuBar, icon_menu: TodoApp.Menu, url: &TodoWeb.Endpoint.url/0, app: :todo_app, id: TodoWindow]]}, :permanent, false, 5000, :worker, [Desktop.Window]}}}}, [{TodoApp, :start, 2, [file: 'lib/todo_app.ex', line: 24]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 293]}]}}}}
    (kernel 8.0) application_master.erl:142: :application_master.init/4
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Initial Call: :application_master.init/4
Ancestors: [#PID<0.382.0>]
Message Queue Length: 1
Messages: [{:EXIT, #PID<0.384.0>, :normal}]
Links: [#PID<0.382.0>, #PID<0.44.0>]
Dictionary: []
Trapping Exits: true
Status: :running
Heap Size: 1598
Stack Size: 29
Reductions: 252
** (Mix) Could not start application todo_app: exited in: TodoApp.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {{:EXIT, {{:badmatch, {:error, {{:undefined_function, {:wxWebView, :new, 0}}, [{:wxe_util, :rec, 1, [file: 'wxe_util.erl', line: 110]}, {Desktop.Fallback, :webview_new, 1, [file: 'lib/desktop/fallback.ex', line: 88]}, {Desktop.Window, :init, 1, [file: 'lib/desktop/window.ex', line: 175]}, {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 404]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}}, [{Desktop.Window, :start_link, 1, [file: 'lib/desktop/window.ex', line: 103]}, {:supervisor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 414]}, {:supervisor, :do_start_child, 2, [file: 'supervisor.erl', line: 400]}, {:supervisor, :handle_start_child, 2, [file: 'supervisor.erl', line: 706]}, {:supervisor, :handle_call, 3, [file: 'supervisor.erl', line: 455]}, {:gen_server, :try_handle_call, 4, [file: 'gen_server.erl', line: 721]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 750]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}, {:child, :undefined, TodoWindow, {Desktop.Window, :start_link, [[app: :todo_app, id: TodoWindow, title: "TodoApp", size: {600, 500}, icon: "icon.png", menubar: TodoApp.MenuBar, icon_menu: TodoApp.Menu, url: &TodoWeb.Endpoint.url/0, app: :todo_app, id: TodoWindow]]}, :permanent, false, 5000, :worker, [Desktop.Window]}}}
            (todo_app 0.0.1) lib/todo_app.ex:24: TodoApp.start/2
            (kernel 8.0) application_master.erl:293: :application_master.start_it_old/4

I have wxWidgets installed, but it looks like it can’t find it. This is my OS version:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
(base) pedro:~/Workplace

How can I fix the issue?

Marked As Solved

Fl4m3Ph03n1x

Fl4m3Ph03n1x

I installed everything according to the page. The result wasn’t any better. I also installed and compiled wxWidgets from source and yet nothing.

The one thing that ended up saving me was this discussion:
https://github.com/asdf-vm/asdf-erlang/issues/203

Where they suggest the following commands:

asdf plugin-update --all
asdf install erlang 24.0.1

Indeed, installing version 24.0.1 with asdf fixed the issue for me.

Also Liked

dominicletz

dominicletz

Creator of Elixir Desktop

Great you could solve this! Hopefully, this is going to get easier with forthcoming OTP releases. If you have any further issues/feedback feel free to @mention me directly in a post or send a message on the Elixir slack.

Cheers!

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Other popular topics Top

AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New

We're in Beta

About us Mission Statement