andstatus / todoagenda

Android home screen widgets showing future (and past) calendar events and tasks
Apache License 2.0
125 stars 19 forks source link

Tasks permission keeps failing after a week #108

Closed CelianGdfrd closed 9 months ago

CelianGdfrd commented 2 years ago

Similar to #101 but not fixed at all.

It seems like permission to access the tasks cancels itself after a while (approx. one week), causing tasks to disappear from the widget. Reinstalling fixs the problem for another week. Setting permission to "Deny" doesn't cause the app to prompt again. Downgrading the app doesn't fix.

OnePlus 7T Pro

yvolk commented 2 years ago

This is Android system that should remember these permissions. So I would say that that this is your device firmware bug. Just a guess: maybe the bug shows when your tasks app is being updated.

CelianGdfrd commented 2 years ago

I'm using https://github.com/tasks/tasks, which is supposed to be recommended for Etar. And permissions removal isnt correlated to app updates.

yvolk commented 2 years ago

In any case our app doesn't even try to store permissions anywhere. You could lookup in your device setting a list of permissions currently granted to any app. So I guess after the next permissions problem appearance you will see there that some permission previously granted to ToDo Agenda was lost?!

CelianGdfrd commented 2 years ago

image Screenshot_20220821-111610

Okay, by "luck" the problem just occurred again, so here's what I see. Sorry for the French.

My tasks disappear from the widget. Then when I go in the Calendars section of the settings, I can see that under the tasks list (here "Personnal" and "University"), it says "Not found" (e-mail address redacted). Then, when I go to the app settings, it says that the permissions are still granted to Todo...

I'm puzzled, I have to say.

yvolk commented 2 years ago

"Not found" in this list means that our widget does remember that some tasks list with such a name was previously selected for showing in the widget. But currently this "tasks list" is not found among the whole list of available "tasks lists" provided by the "Tasks app" installed on your device. This may mean that currently "ToDo Agenda" app is not allowed (or fails for other reason) to retrieve the list from the "Tasks app"... Maybe the problem lays on the Tasks app side: its declaration of "Android intents" to query data from it...

CelianGdfrd commented 2 years ago

Then I'm quite unsure what my next course of action could be.

yvolk commented 2 years ago

@Kalytis Permissions for other apps (including for ToDo Agenda) to access tasks lists are controlled by the Tasks app that you are using. So I think that you need to raise an issue in that Tasks app issues. Referring to this discussion, of course.

As I see you did :-)

tasks/tasks#1983

CelianGdfrd commented 1 year ago

Hi, by any chance have you got a new idea about that, please ?

yvolk commented 1 year ago

Hi @Kalytis. I made a test on Android 13:

  1. Installed Tasks app, latest version from F-Droid (v.13...) And added a couple of tasks
  2. Installed ToDo Agenda, latest version. Created a Widget, granted permissions and see the two tasks in the widget.

image

  1. I navigated to Settings -> Permission Manager -> Tasks Permission and Disallowed the permission for ToDo Agenda: image

  2. I returned to the Home screen of the Device and I immediately see a prompt to grant permissions image

  3. Grant permission by clicking on the widget, and after returning to Home screen I do see the same tasks again...

    • so this is really not the same situation as you observe.

My advice is in a case of a problem, in order not to re-install the app to try this:

  1. Remove Tasks permission for ToDo Agenda, and then explicitly grant it again.
  2. Restart your device after re-granting Tasks permission in a case nothing appeared.
yvolk commented 9 months ago

@Kalytis in v.4.8.0 I improved permissions checks, this may help figuring out, what is wrong Please see https://github.com/andstatus/todoagenda/issues/80#issuecomment-1875279598

CelianGdfrd commented 9 months ago

Haven't had the problem for a long time, but thank you very much !

yvolk commented 9 months ago

Thank you for feedback!