-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot reopen the App on Unbuntu 22.04 #21
Comments
Hm, unfortunately I can't reproduce that. I've updated some dependencies including desktop_deployment which does the actual binary generation. Can you try again with that? Also if the issues persists is there anything suspicious in the |
My linux laptop doesn't have Erlang or Elixir installed. I hope this isn't what makes the difference.
Will try later when I finish my workday or maybe during lunch time.
Will check them 👍 |
I have updated the git repo, removed The problem from the logs is that the port is already in use. This is because when I close the the TodoApp window, the server continues to run, and when I click the icon of the TodoApp again it tries to start the server with the same port. Shouldn't the Elixir server close when the the app window is closed? Relevant logs bit:
With the TodoApp window visible:
After closing the TodoApp window:
Both outputs have the same PIDs for the TodoApp. The only difference on the output is the PID for the grep command. |
If you start the app in dev mode with |
I can also replicate the issue with your app downloaded from https://diode.io/download/ |
I noticed that the app adds a menu bar and task bar icon from where I can quit and reopen the app later, but this isn't what I am using to close the app window. Just to be sure we are on the same page, by closing the window, I mean clicking in the |
Maybe the problem is because you only shutdown the server on a Code here: if taskbar == nil do
OS.shutdown()
{:noreply, ui}
else
:wxFrame.hide(frame)
{:noreply, ui}
end |
Yeah, the logic is that when there is a taskbar icon defined, then closing the window doesn't exit the app. But when there is no taskbar icon you should get the behavior you want. In case you want both e.g. have a taskbar icon but also close the app when the only window is closed, then we would need to expose a new configuration for that I think. For our diode.io app - what we're doing in addition though is that we're using epmd to find the running instance and bring it to the front when there is an attempt to open another instance. That logic though hasn't made it back to elixir-desktop yet. Now I think it would be nicer to generalize that away from epmd and instead use the existing http port collision for checking and signalling. (E.g. handle the error you see in the logs and instead ask the running instance to show() the main window again). |
What I reported for the TodoApp can also be replicated in the diode app, therefore what you describe here doesn't work to reopen the Diode app on Linux, after closing it by clicking on the See my comment above:
If you want we can have a Google meet cal for me to show it live with the diode app. |
I can build the release without any issues to create
TodoApp-1.1.0-linux-x86_64.run
, which, when run, will install TodoApp at~/TodoApp
and run it smoothly.However, if I close the app and then try to reopen it by clicking on the desktop icon or executing it from
~/TodoApp
, I don't get the window to open. To resolve this, I need to executepkill -f TodoApp
, and after a few seconds, TodoApp will start successfully. But, if I close it again, we will encounter the same issue.The text was updated successfully, but these errors were encountered: