actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
15.75k stars 1.22k forks source link

[Bug]: Can't update the PWA client on Android after updating actual-server #2830

Open xenofem opened 5 months ago

xenofem commented 5 months ago

Verified issue does not already exist?

What happened?

I set up actual-server 24.5.0 recently on a cloud VPS, and installed the PWA on my Android phone (by visiting my actual-server instance in Chromium). I've just upgraded actual-server to 24.6.0, but I can't figure out how to get the Android PWA client to update itself. In settings, I'm seeing

Client version: v24.5.0 Server version: v24.6.0 New version available: v24.6.0

with a link to the release notes, but no button to actually update the client. On desktop Firefox, I was able to get the client to update by force-refreshing the page, but I don't have the option to do the same in Android Chromium.

Reproduction steps:

  1. Install actual-server 24.5.0 on a cloud VPS
  2. Visit the actual-server instance in Android Chromium and install the PWA from there
  3. Upgrade the VPS to run actual-server 24.6.0
  4. Close (swipe away) and reopen the PWA on Android

I'd expect the PWA to either automatically update itself, or provide a button in settings for me to manually trigger an update. Instead, it just seems to be stuck on 24.5.0.

Where are you hosting Actual?

Other

What browsers are you seeing the problem on?

Chrome

Operating System

Mobile Device

shall0pass commented 5 months ago

You can update the PWA by regarding the page. On mobile I usually have to open the PWA once, close the PWA by swiping it away, then reopen it and it will update.

xenofem commented 5 months ago

I've done that multiple times, hasn't helped :/

shall0pass commented 5 months ago

If you're not using node and using yarn start to launch Actual, sometimes the dependencies aren't updated during the yarn install command. You can delete the node-modules folder and rerun yarn install && yarn start to reinstall all the dependencies.

deathblade666 commented 5 months ago

If all else fails, this should work is either A) clear all browser data or B) delete the pwa shorcut, clear all browser data, and recreate the pwa shortcut.

xenofem commented 5 months ago

If you're not using node and using yarn start to launch Actual, sometimes the dependencies aren't updated during the yarn install command. You can delete the node-modules folder and rerun yarn install && yarn start to reinstall all the dependencies.

I'm building it using a nix flake (https://git.xeno.science/xenofem/actual-nix/), all the dependencies were reinstalled from scratch and are definitely up to date; like I said, I was able to get the client to update on desktop Firefox with no issues just by Ctrl+Shift+Ring.

If all else fails, this should work is either A) clear all browser data or B) delete the pwa shorcut, clear all browser data, and recreate the pwa shortcut.

Yeah, I'm confident that'd accomplish the goal as a workaround, I may end up doing that to resolve it in this instance. I still think there should be a simpler way to accomplish this (in particular, a way that definitely doesn't risk any data loss if the client isn't done syncing for some reason), hence the bug report.

deathblade666 commented 5 months ago

If you're not using node and using yarn start to launch Actual, sometimes the dependencies aren't updated during the yarn install command. You can delete the node-modules folder and rerun yarn install && yarn start to reinstall all the dependencies.

I'm building it using a nix flake (https://git.xeno.science/xenofem/actual-nix/), all the dependencies were reinstalled from scratch and are definitely up to date; like I said, I was able to get the client to update on desktop Firefox with no issues just by Ctrl+Shift+Ring.

If all else fails, this should work is either A) clear all browser data or B) delete the pwa shorcut, clear all browser data, and recreate the pwa shortcut.

Yeah, I'm confident that'd accomplish the goal as a workaround, I may end up doing that to resolve it in this instance. I still think there should be a simpler way to accomplish this (in particular, a way that definitely doesn't risk any data loss if the client isn't done syncing for some reason), hence the bug report.

That's a fair point, wonder if something could be added where the sync button (top right) could be utilized to not just sync changes but also update the local client.

mlhynfield commented 2 months ago

This may need to be a separate issue, but on iOS using Safari I’m having the exact same issue when connecting to the server I have running in a container in my home lab Kubernetes cluster. I just upgraded the server to the latest release, v24.9.0, but the client version in the browser remains v24.8.0 until the cache is cleared, which really isn’t ideal.

maxcrees commented 2 months ago

There is no way to easily clear the cache or force reload PWAs on iOS. It used to be the case that force-quitting and opening the PWA several times would fix this, but it no longer seems to work on iOS 18 - even when rebooting. The only working alternative at the moment of which I'm aware is to delete and re-install the PWA.

The app should ship with an update button of some kind on mobile to force reload the page, or as @deathblade666 suggested it should be done when syncing.