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
Restore last backup error #295
Comments
I've left only the following file in the /storage/sdcard0/gnucash folder: If I try Settings->Accounts->Import GnuCash accounts: I pick the /storage/sdcard0/gnucash folder but nothing is displayed (fair enough, this option is not made to import transactions)
I guess it's not finding the file. How can I direct Gnucash to open my existing accounts.gnucash? How can I direct the application to use /storage/sdcard0/gnucash/accounts.gnucash ? |
Thanks for that report. It is strange indeed. What version of the app are you on? Using the Import functionality should also work. Maybe try using another file manager to pick the file (like the OI File Manager). I don't think it's a problem of not finding the file, because it gives the error about the AccountType. If you could also provide me more detail logs from the device, that would be very helpful! |
To go futher:
|
Some file managers (excellent as they may be) don't serve the files requested by the filter in the app. We are looking at improving it. But if this one has worked for you in the past then fine. The file contents you mention sounds about right. The backup is compressed, you might need to unzip it first before you can view it.
|
You were right, OI File Manager allowed me to import the accounts.gnucash. I realise now that the live data are stored in As for Settings->General->Restore last backup, it does say 'No recent backup found' if the structure BTW, I couldn't uncompress the exiting backup files: I have been able to find a complete stack trace in a bugreport :
So the error comes from GncXmlHandler.java l377. But it doesn't speak to me I must admit. I attach my latest backup file in case someone would have time to reproduce the error. A simple question: does the Account structure have to be in place before restoring a backup ? |
I've been able to debug the app while using Settings->General->Restore last backup function. If I leave only the last file in the backup folder and starts the procedure, it stops on GncXmlHandler:377 I don't know what defines the 'parentAccountUID' in an Account object , and I can't find any trace of the term 'parent' in the XML backup file... Also |
Hi, From first glance, I would ask if you created your own hierarchy, or if you imported one from GnuCash desktop? Imported accounts always have a root parent, so there may be a bug in the way we handle simple created accounts. I will look into it. Thanks for the debugging effort. |
Hi, I did create my own hierarchy. So probably no parent account were created. Actually I tried to import my desktop hiearchy but it proved way to detailed and complex to handle on a portable device. I resigned myself to use Gnucash android to a convenient daily acccouting and I do ~weekly export of transaction.
|
Hi @nodje , can you confirm that the current development branch now fixes the bug?
|
I'll need a bit of help to be able to test this, as I've started with a fresh account set and do not want to restore a backup over it. I'm sure I can run the current dev version in a emulator on my machine with Android Studio, but in which folder hierarchy do I have to create the gnucash/backup folders? |
If you checkout the current develop branch of the code and build, you can The development version will have it's own database which is separate from
|
The dev version wants to update my running version. I don't know how to test then, but I guess I should be able to run the app in an emulator. |
The dev version should be using a completely different application ID. You Do you have the latest code from the develop branch on GitHub? But to answer your question, you can pull and push files to the virtual SD
|
ok, good to know, for some reason, my system, CynogenMod 12, ask me if I want to upgrade the existing Gnucash app when I open my dev apk... I'll try either way. |
ok, let me know. On Sat, Apr 4, 2015 at 5:16 AM, nodje notifications@github.com wrote:
|
Sorry to bother you again, but I really can't launch the dev app on my phone, even if I let it upgrade exiting app, it just crashes. As fr Android Studio, I can't run the Configuration, it's telling me "androidmanifest.xml doesn't exist or has incorrect root tag". thanks |
No, I haven't changed the manifest recently. On Mon, Apr 13, 2015 at 12:53 PM, nodje notifications@github.com wrote:
|
The development branch still contains a lot of bugs, and is very unstable. It will be very helpful if you could provide some logs to help us identify the bugs, and fix them. |
sorry to come back on this, it's not the right place but I don't know any other channel: Maven considers src/main/AndroidManifest.xml to be the standard place, but AndroidStudio/Intellij Run Configuration needs it to be in /. |
Yes, I do run the app from the IDE. The latest versions of Android Studio/IntelliJ have no problem with finding where the manifest file is. P.S. But if you still use maven in master, mvn clean install from the CLI in root folder of the project should build the app and install install it on any Android instances discoverable by adb. |
ok, I was on branch master since the beginning :( sorry for the confusion. Everything seems to works now with Gradle. Question: what's so much better in Gradle over Maven? |
If you have problems restoring a backup, just import it like a normal file. Settings->Accounts->Import XML and then select the file from SDCARD/org.gnucash.android.devel Gradle has been selected by Google as the build tool of choice for Android going forward. So we use it! |
On the lower left corner of Android Studio, there is a label called "Build Variants", in which you can choose which flavor you are building. |
Hi,
I can't restore my last backup: "An error occured while importing the Gnucash accounts".
Can you point me towards what could go wrong?
I have wiped my phone and reinstalled Gnucash-android, the data are still at the same place: /storage/sdcard0/gnucash/backup
The text was updated successfully, but these errors were encountered: