Open cptwtf opened 1 week ago
Since you are the first (and only) person to report this bug and we don't have access to your phone, the only way to find out where exactly the problem lies is for you to install a debug APK and debug it yourself with ADB and Chrome web inspect.
I have built a debug APK for Waistline that you can install next to the actual Waistline app:
If you want to do this, just download the APK and follow these steps:
Enable developer mode on your phone and install ADB on your computer (see https://www.xda-developers.com/install-adb-windows-macos-linux)
Connect your phone to your PC via USB. Now should show up when you run adb devices
from the terminal on your PC:
Install the debug APK on your phone. The app is called "WaistlineDev" and will coexist with the actual Waistline app without interfering with it.
Open any Chromium browser and enter chrome://inspect
into the address bar. You should see something like this:
Apologies for making this so complicated, but I don't see any other way to find out what the problem is.
thanks a lot for taking the time to explain, i will respond as soon as i found the time
i was able to export the database and diary no errors thrown in app or in the devtools console with the debug version of waistline so no idea whats causing it for me in the regular app, but again thank you for helping me out :)
Edit: ok i just realized the dev app had no data so the import is actually an empty export :/
i was able to export the database and diary no errors thrown in app or in the devtools console with the debug version of waistline
Interesting. The only possible reason I could think of is that you don't have enough free storage space, so exporting a basically empty database works, but exporting the filled database doesn't 🤔 Could that be it?
good thinking and i just rechecked to make sure it wasnt a plain oversight like this, but while i am not sure, i think 11gb free storage space should do the job :D
Yes, 11 GB should be more than enough :)
To which location/folder did the debug app write the backup file? Can you go there with a file browser app (e. g. this one is known to work) and check if there is something suspicious there maybe preventing the regular app from writing the backup?
okay apparently no files were written at all, it gave a success message and after that i went straight to the share backup/csv file option, which successfully shared a json and csv file but containing no content due to the dev app not using the same data but apparently both versions arent able to write the file and only the regular version noticing it it is trying to export to /Android/data/com.waist.dev/files
If Waistline shows you a success message with the file path, it means the file was successfully written. What makes you think that it wasn't? What do you see when you navigate to /Android/data/ in the file browser?
I navigated to the folder which is in exptected structure, but unfortunately no file has been created despite the success message. I attached some screenshots so you can better follow my steps (starting from /Android/data/, used the file browser app you linked to navigate to the path):
heres whats visible in the devtools console when triggering the export, "unfortunately" everythink looks totally fine here to me:
ok so i did some digging and when i inspect devtools console the non dev Waistline app and try to backup the database i am presented with the following error:
i then started to set some breakpoints and was able to extract my data by setting a breakpoint at line 368 of utils.js "backupDir.getFile(filename, { create: true }, (file) => {"
which seems to be the failing function and calling console.log(data) in the console, where data is given to the wrapper function as an argument
while i got no idea whats causing it for me, at first glance i am able to "manually" extract my data this way and while i would happily provide more info if somebody wants to i am perfectly fine with this solution for myself :)
thanks for putting me on the right track how to debug this
edit: just finished and i could in fact copy the output of console.log(data) to a new file waistline_export.json and import it on my new device
@cptwtf I'm glad to hear it worked out for you 🎉
There is one more thing you could check. According to this comment, the backup file may have been written to /storage/self/primary/Android/data/
instead of /storage/emulated/0/Android/data/
. According to the comment, that folder can only be accessed via adb pull. So, if you want, you can check if there is something there. Otherwise you can close this issue.
hi, i cant export data/backup database v3.8.0 and am using a poco x3 with lineageos 14 i got a new phone and sadly when i try to backup my database i am just presented with an "Export Failed" modal error message same goes for diary export
i checked the app permissions and while storage wasnt denied, it also wasnt requested by the app
anyone got an idea how to transfer my food database?