holochain / launcher-tauri

Desktop launcher to install and use Holochain apps locally
262 stars 21 forks source link

Error Launching Holochain #55

Open bhaugen opened 2 years ago

bhaugen commented 2 years ago

Error Launching Holochain This holochain version is not running: LaunchHolochainError(CouldNotConnectToConductor("Connection refused (os error 111)"))

To Reproduce Steps to reproduce the behavior: From https://github.com/lightningrodlabs/rea-playspace

  1. Download and install the latest Holochain Launcher.
  2. Start Launcher
  3. Give it a password
  4. Restart launcher with new password
  5. result: errot message above

Expected behavior A clear and concise description of what you expected to happen.

Follow the prompts until you get to the main screen with the button 'INSTALL NEW APP' then 'SELECT APP FROM FILESTORE'. Select the rea-playspace.webhapp file from the previous step.

Use the default AppId. Select 0.0.136 for the Holochain version to install.

Advanced: If you want to leave the UID option empty, you can. This will connect you to a network with everyone else who has also left the option empty. If you want to create a playspace with only a few others, enter a UID (any string of characters) and share it with them.

Click 'Install App'. Find the app in the Installed Apps view. Click open. This will launch it in the browser.

Logs Please attach here the launcher.log file. To find it, go to Holochain Admin window of the Holochain Launcher, select the Settings menu, and select Open Logs. Attach that file to this issue.

In Ubuntu, there is a weird error that prevents the upload of a file from inside a hidden folder. To work around it, you can copy the launcher.log file to another non-hidden location, and upload it from there. {See launcher log below)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

guillemcordoba commented 2 years ago

Thanks for the report @bhaugen .

Does the issue still persist even after a computer reboot?

bhaugen commented 2 years ago

Does the issue still persist even after a computer reboot?

Nope. Should have tried that immediately. Sorry to waste your time.

guillemcordoba commented 2 years ago

No no you didn't waste my time, this is still an issue...

This is related to children holochain process still being alive after the launcher has been closed. The Launcher tries to launch Holochain in the same port and crashes, because the old process is still running in that port. I thought I handled this correctly up until now, but it seems there is still some edge case in which this doesn't work.

I think I can implement better protection against this, thanks :)

matthme commented 2 years ago

The same error can also occur if the conductor is not ready in time when the HolochainManager tries to connect to the admin websocket. We should try to add a handshake there. For now I added a workaround to retry connecting with the admin websocket one more time (866adff2655d772c0ed3e1ab9a8390ae9c7f893f)