Skip to content
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

[Feedback] Electron/Desktop App #1047

Closed
18 of 22 tasks
Shazib opened this issue May 18, 2023 · 39 comments
Closed
18 of 22 tasks

[Feedback] Electron/Desktop App #1047

Shazib opened this issue May 18, 2023 · 39 comments
Labels
feedback Single feedback thread for bug reports on a new feature

Comments

@Shazib
Copy link
Contributor

Shazib commented May 18, 2023

Experimental builds of the Electron-based desktop app are now available with every change we make to Actual. Go to this GitHub Actions page, click on the top entry, make sure you’re logged into GitHub, and then click on the link for your platform under “Artifacts.” Make sure to read the below warnings before proceeding.

Known issues/warnings:

  • The Electron app has more permissions than the web client by virtue of being a desktop app. While we will do our best to avoid bugs that affect your wider system, make sure you have a good backup system set up on your computer before using the desktop app.
  • The app binaries are currently not code signed, so you may need to bypass your operating system’s security warnings in order to get the app to run. Don’t trust random strangers on the internet who tell you to do this! If you build and run the Electron app locally instead of using the pre-built artifact downloads you won’t have to override security settings.
  • There are not yet official/stable releases of the desktop app, and it will not auto-update.
  • If you want to use both the web and Electron clients, we recommend using the :edge version of the server to ensure both clients are at the very bleeding edge. If you don’t do this, you may run into “out-of-sync migrations” errors on the web client.

We hope to clean up all of these loose ends (along with any bugs you identify) before making a stable release of the Electron app. In the future, we will do our best to release Electron app updates at the same time as all other package updates.

[added by maintainers]


Opening this issue to record issues and to-do items for the electron app.

Issues

  • Side-Nav broken (reported by Matiss)
  • Crashes when clicking 'Rules' (maybe not an issue?? can't reproduce)
  • Middle click on sidebar opens empty windows.
  • Opening Reports page results in two network-failure events
  • 'Learn More' in settings doesn't work
  • 'Release Notes' in settings doesn't work
  • 'Find schedules' blanks out page behind it while modal is opened from menu bar
  • 'Repair Split Transaction' in 'Tools' menu doesn't do anything?
  • Create Backup/Load from Backup broken
  • Broken sockets when reloading
  • Fix the 'find schedules' menu option.
  • Check anywhere new/malloc may be allocating memory outside the v8 sandbox. See [Bug]: Error when exporting data on Electron  #1238
  • Add the 'fix split transactions' menu item back in?

macOS Issues (Help Needed)

  • Top of sidebar overlaps with window controls on macOS
  • Jank when mousing between area under hidden titlebar/toolbar and window content area on macOS

To Test

  • Nordigen integration (only works with a server)
  • Goal Templates
  • All basic functionality...?
  • Tester needed for Linux and OS X
  • Electron Auto-Updater?

Future Items

  • Investigate codesigning/deploying to Mac/Windows/Linux stores
  • Add releases to Github...

image

@Shazib Shazib added bug Something isn't working needs triage labels May 18, 2023
@j-f1 j-f1 changed the title [Bug]: Electron App Issues [Feedback] Electron/Desktop App May 18, 2023
@j-f1 j-f1 added feedback Single feedback thread for bug reports on a new feature and removed bug Something isn't working needs triage labels May 18, 2023
@j-f1 j-f1 pinned this issue May 18, 2023
@rich-howell
Copy link
Contributor

I am downloading Ubuntu, will spin it up in Hyper-V this evening and give this a shot

Windows version is pretty tight, couldn't find any immediate issues other than the ones highlighted.

@youngcw
Copy link
Contributor

youngcw commented May 26, 2023

I cant connect to my server via reverse proxy because the cert isn't known (my best guess). In a browser I just have to click the proceed button, but there isn't an option to do that in the ubuntu app.

If I use an IP address it works fine if I use http.

@youngcw
Copy link
Contributor

youngcw commented May 26, 2023

Goal templates seem to be working fine on the ubuntu version.

@Shazib
Copy link
Contributor Author

Shazib commented May 26, 2023

I cant connect to my server via reverse proxy because the cert isn't known (my best guess). In a browser I just have to click the proceed button, but there isn't an option to do that in the ubuntu app.

If I use an IP address it works fine if I use http.

Yeah I'm trying to see if I can get node to pop up some kind of 'accept certificate' message or something (fire some callback) but haven't cracked it as yet. Electron has a function for it but the issue is in the backend not electron.

@MatissJanis
Copy link
Member

MatissJanis commented Jun 2, 2023

[bug report]
The build artefact for macosx does not seem to work. I think websockets are not running?

in.4a5f855a.js:2 WebSocket connection to 'ws://localhost:64796/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Repro:

  1. download the artefact here https://github.com/actualbudget/actual/actions/runs/5148653600
  2. install it
  3. launch it
  4. observe a never ending loading spinner

What's weird is.. sometimes the app works. Other times it does not and it is just stuck.

@Shazib
Copy link
Contributor Author

Shazib commented Jun 2, 2023

[bug report]

The build artefact for macosx does not seem to work. I think websockets are not running?


in.4a5f855a.js:2 WebSocket connection to 'ws://localhost:64796/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Repro:

  1. download the artefact here https://github.com/actualbudget/actual/actions/runs/5148653600

  2. install it

  3. launch it

  4. observe a never ending loading spinner

What's weird is.. sometimes the app works. Other times it does not and it is just stuck.

Unfortunately I don't have a Mac to test but one thing that comes to mind with this being intermittent is that perhaps the port it's choosing for the socket is not actually free (or reserved etc)?

@MatissJanis
Copy link
Member

MatissJanis commented Jun 2, 2023

(I might be wrong)

Could the problem be that multiple sockets get opened up? I am able to reliably reproduce if I open up the app and then do "cmd+r" (refresh).

--

One more bug: it's not possible to connect it to a remote server. I think the child process does not have network access.

FetchError: request to https://xxxxxxxxx/info failed, reason: connect ENETUNREACH

Update: this actually might be a fly-io exclusive issue. Debugging if there is a solution.. https://community.fly.io/t/error-connect-ehostunreach-when-sending-requests-to-my-fly-io-app/5686/30?page=2

@Shazib
Copy link
Contributor Author

Shazib commented Jun 3, 2023

Yep! The front/client end does reconnect on a Ctrl+R, and fails. The ws server keeps running so it should just close the client connection and open a new one on the same port.

I think maybe i need to call close on the socket before it opens a new one, but I'll have to figure out where in react-land to place that call.

@MatissJanis
Copy link
Member

Update on ENETUNREACH issue: my network does not have ipv6. However, node-fetch was for some reason trying to use it.. thus it was blowing up. Very strange.. but explicitly turning off ipv6 in my local network settings seems to have fixed the problem for me.

@Shazib
Copy link
Contributor Author

Shazib commented Jun 4, 2023

Do we need to implement something in-app to cope with this? i.e. fallback to ipv4 if 6 fails or something?

@MatissJanis
Copy link
Member

Do we need to implement something in-app to cope with this? i.e. fallback to ipv4 if 6 fails or something?

This might just be with weird network configuration. So I would recommend NOT doing anything for now. And to wait and see if others run into the same problem.

@TomAFrench
Copy link
Contributor

Thanks for working on this @Shazib. I much prefer to use the desktop app and really struggled to get it building in CI so glad to see it working again.

@Shazib
Copy link
Contributor Author

Shazib commented Jun 29, 2023

Creating/Loading backups & Rules seem to be pretty solid, so i've gona ahead and marked them off on here.

@MatissJanis
Copy link
Member

MatissJanis commented Jul 29, 2023

Just finished testing the electron app again. Very exciting to see all the progress! I think we'll be able to start doing official beta releases for it very soon to get some more feedback.

Some bugs spotted (all on mac os):

  • the minimize/maximize osx icons overlay the budget name (possibly missing some top padding? or maybe a toggle to turn on top-bar?)
Screenshot 2023-07-29 at 12 03 22

For comparison: other apps have this top-bar:

Screenshot 2023-07-29 at 12 11 18
  • when you collapse the side-nav - it's very difficult to bring it back open (very likely the same root cause same as the report above)
  • export data is not working - clicking "export" crashes the websocket connection making the app unusable
  • closing the app and re-opening for some reason forces me to select my "active budget" once more - instead it should remember the previously active budget and just show that

@Kidglove57
Copy link

Ditto the above from my testing a couple of weeks back (at least for the Mac version).

I went back to running Actual as a desktop app using Unite 4 (https://www.bzgapps.com/). But I cannot do exports from that either.

@Shazib
Copy link
Contributor Author

Shazib commented Jul 29, 2023

Thanks @MatissJanis @Kidglove57, Unfortunately i dont have a Mac so can't work on any of the macOS specific bugs, but i will check all of these against the windows version and try to solve them there.

@MatissJanis
Copy link
Member

Small improvement for exporting: #1468

Now if the export fails we will show a nice error message + will not crash the websockets. But this is still not really solving the export functionality (couldn't figure that out yet..)

@MatissJanis
Copy link
Member

This PR might solve our issue though: WiseLibs/better-sqlite3#1036

I'll wait for it to be merged and released before continuing investigations.

@Shazib
Copy link
Contributor Author

Shazib commented Aug 5, 2023

@MatissJanis Could the work i did in this PR be of use here?

@MatissJanis
Copy link
Member

@MatissJanis Could the work i did in this PR be of use here?

What do you mean? That PR is already merged and in master.

@Shazib
Copy link
Contributor Author

Shazib commented Aug 5, 2023

@MatissJanis Could the work i did in this PR be of use here?

What do you mean? That PR is already merged and in master.

Is the underlying problem a similar issue? That we can't call functions allocating memory outside the sandbox?

@MatissJanis
Copy link
Member

Is the underlying problem a similar issue? That we can't call functions allocating memory outside the sandbox?

AFAIK: yes. Both serialize and backup is breaking because of memory caging. Though I might be totally wrong as my understanding here is based only off of half a days worth of research.

@Shazib
Copy link
Contributor Author

Shazib commented Aug 5, 2023

Is the underlying problem a similar issue? That we can't call functions allocating memory outside the sandbox?

AFAIK: yes. Both serialize and backup is breaking because of memory caging. Though I might be totally wrong as my understanding here is based only off of half a days worth of research.

Could the solution be to re-use the exportDatabase function i wrote there instead of cloudStorage.exportBuffer when running in electron?

@MatissJanis
Copy link
Member

MatissJanis commented Aug 5, 2023

Could the solution be to re-use the exportDatabase function i wrote there instead of cloudStorage.exportBuffer when running in electron?

cloudStorage.exportBuffer is internally calling exportDatabase. And then the process hangs on db.backup here.

Edit: I also tried changing db.backup to db.serialize and I got basically the same result. db.backup throws an exception that it is not able to find the database open the database (which is in-memory btw). Whereas db.serialize actually just hangs. I suspect they both have the same root-cause issue.

@shall0pass
Copy link
Contributor

Goal templates seem to be working fine on the ubuntu version.

I've been using the electron app on Windows for a couple months now and goal templates are working the same as the Web version.

@thelazyoxymoron
Copy link

Is the build no longer being generated? Can't seem to find any electron related artifacts in the linked actions page.

@Shazib
Copy link
Contributor Author

Shazib commented Sep 22, 2023

Is the build no longer being generated? Can't seem to find any electron related artifacts in the linked actions page.

I can still see them for PR's

@MatissJanis
Copy link
Member

Socket reconnection has been merged and should be available in edge. Which means you should be able to use the electron app - make your computer go to sleep - and the app should still continue working after the computer starts up.

With this: I think all the issues have been resolved. Next we need to figure out a release process, signing, publishing to marketplaces, etc.

@Shazib
Copy link
Contributor Author

Shazib commented Oct 6, 2023

@MatissJanis amazing work!

Regarding windows builds, I think if you deploy to the Microsoft store, you do not need an expensive codesigning certificate from a verified authority, you upload the build to the store, and then they (microsoft) sign it with thier own certificate.

You need to create a certificate and sign the build you send to them, but this cert can be locally generated for free, as long as its linked with your developer account - so they can make sure you uploaded the build.

Actual would need an 'organisation' app developer account which is a one-off lifetime fee of $99.

Of course this means that the builds distributed on github are signed but not verified. (but maybe we accept that for now, as the cost is quite a lot).

Apple I assume just requires a developer account?

@hackoder
Copy link

hackoder commented Nov 5, 2023

@youngcw FYI, on linux, I was able to connect to my instance behind a self-signed cert by setting the following environment variable:

NODE_TLS_REJECT_UNAUTHORIZED=0 ./Actual-23.11.0-x86_64.AppImage

@lucastucious
Copy link

Do we need a server before launching the app ?

@t3chguy
Copy link

t3chguy commented Nov 16, 2023

@lucastucious no - Actual can operate in local-only mode, later connecting to a server for features like sync/backup & bank account connections

@lucastucious
Copy link

lucastucious commented Nov 16, 2023

Sorry, i mean, i've installed the Electron app here, but all i have is a white screen

The console error :

Uncaught TypeError: Cannot assign to read only property 'setTheme' of object '#<Object>'
    at l1 (main.4c9802a2.js:187:362293)
    at main.4c9802a2.js:187:364803
    at main.4c9802a2.js:187:365046
    at main.4c9802a2.js:187:365050
VM10:1 Uncaught ReferenceError: __actionsForMenu is not defined
    at <anonymous>:1:1

@t3chguy
Copy link

t3chguy commented Nov 16, 2023

I suggest looking at the console to see the error, makes a bit more of a helpful screenshot than a blank screen.

@Shazib
Copy link
Contributor Author

Shazib commented Nov 16, 2023

Can you try the latest stable build?

@lucastucious
Copy link

Same issue with this one
I'm on win10 if it's relevant

@Shazib
Copy link
Contributor Author

Shazib commented Nov 18, 2023

Certainly does look like the windows builds are broken right now

@Shazib
Copy link
Contributor Author

Shazib commented Nov 18, 2023

@lucastucious give this one a go please #1926

@MatissJanis MatissJanis unpinned this issue Jan 22, 2024
@MatissJanis
Copy link
Member

We will start publishing the electron app more publicly starting v24.5.0. Eventually it might also end up in app-stores.

Closing this off as the electron app has been quite stable the last couple of months + the feedback for it has stopped coming in.

If there are further issues - please open individual bug report issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Single feedback thread for bug reports on a new feature
Projects
None yet
Development

No branches or pull requests