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

[BUG] Cannot change Auto-Backup Folder when already enabled #58

Closed
theAkito opened this issue Oct 29, 2022 · 19 comments · Fixed by #59
Closed

[BUG] Cannot change Auto-Backup Folder when already enabled #58

theAkito opened this issue Oct 29, 2022 · 19 comments · Fixed by #59
Labels
Bug Something isn't working

Comments

@theAkito
Copy link

Describe the bug
Changing the auto-backup destination folder is not possible, if the feature was already enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Auto-Backup.
  2. Go out of the Auto-Backup settings.
  3. Enter Auto-Backup Settings.
  4. You cannot change the destination folder.
  5. You must disable and enable Auto-Backup to be able to change the destination folder.

Expected behavior
The folder should be changeable after the feature has been enabled.

@theAkito theAkito added the Bug Something isn't working label Oct 29, 2022
@keshav-space
Copy link
Owner

Once you choose a backup destination for the first time immediately a backup is scheduled and gets triggered around ~10-15 sec during that time you can not change the folder. Once the first backup is done you can always change the folder without any problem.

See the below video from Pixel 4 running android@11

backup_changed.mp4

@theAkito
Copy link
Author

Pixel 4 running android@11

Via an emulator?

I tested your claim and it isn't the case on my phone.

Your video also does not represent what is happening on my phone. In your video, the buttons are never greyed out. On my phone, they are always greyed out, once the backup is enabled. No matter how long I wait or if I quit the app, etc. It always stays greyed out.

Running this on Android 11 based custom ROM.

@keshav-space
Copy link
Owner

keshav-space commented Oct 30, 2022

Via an emulator?

Yeah, it's an emulator.

Seems like I was able to reproduce your problem this time.
@theAkito can you confirm this is what you were facing?

Backup_Change_bug.mp4

@theAkito
Copy link
Author

theAkito commented Oct 30, 2022

@theAkito can you confirm this is what you were facing?

No. The video shows the behaviour as you described earlier. Wait for the background job to complete, etc. Then it will work, etc.

In my case:

  1. It does not matter how long you wait.
  2. Both buttons are greyed out. In none of your videos are both greyed out permanently.
  3. It does not change anything, if you go out and go into the Auto Backup screen, again. It remains greyed out. You may re-enter the app and both buttons remain greyed out permanently.

In your second video at 0:16, both buttons should be greyed out forever. It does not ever work again, no matter how much time passes. It can only be worked around, if Auto Backup is disabled and enabled again. This is the only thing that can make the buttons work again.

@keshav-space
Copy link
Owner

No. The video shows the behaviour as you described earlier. Wait for the background job to complete, etc. Then it will work, etc.

but if you see from 0:58-1:02 it's grayed out just like you pointed out.

@theAkito
Copy link
Author

theAkito commented Oct 30, 2022

but if you see from 0:58-1:02 it's grayed out just like you pointed out.

Okay, but it happens for you only later. For me, it happens instantly, permanently. It is never not greyed out. It's always instantly greyed out for me, forever, after enabling Auto Backup.

In your video, it should've been greyed out at 0:16, already.

@keshav-space
Copy link
Owner

keshav-space commented Oct 30, 2022

Thanks, @theAkito for reporting this 🙇

I think I figured out what's causing this problem, fix is on the way.

keshav-space added a commit that referenced this issue Oct 30, 2022
- fixes #58

Signed-off-by: Keshav Priyadarshi <git@keshav.space>
@keshav-space
Copy link
Owner

@theAkito If you want you can test out the fixed version from the pull request. Don't forget to export your data using Manual Export before removing the existing app.

@landry314
Copy link

I have the same issue; it is always grey once turned on no matter what.

From reading above it seems like this is because the backup just isn't working. You are saying above it should be changeable after 15 seconds after the first backup is complete. I never have a backup work. I have tried manual and automatic and it will not make a file.

The permissions are to allow access "to media only". I don't know why this is how the permission is written but maybe this is why. I am choosing /sdcard/Backup/ as my folder. Nothing.

I have a Pixel 5 running LineageOS 19.1

@keshav-space
Copy link
Owner

@landry314 issue is fixed in #59
If you want you can test it out with this apk signed-safenotes-all.apk.zip don't forget to keep a copy of your data by using Manual Export from settings.

@landry314
Copy link

landry314 commented Nov 2, 2022

I cant test the apk above because it has a different signature from my fdroid version and I can't make a backup first... so I have to wait for the next fdroid version.

@keshav-space
Copy link
Owner

I cant test the apk above because it has a different signature from my fdroid version and I can't make a backup first... so I have to wait for the next fdroid version.

No problem, I have just issued the new release and should be available on fdroid by the end of next f-droid build cycle.

@landry314
Copy link

landry314 commented Nov 6, 2022

i got the new release and the backup is still not working. same as before. both in manual export and in auto backup you are asked to choose a folder and when i chose /sdcard/Backup it just moves on without creating a backup file.

in auto backup it says "never" for backup time and greys out the folder choice forever as before.

i tried another folder. nothing. i can not access the data folder for safenotes or i would try there. this might be a permissions thing.

i am on a pixel 5 with lineageos 19.1

@keshav-space
Copy link
Owner

keshav-space commented Nov 7, 2022

  1. Can you see this green lock on your backup screen?

Simulator Screen Shot - iPhone 11 - 2022-10-21 at 03 04 03
2. It's not working on internal storage too?
3. In that case I would need to reproduce this problem locally. Maybe lineageos is handling permissions differently. Do let me know if you know of any emulators for lineageos.

@landry314
Copy link

i see the green lock. internal storage? my path is /sdcard/Backup/ . i can not access the /Android/data/ folder where your internal app has external access. i am on a rooted device and i looked where i could.

@keshav-space
Copy link
Owner

i see the green lock.

That's strange, the green lock is shown if and only if the backup file exists.
Have you used a different file explorer to confirm if the file exists?

The only way forward in my opinion is to somehow reproduce this problem on lineageos, let's see what I can do.

@landry314
Copy link

im sorry, i DONT see the green lock. i thought you meant the green on switch for some reason. you even highlighted it in red. it is so small on my phone.

@theAkito
Copy link
Author

Wanted to test this one again.

Now, it can only be enabled & disabled. No custom folder may be chosen.

Is this intended?

@landry314
Copy link

yes it is. android is moving towards not allowing apps to choose folders to save to. downloads is open and the Android/data folder which confuses people. this is the best solution. stick it in downloads.

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

Successfully merging a pull request may close this issue.

3 participants