[GH-ISSUE #506] Auto delete after X doesn't work #384

Closed
opened 2026-05-07 00:23:41 +02:00 by BreizhHardware · 5 comments

Originally created by @binwiederhier on GitHub (Nov 17, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/506

I subscribed to mytopic and have notifications from 11/7 even though it's 11/17 and i have it set to auto delete after a week.

Originally created by @binwiederhier on GitHub (Nov 17, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/506 I subscribed to mytopic and have notifications from 11/7 even though it's 11/17 and i have it set to auto delete after a week.
BreizhHardware 2026-05-07 00:23:41 +02:00
Author
Owner

@binwiederhier commented on GitHub (Nov 19, 2022):

I checked my logs and all I see is

1668515001379 2022-11-15 07:23:21.379 D NtfyDeleteWorker Deleting icons for deleted notifications

No other messages from the DeleteWorker, indicating that it crashes somewhere. Sadly, the stack trace is not logged.
I will do some digging with adb on my phone to see if there is a stack trace. If not, I'll deploy a version to my phone and see if I can capture a stack trace.

<!-- gh-comment-id:1320953395 --> @binwiederhier commented on GitHub (Nov 19, 2022): I checked my logs and all I see is ``` 1668515001379 2022-11-15 07:23:21.379 D NtfyDeleteWorker Deleting icons for deleted notifications ``` No other messages from the DeleteWorker, indicating that it crashes somewhere. Sadly, the stack trace is not logged. I will do some digging with `adb` on my phone to see if there is a stack trace. If not, I'll deploy a version to my phone and see if I can capture a stack trace.
Author
Owner

@binwiederhier commented on GitHub (Nov 19, 2022):

2022-11-19 14:42:55.031 16181-16326/? D/NtfyDeleteWorker: Deleting icons for deleted notifications
2022-11-19 14:42:55.060 16181-16344/? E/WM-WorkerWrapper: Work [ id=6cd94a9c-b9e1-45d8-ba3b-c64b00f8b1bd, tags={ io.heckel.ntfy.work.DeleteWorker, NtfyDeleteWorker, NtfyDeleteWorkerPeriodic } ] failed because it threw an exception/error
    java.util.concurrent.ExecutionException: java.io.FileNotFoundException: Not found or empty: content://io.heckel.ntfy.provider/cache_files/icons/a7f59d229c2e298587d58364a8c346e0aa698096584d4f59ae50b6778c21c143
        at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516)
        at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
        at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311)
        at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
        at java.lang.Thread.run(Thread.java:1012)
     Caused by: java.io.FileNotFoundException: Not found or empty: content://io.heckel.ntfy.provider/cache_files/icons/a7f59d229c2e298587d58364a8c346e0aa698096584d4f59ae50b6778c21c143
        at io.heckel.ntfy.util.UtilKt.fileStat(Util.kt:256)
        at io.heckel.ntfy.work.DeleteWorker.deleteExpiredIcons(DeleteWorker.kt:72)
        at io.heckel.ntfy.work.DeleteWorker.access$deleteExpiredIcons(DeleteWorker.kt:24)
        at io.heckel.ntfy.work.DeleteWorker$doWork$2.invokeSuspend(DeleteWorker.kt:35)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2022-11-19 14:42:55.061 16181-16344/? I/WM-WorkerWrapper: Worker result FAILURE for Work [ id=6cd94a9c-b9e1-45d8-ba3b-c64b00f8b1bd, tags={ io.heckel.ntfy.work.DeleteWorker, NtfyDeleteWorker, NtfyDeleteWorkerPeriodic } ]
<!-- gh-comment-id:1320955752 --> @binwiederhier commented on GitHub (Nov 19, 2022): ``` 2022-11-19 14:42:55.031 16181-16326/? D/NtfyDeleteWorker: Deleting icons for deleted notifications 2022-11-19 14:42:55.060 16181-16344/? E/WM-WorkerWrapper: Work [ id=6cd94a9c-b9e1-45d8-ba3b-c64b00f8b1bd, tags={ io.heckel.ntfy.work.DeleteWorker, NtfyDeleteWorker, NtfyDeleteWorkerPeriodic } ] failed because it threw an exception/error java.util.concurrent.ExecutionException: java.io.FileNotFoundException: Not found or empty: content://io.heckel.ntfy.provider/cache_files/icons/a7f59d229c2e298587d58364a8c346e0aa698096584d4f59ae50b6778c21c143 at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516) at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475) at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311) at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.FileNotFoundException: Not found or empty: content://io.heckel.ntfy.provider/cache_files/icons/a7f59d229c2e298587d58364a8c346e0aa698096584d4f59ae50b6778c21c143 at io.heckel.ntfy.util.UtilKt.fileStat(Util.kt:256) at io.heckel.ntfy.work.DeleteWorker.deleteExpiredIcons(DeleteWorker.kt:72) at io.heckel.ntfy.work.DeleteWorker.access$deleteExpiredIcons(DeleteWorker.kt:24) at io.heckel.ntfy.work.DeleteWorker$doWork$2.invokeSuspend(DeleteWorker.kt:35) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-11-19 14:42:55.061 16181-16344/? I/WM-WorkerWrapper: Worker result FAILURE for Work [ id=6cd94a9c-b9e1-45d8-ba3b-c64b00f8b1bd, tags={ io.heckel.ntfy.work.DeleteWorker, NtfyDeleteWorker, NtfyDeleteWorkerPeriodic } ] ```
Author
Owner

@binwiederhier commented on GitHub (Nov 19, 2022):

Done in github.com/binwiederhier/ntfy-android@69fdd30a26 + github.com/binwiederhier/ntfy-android@4bfc72c1c9

<!-- gh-comment-id:1320959035 --> @binwiederhier commented on GitHub (Nov 19, 2022): Done in https://github.com/binwiederhier/ntfy-android/commit/69fdd30a26628dd079a512d7efe44efe47ee1223 + https://github.com/binwiederhier/ntfy-android/commit/4bfc72c1c96fe2d487047420d0a36a23f8e84953
Author
Owner

@wunter8 commented on GitHub (Nov 20, 2022):

Thanks for cleaning up after me! 😬

<!-- gh-comment-id:1321011035 --> @wunter8 commented on GitHub (Nov 20, 2022): Thanks for cleaning up after me! 😬
Author
Owner

@binwiederhier commented on GitHub (Nov 20, 2022):

The hands that make mistakes belong to those who work.

No worries at all. I'm so happy that you're contributing. I couldn't care less about bugs that pop up because of it. ❤️

<!-- gh-comment-id:1321011274 --> @binwiederhier commented on GitHub (Nov 20, 2022): The hands that make mistakes belong to those who work. No worries at all. I'm so happy that you're contributing. I couldn't care less about bugs that pop up because of it. :heart:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#384
No description provided.