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

Unable to open Financisto app after trying to search keywords (includes space and comma) for notes #163

Open
Rahul-09 opened this issue Aug 12, 2023 · 12 comments

Comments

@Rahul-09
Copy link

Have been using Financisto for many years and just 2 days back was trying to search for some keywords under the Notes.
Used two words along with space and comma and the app crashed. Now unable to open the app at all. If I could somehow disable the filter, hopefully it will work again. Regret not having backed up the database recently (last one was in Nov 2022).
Is there a way to at least recover the latest database ? I have non rooted phone.
Is there a way to start the app in some safe mode - without filter?

@tiberiusteng
Copy link
Contributor

Hope you haven't removed the app or cleared its data yet.

I tried comma, quote or space on my phone but can't reproduce the problem.
Do you have logcat output when the app crashing?

What version are you running? the one from play store? The one from play store probably won't let you run following commands (it need debug version of the app), but you can try it:

adb shell
$ run-as ru.orangesoftware.financisto
$ rm shared_prefs/activity.BlotterActivity.xml

this will clear the filter and you should be able to reopen the app, be sure to set up auto backup.

or you can first backup your phone with Google One, and install a self-built debug version of it (I can send you one built by myself), execute above commands, make backup or export database, then reinstall original version.

@Rahul-09
Copy link
Author

Rahul-09 commented Aug 26, 2023 via email

@tiberiusteng
Copy link
Contributor

tiberiusteng commented Aug 26, 2023

The log section you posted unfortunately do not contain information about the crash, probably because it isn't debug version.

Could you extract shared_prefs/activity.BlotterActivity.xml from your backup and view its contents? It would be helpful to fixing the search criteria bug.

DO NOT UNINSTALL CURRENT VERSION, UNINSTALLING WILL CLEAR YOUR DATA.
install the new apk directly over your current version

The following link is the debug version built by me:
https://www.dropbox.com/scl/fi/fe4myivf8mm07j64ex4vb/financisto-1.6.8-20221105-debug.apk?rlkey=5ueg7vws35t744l4yloyn6hfm&dl=0

please do

$ run-as ru.orangesoftware.financisto
$ cat shared_prefs/activity.BlotterActivity.xml

before deleting that file so we can investigate what contents in search criteria caused the crash. Be sure to replace/censor any sensitive info before posting them (assuming those part won't cause the crash though)

@tiberiusteng
Copy link
Contributor

just noticed my built version is way older than financisto mainline, so it probably wouldn't work. But you've got the sqlite file, if the backup format didn't change much it's possible to generate a backup file from the sqlite database (it's basically a key:value dump of that database)

@tiberiusteng
Copy link
Contributor

Since you mentioned abe.jar, I did some search and found https://github.com/nelenkov/android-backup-extractor, I tried setting some random filters and then:

  1. adb backup -f financisto.ab -noapk ru.orangesoftware.financisto
  2. java -jar abp.jar unpack financisto.ab financisto.tar
  3. used 7-zip to open the .tar, right click activity.BlotterActivity.xml -> edit, removed filterCriteria lines, save, and 7-zip updated the file in the .tar
  4. java -jar abp.jar pack financisto.tar financisto.ab
  5. adb restore financisto.ab
    and it indeed cleared my blotter filters.

Maybe you can try this route. And please copy the crash-inducing filterCriteria lines for investigation!

@Rahul-09
Copy link
Author

Rahul-09 commented Aug 28, 2023 via email

@tiberiusteng
Copy link
Contributor

Seems github will strip all attached files you replied with mail (all I see is the message in github's web interface).

From the filter config you attached I don't suspect the issue is on filter ...

You have to install apk over original installation to let the apk see the current data. Uninstalling first will make the apk see a fresh install without any data. Restoring over the apk will restore original app code too.

I've wrote some code to work with Financisto's backup files, albeit in reverse direction (I read the backup file to convert to webpage, hledger format; and I have scripts filling electronic recipes and public transport ticket use logs into backup file to be restored into Financisto). If you can't make it work perhaps you can generate an example database and backup file of new Financisto version with some transaction, currency, payee, category data etc and I can write an sqlite exporter for you. (I'd prefere not to work on your personal backup file for obvious privacy reasons).

@Rahul-09
Copy link
Author

Rahul-09 commented Sep 1, 2023 via email

@tiberiusteng
Copy link
Contributor

Hi Rahul-09,
Glad to hear that you recovered your data!

I'm just happen to passing by and still using Financisto.

We should all pay our gratitude and support to original author @dsolonenko for his great work and open sourcing it. In retrospect I have using it since HTC Hero days and it'll be soon over 15 years, it's really amazing ...

@BigAal
Copy link

BigAal commented Sep 8, 2023

Sorry to piggyback on this question but @tiberiusteng was wondering why you chose to fork from 1.6.8 and not the latest. Also does your version have google backup fixed? I have been looking for a good fork. I can't give up on this app. Been using it since 2011.

@tiberiusteng
Copy link
Contributor

It's the latest version when I forking. 😉 and after I played with material design that significantly changed layout files it becomes very difficult to track upstream change, albeit the difference maybe not very much ...

I did back-port fingerprint lock, upgraded Dropbox Backup and Google Drive backup APIs (but scheduled backup still flaky, I'm still debugging with help of my friends).

About publishing to Google Play Store, back then original Financisto was still on Play Store and I didn't want to cause confusion, also I was too lazy to do some required housekeeping works (Google Drive/Dropbox API keys, etc). And it's already too dated! No Material (or even Material You) design, upgrading SDK and libraries also required many additional work. Perhaps I'll try upgrading it later ...

My fork is at https://github.com/tiberiusteng/financisto1-holo, you can try to use Android Studio to build it yourself.
And I just found a recent fork that has published to Google Play Store, looks worth to try too: https://github.com/BlueCatMe/financisto

@tiberiusteng
Copy link
Contributor

@Rahul-09 @BigAal shameless plug: I've put my build on Google Play, please try it!
https://play.google.com/store/apps/details?id=tw.tib.financisto&pli=1
It should be able to consume backup files created by Financisto, Financier and Financisto Plus, reverse direction should work too but I haven't extensively tested this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants