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

Google Drive modifies backup files in a way that they cannot be selected anymore in restore #312

Open
franco27 opened this issue Aug 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@franco27
Copy link
Contributor

Hello,

I bought another mobile phone with Android 14 from Motorola. I had installed your app on a mobile phone with Android 10 from Xiaomi.

Through Google Drive, I sent the backup file of your app and downloaded it on the new Motorola phone.

After installing your app, I went into the settings and clicked the button to restore the file. Your app opens the Android file explorer, but the backup file is grayed out and I cannot select it. See the screenshot.

I am using the latest version of your app 0.12.2.

Thank you for your help.Screenshot_20240827-165631.png

@franco27 franco27 added the bug Something isn't working label Aug 27, 2024
@DennisBauer
Copy link
Owner

Hi @franco27 thanks for reporting the issue. Can you please provide a few more details?

  • On which version of the app did you create the backup file?
  • Is the file downloaded on your new Motorola device or still in Google Drive through which you try to select it now in the file browser. I haven't tested this myself, so I'm not sure whether this works.

@franco27
Copy link
Contributor Author

The backup file was created with the current version (which I mentioned in the first message). However, I had created a backup file with the previous version, and I have the same issue after the current version was released. I recreated a backup file, and again encountered the same problem on the new Motorola phone.

On the other hand, on my Xiaomi phone, from which the backup was made, the backup file can be selected. I don’t understand why I cannot select it on the Motorola phone. Both phones have the current or latest version of your application installed.

To answer your question about how I select the backup file: The backup file was downloaded to the Downloads folder on my Motorola mobile phone. (And previously, from my Xiaomi mobile phone, I uploaded this backup file to Google Drive). Please note that I deleted the old one before uploading the new backup file to Google Drive.

@DennisBauer
Copy link
Owner

That's quite weird. I filter the files available for selection by the mime type (application/octet-stream) making sure not all files are available as only the backup files from the app make sense to restore from. I could just think of that this mime type somehow changed in the transfer it to the other device.
Can you please check 2 more things?

  • Is it possible to select the backup file on your old device?
  • Is it possible to restore any other backup on your new device? Maybe just create a single expense and then create a backup of that. Is it possible to select that file on the device?

If that works, and it's actually broken by the transfer I could think of the following workaround. Create a zip file of the backup on your old device and transfer that to the new one. Extract it to the new one and then try to select it from the Expenses app.

Generally I could look into removing the mime type filter if that is really an issue, but then I need to implement another verification with an error message if a user selects a random file which is not a backup file.

@DennisBauer
Copy link
Owner

After testing uploading and downloading a backup file to Google Drive I can confirm that the mime type of the file gets changed during that process. Creating a zip file of the backup file before uploading the file solves the issue. Can you please try to do that? Alternatively you can also transfer the file using quick share or Bluetooth.

@DennisBauer DennisBauer changed the title I cannot restore the backup file that was made from another mobile phone. Google Drive modifies backup files in a way that they cannot be selected anymore in restore Aug 30, 2024
@franco27
Copy link
Contributor Author

franco27 commented Sep 1, 2024

To answer your first question, on the old device with Android 10, when the backup is created, I can indeed select it and open it from the old device after the backup file is created.

As I mentioned in my previous message, I had created two backups on two different dates from the old device with Android 10 and transferred them to Google Drive. And on the new phone with Android 14, after downloading, I was unable to select them.

Sorry for this late response; with the summer holidays, I had a lot of work and very little free time.

On the old device, I just created a ZIP file of the backup file and transferred it to Google Drive. After downloading it on my new Android 14 device, I was finally able to select and open it and restore my data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants