mpcjanssen / simpletask-android

GNU General Public License v3.0
550 stars 128 forks source link

repeating "Saving of todo file failed" popup message #1088

Closed spiralofhope closed 3 years ago

spiralofhope commented 4 years ago

Version

Click to expand Simpletask 10.5.4 Settings > About phone > * Custom built version: alps-mp-q0.mp1.V8.4 Settings > About phone > Android version * Android version: 10 * Android Security patch level: 5 December 2019 * Baseband version: MOLY.LR12A.R3.MP.V84.T1,MOLY.LR12A.R3.MP.V84.T1 * Kernel version: 4.14.141 * `#1` Thu Mar 19 09:23:51 CST 2020 * Build number: UMIDIGI_Power_3_V1.1_20200319

Problem

Simpletask keeps regularly shows a popup reporting that the autosave fails.

It has storage permission, and I confirm that the file is being changed.

mpcjanssen commented 4 years ago

please attach the logging after this happens. from Settings->other

spiralofhope commented 4 years ago

https://gist.github.com/spiralofhope/25e6edda132ce114a9c22e84f6495aaa

aubreyz commented 4 years ago

Perhaps not entirely related but my dropbox version persistently fails to write and creates a new dropbox file (with numbers appended) citing version clash (even though my single phone and simpletask are the SOLE devices connected to my dropbox account, so there is nothing else altering things).

It works still but the file that it is using and saving to is the latest so called conflicted copy -- so I get nervous about the integrity of my data (albeit that it works fine through the transmuting file names)

simpletask problem

mpcjanssen commented 4 years ago

this is the cloudless version giving an error?

aubreyz commented 4 years ago

No the cloudless version works great.

It is the dropbox version that is causing the problem. I actually have both versions running and I use them for different purposes.

mpcjanssen commented 4 years ago

@aubreyz that was a question for @spiralofhope

spiralofhope commented 4 years ago

this is the cloudless version giving an error?

Yes it is just simpletask from f-droid.

does the cloudless version have storage access?

Yes it does. I am able to open, change and save files normally. This message keeps appearing, but it does not need to.

scheunengeist commented 3 years ago

I have the same problem now after switching to LineageOS 17.1 (Android 10), using Simpletask Cloudless 10.9.0 from F-Droid: popup "Saving of todo file failed".

After reinstalling Simpletask, I'm greeted with "Loading of todo file failed". Trying to open my todo file from the menu entry produces a seemingly crippled file picker, showing nothing but ".." below the alleged current directory. No files are shown, and I cannot pick anything.

The log has grown huge quickly, so I don't put it up here in full. From the log, I took the standard file location where ST is looking for the todo.txt file. My todo.txt file is in fact located elsewhere. Copying it to the standard location shows all of my entries, and modifying the file seems to work, as it does not produce "Saving of to do file failed" message.

The application has storage permission. Maybe Android 10 changed something in this permission area?

Thanks in advance for looking into this issue!

Edit: I also found these issues that may be related (Android Q / Storage Access Framework): https://github.com/mpcjanssen/simpletask-android/issues/1022 https://github.com/mpcjanssen/simpletask-android/issues/1012 https://github.com/mpcjanssen/simpletask-android/issues/969

smichel17 commented 3 years ago

Perhaps also #1100 and #1102; and see #1110

scheunengeist commented 3 years ago

After reading a bit more (thanks @smichel17 for the additional links), I'd like to add two things:

Edit: Sorry for exhuming this issue once more, I'd like to correct my statement above in case anybody reads it in search of a solution. In the abovementioned artifacts version, file sync doesn't always seem to work, and direct editing the entry line of a task doesn't seem to do anything. Reverting to 'standard' ST and having the file under data/...

mpcjanssen commented 3 years ago

@scheunengeist can you try the version https://mpcjanssen.nl/artifacts/10.9.0-2-f162a66-fullaccess/cloudless/release/app-cloudless-release.apk ?

scheunengeist commented 3 years ago

@mpcjanssen Sorry, didn't get around to it right away. When trying to install the above version, the packet installer gives me an error "parsing the package".

mpcjanssen commented 3 years ago

@scheunengeist you are on Android 11?

edit: I see you are on Android 10. Android 10 also changed something with file storage access. In which case using the normal cloudless version https://mpcjanssen.nl/artifacts/10.9.0/apk/cloudless/release/app-cloudless-release.apk should still work. Not sure what might be causing the todo file saved errors in that case. You do not have an option to go to the root of the storage and navigate from there?

scheunengeist commented 3 years ago

That's correct, I'm using LineageOS 17.1, which corresponds to Android 10.

The version of ST you posted above behaves in the same way the one on F-Droid does (don't know if they are different): I can open a file picker dialog through "open todo file", but anything outside /storage/emulated/0/Android/data/nl.mpcjanssen.simpletask is invisible (except for '..', which brings me ever higher into seemingly empty directories up to /).

When using the above directory as location for the todo and done files, everything works fine. Personally, I can live with this, as long as my files stay offline. I'm syncing / backing up my data using adb-sync, so I just added the 'new standard' file directory to my list of stuff to pull. People who go the Syncthing/Nextcloud way may have a bigger plight.

mpcjanssen commented 3 years ago

@scheunengeist can you try with this version: https://mpcjanssen.nl/artifacts/issues/1088/app-cloudless-release.apk which falls back to the old Android 9 permission system om Android 10. It works as expected on my LineageOS 17.1 pixel 2.

mpcjanssen commented 3 years ago

@aubreyz could you log a separate issue for you Dropbox multiple conflict files?

mpcjanssen commented 3 years ago

I now have a build which should have full storage access both on Android 10 and lower devices and on Android 11. This will probably be the next f-droid release.

aubreyz commented 3 years ago

I am ecstatically happy that you have managed to get out of the (well merited) depression @mpcjanssen

I have stopped using the Dropbox version completely (because of this) so would be a bad candidate to test it.... That said the current Webdav version very occasionally does something odd but different

Dropbox past issue:

Webdav

I think if I were testing I would do it with very rapid successive updates on a fairly large file

mpcjanssen commented 3 years ago

@aubreyz if it happens again please log a separate issue. What might be related is the 6s delay Simpletask now waits after the last change before writing the file. Maybe reducing the time in the settings makes a difference. I have a feeling this is related to Auto Archive, do you use this?

mpcjanssen commented 3 years ago

Perhaps not entirely related but my dropbox version persistently fails to write and creates a new dropbox file (with numbers appended) citing version clash (even though my single phone and simpletask are the SOLE devices connected to my dropbox account, so there is nothing else altering things).

It works still but the file that it is using and saving to is the latest so called conflicted copy -- so I get nervous about the integrity of my data (albeit that it works fine through the transmuting file names)

simpletask problem

@aubreyz see https://github.com/mpcjanssen/simpletask-android/issues/1116 for this issue

scheunengeist commented 3 years ago

@mpcjanssen I installed https://mpcjanssen.nl/artifacts/issues/1088/app-cloudless-release.apk and can confirm that I can navigate through the file system, open and save todo.txt from my 'old' location, as well as edit and archive issues with no error messages, as far as tested.

mpcjanssen commented 3 years ago

I'll close this issue then. Any remaining non-cloudless issues can become new issues.

scheunengeist commented 3 years ago

Thanks for your work on this!

spiralofhope commented 3 years ago

I'll close this issue then. Any remaining non-cloudless issues can become new issues.

Just to follow up, the error message does continue but only displays once; this is an acceptable annoyance.

I'm using 10.9.1 on F-Droid (from 2021-04-11)

Thanks for your effort. 👍