cerebro icon indicating copy to clipboard operation
cerebro copied to clipboard

Cerebro v0.6 startup command opens electrum

Open alandefreitas opened this issue 2 years ago • 1 comments

  • [x] I am on the latest Cerebro.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Ubuntu 22.04
  • Cerebro.app version: 0.6.0
  • Relevant information from devtools N/A

Issue

The command cerebro registers in the startup preferences is

/home/alandefreitas/cerebro/node_modules/electron/dist/electron

This doesn't work. It only opens what looks like the electrum boilerplate window at startup:

image

I still run cerebro manually from the terminal with:

/usr/local/bin/yarn --cwd ~/path/to/cerebro/ run dev

but that doesn't work in the startup settings.

alandefreitas avatar Aug 11 '22 06:08 alandefreitas

Hi @alandefreitas,

Thanks for your report! I reproduced this also in Windows. It looks like it's something related to the development settings, so this should not affect users when we release the executables. BTW I will take a look at it and try to find a solution.

Thanks 🙌 David

dubisdev avatar Aug 11 '22 21:08 dubisdev

I have good and bad news

TLDR - Autostart has no sense when running from source code as there isn't actually an executable to start, this option will never be available. I will fix this soon to disable it.

I found the solution for this: disabling autostart when running from source code (with yarn dev). As explained here it has no sense to activate autostart if there is no executable to start, if the app isn't compiled autostart won't find the executable and by default electron opens its welcome page.

I'll soon open a PR for fixing this. Meanwhile, a workaround would be to run Cerebro from source (yarn dev), and disable autostart from settings to delete the entry from the system.

Also I would recommend that if you aren't intended to develop nothing and want the last version you should clone the repo and build the app so you can install it and run it as any other app:

  1. Clone the repo
  2. Install dependencies running yarn
  3. Build executables with yarn build && npx electron-builder
  4. The files are generated in ./release folder and you can install the executable

dubisdev avatar Aug 12 '22 08:08 dubisdev

Build executables with yarn build && npx electron-builder

Oh... so that's what I was missing. Maybe we could include that in the README.md until we have the executables in the release section.

I assumed yarn run dev was the intended way to run cerebro. yarn build && npx electron-builder now gives me a nice appimage in release. This should definitely work. Thanks.

alandefreitas avatar Aug 12 '22 22:08 alandefreitas

I've updated the documentation in the PR to make it a bit more clear. Once we have merged the PR we will definitively close this issue.

Thank you again for reporting!

dubisdev avatar Aug 12 '22 23:08 dubisdev