cake_wallet icon indicating copy to clipboard operation
cake_wallet copied to clipboard

android wallet resyncing from scratch even if already synced

Open lsm5 opened this issue 1 year ago • 17 comments
trafficstars

My android wallet had finished syncing yesterday and it said Synchronized. But today it started syncing again on its own with 2 million blocks to go. I have downloaded the app from github releases.

If it matters I've set background sync mode to Aggressive.

lsm5 avatar Dec 01 '23 09:12 lsm5

and now it shows balance 0.0 even though it says Synchronized.

lsm5 avatar Dec 01 '23 15:12 lsm5

  1. Turn off background sync (settings > connection)
  2. Rescan blockchain using a restore date from before your first transaction (settings > connection > rescan)
  3. see if the problem goes away

nahuhh avatar Dec 05 '23 22:12 nahuhh

using github releases this has been happening the last two releases as well.

kinghat avatar Dec 05 '23 23:12 kinghat

Follow suggestion, report back

edit: do not rescan if you dont have to. OP says missing transactions (have to rescan)

nahuhh avatar Dec 05 '23 23:12 nahuhh

Follow suggestion, report back

edit: do not rescan if you dont have to. OP says missing transactions (have to rescan)

i had a full chain scan from forever ago. two updates ago it wiped it. did a full scan again. latest update wiped the full scan and started me at 0 again. as long as its an option to start from 0, regardless if you think i should be starting from x more recent date, this is an issue.

kinghat avatar Dec 06 '23 00:12 kinghat

Users:

  1. Turn off background sync

Cake:

  1. Completely remove yur background sync
  2. Use the View-key background sync pr by jberman
  3. Don't implement without granular controls.

.. its broken and breaks your wallets has been breaking my wallets since day 1 and has never worked as intended.

when it does sync, it syncs from 0. Or it corrupts my cache and then syncs from 0. all the while leaving my spend keys vulnerable.

the bug appears to be that the sync doesnt end gracefully, if at all, and sometimes writes to the file multiple times (while opening cake + its already syncing). you can visually see it, as the "blocks remaining" will flicker between expected and broken cache syncing from scratch.

Tldr - Users:

  1. Disable background sync

Cake:

  1. Remove your implentation
  2. Use jbermans
  3. Dont cut corners on bg sync.

nahuhh avatar Dec 06 '23 00:12 nahuhh

This is new to me. I don't think I've ran into this issue and I've used both Unobtrusive and Aggressive background sync for months. Could be an issue with the OS killing CW sooner than expected. I'll open this internally, thanks for the report.

And for reference what version of Android are you guys using?

tuxpizza avatar Dec 06 '23 22:12 tuxpizza

And for reference what version of Android are you guys using?

LOS 20 - Android 13

kinghat avatar Dec 07 '23 00:12 kinghat

Just experienced the same problem as OP

Only difference wallet was on unobtrusive mode

Final-Phoenix avatar Dec 08 '23 08:12 Final-Phoenix

Cake wallet app battery usage was on "Restrictive"

Changed to "Optimized", closed out the app, reopened, and it was fixed. Not sure if this was a coincidence.

Final-Phoenix avatar Dec 08 '23 08:12 Final-Phoenix

Just lost entire wallet history including sub accounts

usually the bug syncs from genesis, this time it showed synchronized as if i entered "today" and rescanned. 0 transaction history

nahuhh avatar Dec 11 '23 23:12 nahuhh

Temporary fix in progress for this! Until we can overhaul the background sync.

tuxpizza avatar Jan 18 '24 17:01 tuxpizza

just posting to share my pain.

sr3vbqvfg4r9tswa.jpg

nahuhh avatar Jan 23 '24 00:01 nahuhh

@nahuhh Just making sure.... is this with background sync on? Or are you running into this with it off also?

tuxpizza avatar Jan 24 '24 20:01 tuxpizza

That's with it on. Left it on to diagnose the issue.

another related issue i observed: it ONCE loaded the wrong wallet cache when "sync all" was enabled.

meaning, the transactions screen showed tge transactions of another wallet, and the sync bar kept flashing 2 different "blocks remaining".

(ive turned it off since your last comment)

nahuhh avatar Jan 24 '24 20:01 nahuhh

Hey all. Cake Wallet v4.13.3 and Monero.com v1.10.3 has been released and includes fixes for background sync and internal backups incase of wallet corruption. Now when you turn Background sync on, it will ask you to Allow Cake Wallet to run in unrestricted battery mode (Android only), which will prevent the OS from force closing Cake in the background, and allow background sync to work better. This is optional, but recommended. These two things in combination should prevent any wallet corruption, and if there is it will restore last known good wallet open.

Documentation will be updated soon but Aggressive is now every 3 hours, and Unobtrusive is now every 12.

tuxpizza avatar Feb 12 '24 18:02 tuxpizza

Still having issues unfortunately...background sync was fine for awhile. Today I opened it up and suddenly I'm 50,000+ blocks behind. I was caught up the day before.

Final-Phoenix avatar Feb 29 '24 01:02 Final-Phoenix

Just wanted to give more details. "Background sync mode" was on aggressive, and "App battery usage" was on unrestricted. It also deleted all my account and address names and they're back to "Untitled accounts"

I'm wondering if this might be a remnant of the previous version? Maybe if I uninstall and reinstall if it would fix the problem...

Is anyone else reporting this still or just me?

Final-Phoenix avatar Mar 01 '24 20:03 Final-Phoenix

Happened again...

Final-Phoenix avatar Mar 12 '24 17:03 Final-Phoenix

Getting same error, have synced my wallet twice now and it's in the third. Starts showing balances and everything looks good. Gets down to the last 180 blocks are so, slows WAY down and then syncs and shows balance at zero and shows no transactions excepts one changelly trade done years ago still chills in transaction page. I just turned off background sync and am trying to restore the wallet to a different, clean phone....

TollgateTrash avatar Mar 12 '24 20:03 TollgateTrash

Getting same error, have synced my wallet twice now and it's in the third. Starts showing balances and everything looks good. Gets down to the last 180 blocks are so, slows WAY down and then syncs and shows balance at zero and shows no transactions excepts one changelly trade done years ago still chills in transaction page. I just turned off background sync and am trying to restore the wallet to a different, clean phone....

I had to do the same thing. When it works it's great. Appreciate the functionality, but every time this happens it is an ordeal to go through, and worse than not having it. Especially when you are expecting to be able to just open it up and use it on the spot for something then you have to wait half an hour to an hour to sync everything from scratch again.

Final-Phoenix avatar Mar 14 '24 22:03 Final-Phoenix

Please

  1. Ship it disabled
  2. remove it

i prefer option 2. Thia feature hurts the brand

nahuhh avatar Mar 14 '24 22:03 nahuhh

I'm uninstalling cake wallet now for good.

After the latest update on android (CalyxOS) to 4.15.2 cake lost my accounts and subaddresses and tx history again - If it was just the constant sync from scratch every time I want to open and use cake wallet.

goodc0re avatar Mar 22 '24 07:03 goodc0re

Please

  1. Ship it disabled
  2. remove it

i prefer option 2. Thia feature hurts the brand

pinging @OmarHatem28 @tuxpizza ! Enough is enough

nahuhh avatar Mar 22 '24 12:03 nahuhh

I personally havent used cake in > 1 month. After > 1 yr, I'm no longer interested in resyncing weekly.

The feature has ALWAYS been broken and should NEVER have been shipped in a release. Leaving spend keys unlocked 24/7 is fkn retarded anyway.

Also, fkn delete that live status bullshit. Tf

nahuhh avatar Mar 22 '24 12:03 nahuhh

It shouldnt take this long. 💢

nahuhh avatar Mar 22 '24 12:03 nahuhh

We've been debating removing it but we recently decided to add a warning message due to its "experimental" nature, which will be in next update.

It's already disabled by default it's not like it's forced on users in any way.

tuxpizza avatar Mar 22 '24 19:03 tuxpizza

It was enabled by default and persists. its broken on android, not "experimental".

risk vs reward. useless and insecure feature. Kill it

nahuhh avatar Mar 22 '24 19:03 nahuhh

It's not enabled by default. Only reason it would be enabled is if you were restoring from a backup that had it enabled.

I'm in favor of removing it, but some people still want it there and use it just fine every day..... so we'll add a warning to facilitate its existence while letting users know it may cause issues.

tuxpizza avatar Mar 22 '24 19:03 tuxpizza

experimental (broken) = dont push it to release channels...

instead, users can leave the app running in recents.

Ios doesnt appear to have the same issue, butbthis is literally expensive (resyncing 30gb isnt free) AND leaves your spend keys unlocked (crazy bs feature)

nahuhh avatar Mar 22 '24 19:03 nahuhh