Feeder icon indicating copy to clipboard operation
Feeder copied to clipboard

Offline full article getting deleted due to being stored in cachedir

Open asl97 opened this issue 1 year ago • 6 comments

12-17-2024: Issue updated with new information and description discovered in #447

Description of Bug

Offline version of article may get deleted by android due to being stored in cachedir, resulting in full version of older article and saved article being permanently lost with only the tiny snippet left for displaying article lines in feed view.

https://developer.android.com/training/data-storage/app-specific#internal-remove-cache

Caution: When the device is low on internal storage space, Android may delete these cache files to recover space. So check for the existence of your cache files before reading them.

Why this is an issue

Feeder list Offline reading as a feature and this affect that feature directly

Expected behaviour

Article shouldn't be deleted while still accessible and available in the feed list

Current behaviour

User can clear the app cache without realizing the consequential.

Android might clear the app cache when low on storage.

Both resulting in lost of full version of older/saved article.

What has been done about this issue:

17-12-2024:

  • Before #447, deleted article only shows Found nothing to fetch, now it show the snippet.

original report:

Checklist

  • [X] I have used the search function for OPEN issues to see if someone else has already submitted the same bug report.
  • [X] I have also used the search function for CLOSED issues to see if the problem is already solved and just waiting to be released.
  • [X] I will describe the problem with as much detail as possible.
  • [X] If the bug only to occurs with a certain feed, I will include the URL of that feed.

App version

2.7.0

Where did you get the app from

F-Droid

Android version

13 TKQ1.221114.001 (1.0.2.0.TKHMIXM) (POCO Official/Xiaomi HyperOS)

Device model

POCO F3

First occurred

Long ago (sorry)

Steps to reproduce

  1. open older feed item
  2. see it says "Found nothing to fetch"

Expected behaviour

It shows the article that is cached,

by changing the settings to show 10 lines, it suggest there is a cached version.

Screenshot_2024-12-05-11-49-49-386_com nononsenseapps feeder

Current behaviour

Old feeds shows "Found nothing to fetch", some of my feed less than a week old are already showing "Found nothing to fetch", making feeder less useful when offline.

Screenshot_2024-12-05-11-49-51-773_com nononsenseapps feeder

Logs

No response

asl97 avatar Dec 05 '24 03:12 asl97

To clarify, I can press the article button to fetch the full article with no issue.

It's the "summary"/article that is suppose to be in the feed itself for offline reading that isn't loading for older feed item and showing 'Found nothing to fetch'.

https://github.com/user-attachments/assets/d5a44079-5bbc-4adc-b062-89e4574e5dc5

asl97 avatar Dec 05 '24 04:12 asl97

You have enabled "fetch full by default" and that is why you are getting an error. feeder can't find the full article to fetch anymore.

when you press the button you switch to the "non-full" version which is always available.

do not enable fetch full by default for feeds which do not need it (like feeder news)

spacecowboy avatar Dec 06 '24 06:12 spacecowboy

My settings are off Screenshot_2024-12-06-15-05-05-292_com nononsenseapps feeder

Here is another old feed with wifi and data turned off, article doesn't load at all.

https://github.com/user-attachments/assets/13989455-1bfc-4717-af9f-48c78c575ed9

Here is with wifi turned on and the article loading:

https://github.com/user-attachments/assets/7e387158-2c4a-4421-b55a-346e2df794ab

I don't think setting is inverted:

https://github.com/user-attachments/assets/d9a7c6d6-f3d0-41cb-9532-7e0cc8b45683

asl97 avatar Dec 06 '24 07:12 asl97

I did a grep on logcat, does this mean the article is gone within feeder? or that the older article ain't properly migrated from the old way of storing them?

~ $ adb logcat | grep 'No default'
12-06 15:28:43.022 14769 14832 E FEEDER_ArticleVM: No default file to parse
12-06 15:29:27.321 14769 14798 E FEEDER_ArticleVM: No default file to parse
12-06 15:29:40.046 14769 14832 E FEEDER_ArticleVM: No default file to parse
12-06 15:29:41.382 14769 14835 E FEEDER_ArticleVM: No default file to parse
12-06 15:29:54.195 14769 14830 E FEEDER_ArticleVM: No default file to parse
12-06 15:29:55.398 14769 14835 E FEEDER_ArticleVM: No default file to parse

I believe it is hitting the false path for fullText. https://github.com/spacecowboy/Feeder/blob/d69df4caef9a860390870a22ab59e640477f4faa/app/src/main/java/com/nononsenseapps/feeder/ui/compose/feedarticle/ArticleViewModel.kt#L190-L210

asl97 avatar Dec 06 '24 07:12 asl97

if you have not enabled full text by default, then it won't try to fetch the full text. so i don't think that's the code path.

during sync feeder writes the articles to disk. have you done anything to clear data or similar which might delete something?

spacecowboy avatar Dec 06 '24 12:12 spacecowboy

There only two place for "Found nothing to fetch" and one for "No default file to parse", if it's not that file/lines, I have no idea where else to look.

I thought maybe if it enter that block of code there, where the file is not found, it can attempt to look else where as there should be somewhere else with the information as it shows it on the feed list when more lines are shown.

I do not recall clearing anything, I do not even have root, and at the very least not this month as one of my most frequently updating feed, notebookcheck, already has feed older than 3rd December 22:32 gone into "Found nothing to fetch".

https://www.notebookcheck.net/News.152.100.html

from the feed titled below onwards: Intel Arc B580 and Arc B570: New desktop graphics cards announced with affordable price tags by Anil Ganti, Tuesday, December 3, 2024 22:32

I don't think the global rom auto clear stuff, the system still says feeder using 306MB user data and 283MB cache.

No idea how to filter by tag so I filter by uid, nothing useful stick out to me.

~ $ adb logcat --uid=10408
--------- beginning of main
12-06 20:45:49.494 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus true
12-06 20:45:49.494 22928 22928 I HandWritingStubImpl: refreshLastKeyboardType: 1
12-06 20:45:49.494 22928 22928 I HandWritingStubImpl: getCurrentKeyboardType: 1
12-06 20:45:53.721 22928 22928 D VRI[Pop-Up Window]: vri.reportNextDraw android.view.ViewRootImpl.performTraversals:4013 android.view.ViewRootImpl.doTraversal:2725 android.view.ViewRootImpl$TraversalRunnable.run:9812 android.view.Choreographer$CallbackRecord.run:1505 android.view.Choreographer$CallbackRecord.run:1513
12-06 20:45:53.721 22928 22928 D VRI[Pop-Up Window]: vri.Setup new sync id=0 syncSeqId=0
12-06 20:45:53.728 22928 22951 E perf_hint: Session creation failed, mPreferredRateNanos: -1
12-06 20:45:53.729 22928 22928 D VRI[Pop-Up Window]: vri.reportDrawFinished syncSeqId=0 android.view.ViewRootImpl.lambda$createSyncIfNeeded$4$android-view-ViewRootImpl:4081 android.view.ViewRootImpl$$ExternalSyntheticLambda2.run:6 android.os.Handler.handleCallback:942 android.os.Handler.dispatchMessage:99 android.os.Looper.loopOnce:211
12-06 20:45:53.762 22928 22928 D VRI[Pop-Up Window]: vri.reportNextDraw android.view.ViewRootImpl.handleResized:2083 android.view.ViewRootImpl.-$$Nest$mhandleResized:0 android.view.ViewRootImpl$ViewRootHandler.handleMessageImpl:6167 android.view.ViewRootImpl$ViewRootHandler.handleMessage:6136 android.os.Handler.dispatchMessage:106
12-06 20:45:53.776 22928 22928 D VRI[Pop-Up Window]: vri.Setup new sync id=1 syncSeqId=0
12-06 20:45:53.783 22928 22928 D VRI[Pop-Up Window]: vri.reportDrawFinished syncSeqId=0 android.view.ViewRootImpl.lambda$createSyncIfNeeded$4$android-view-ViewRootImpl:4081 android.view.ViewRootImpl$$ExternalSyntheticLambda2.run:6 android.os.Handler.handleCallback:942 android.os.Handler.dispatchMessage:99 android.os.Looper.loopOnce:211
12-06 20:45:53.784 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus false
12-06 20:45:53.784 22928 22928 I HandWritingStubImpl: refreshLastKeyboardType: 1
12-06 20:45:53.784 22928 22928 I HandWritingStubImpl: getCurrentKeyboardType: 1
12-06 20:45:57.725 22928 22928 I HandWritingStubImpl: refreshLastKeyboardType: 1
12-06 20:45:57.725 22928 22928 I HandWritingStubImpl: getCurrentKeyboardType: 1
12-06 20:45:57.881 22928 28788 D TrafficStats: tagSocket(126) with statsTag=0xffffffff, statsUid=-1
12-06 20:45:57.882 22928 28786 D TrafficStats: tagSocket(219) with statsTag=0xffffffff, statsUid=-1
12-06 20:45:57.882 22928 28785 D TrafficStats: tagSocket(264) with statsTag=0xffffffff, statsUid=-1
12-06 20:45:57.882 22928 28787 D TrafficStats: tagSocket(293) with statsTag=0xffffffff, statsUid=-1
12-06 20:45:57.886 22928 28789 D TrafficStats: tagSocket(207) with statsTag=0xffffffff, statsUid=-1
12-06 20:45:57.894 22928 22951 D OpenGLRenderer: endAllActiveAnimators on 0xb40000747f314400 (UnprojectedRipple) with handle 0xb400007479f52600
12-06 20:45:57.939 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus true
12-06 20:45:57.939 22928 22928 I HandWritingStubImpl: refreshLastKeyboardType: 1
12-06 20:45:57.939 22928 22928 I HandWritingStubImpl: getCurrentKeyboardType: 1
12-06 20:45:57.958 22928 22933 I enseapps.feeder: Background young concurrent copying GC freed 18MB AllocSpace bytes, 94(2008KB) LOS objects, 27% free, 51MB/70MB, paused 222us,45us total 102.207ms
12-06 20:45:59.145 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus false
12-06 20:46:00.433 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus true
12-06 20:46:00.433 22928 22928 I HandWritingStubImpl: refreshLastKeyboardType: 1
12-06 20:46:00.433 22928 22928 I HandWritingStubImpl: getCurrentKeyboardType: 1
12-06 20:46:00.520 22928 22972 E FEEDER_ArticleVM: No default file to parse
12-06 20:46:01.772 22928 22928 D MIUIInput: [KeyEvent] ViewRootImpl windowName 'com.nononsenseapps.feeder/com.nononsenseapps.feeder.ui.MainActivity', KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=525073382000000, downTime=525073382000000, deviceId=-1, source=0x101, displayId=0 }, phoneEventTime=20:46:01.681
12-06 20:46:01.777 22928 22928 D MIUIInput: [KeyEvent] ViewRootImpl windowName 'com.nononsenseapps.feeder/com.nononsenseapps.feeder.ui.MainActivity', KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=525073460000000, downTime=525073382000000, deviceId=-1, source=0x101, displayId=0 }, phoneEventTime=20:46:01.759
12-06 20:46:02.666 22928 22959 E FEEDER_ArticleVM: No default file to parse
12-06 20:46:02.883 22928 22933 I enseapps.feeder: Background concurrent copying GC freed 17MB AllocSpace bytes, 96(2120KB) LOS objects, 31% free, 51MB/75MB, paused 95us,122us total 208.691ms
12-06 20:46:05.976 22928 22928 D MIUIInput: [KeyEvent] ViewRootImpl windowName 'com.nononsenseapps.feeder/com.nononsenseapps.feeder.ui.MainActivity', KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=525077610000000, downTime=525077610000000, deviceId=-1, source=0x101, displayId=0 }, phoneEventTime=20:46:05.908
12-06 20:46:05.978 22928 22928 D MIUIInput: [KeyEvent] ViewRootImpl windowName 'com.nononsenseapps.feeder/com.nononsenseapps.feeder.ui.MainActivity', KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=525077673000000, downTime=525077610000000, deviceId=-1, source=0x101, displayId=0 }, phoneEventTime=20:46:05.972
12-06 20:46:07.078 22928 22976 E FEEDER_ArticleVM: No default file to parse
12-06 20:46:08.328 22928 22928 D DecorView[]: onWindowFocusChanged hasWindowFocus false
12-06 20:46:17.382 22928 22976 D FEEDER_SENDREAD: Doing work
12-06 20:46:17.384 22928 22976 E FEEDER_SENDREAD: Error when sending readmarks 1001, null
12-06 20:46:17.385 22928 22957 I WM-WorkerWrapper: Worker result FAILURE for Work [ id=f6492ebc-2a19-4fa2-9d51-6500e6fbb9ae, tags={ com.nononsenseapps.feeder.model.workmanager.SyncServiceSendReadWorker, feeder } ]

asl97 avatar Dec 06 '24 13:12 asl97

I've been running into this issue pretty frequently these days, and none of the affected feeds have "fetch full articles" enabled.

Today, when I clicked on "Fetch full article", a completely unrelated article showed up. The other day, on another feed, the article didn't even load.

candideu avatar May 06 '25 22:05 candideu

I've been running into this issue pretty frequently these days, and none of the affected feeds have "fetch full articles" enabled.

Glad to hear from another user about this issue, ie: it isn't just specific to my device

Today, when I clicked on "Fetch full article", a completely unrelated article showed up. The other day, on another feed, the article didn't even load.

Upstream (your feed source) probably changed or removed the article at the source link, unless you got an example that shows otherwise, there's probably nothing can be done about it.

asl97 avatar May 07 '25 11:05 asl97

Upstream (your feed source) probably changed or removed the article at the source link, unless you got an example that shows otherwise, there's probably nothing can be done about it.

@asl97 Here's the feed:

https://joinpeertube.org/rss-en.xml

https://joinpeertube.org/news

The issue seemed to have fixed itself today, but when I was clicking on the latest article ("App v1 is out!"), it wou'd display the text for a completely different article. I checked my other RSS reader at the same time (ReadYou), and it was displaying the right text, so I don't think it was a feed issue.

candideu avatar May 07 '25 12:05 candideu

@candideu The full article issue is upstream,

<link>https://joinpeertube.org/news#app-v1</link>
<guid>https://joinpeertube.org/news#app-v1</guid>

They are linking to the news page instead of the article itself in the feed item, ie: https://joinpeertube.org/news/app-v1

The issue also show up in firefox's reader:

Screenshots of firefox, click to open news page with hash link

Image

article link

Image

Probably best to report upstream to joinpeertube.


Thanks for sharing that you encountered the 'article being deleted' issue though.

Hopefully the maintainer of this project can find time to look into fixing it.


Just a small update on peertube side, they fixed their issue in late May 2025: https://framagit.org/framasoft/peertube/joinpeertube/-/commit/b93b99058aedb8b80fc162c9783d23245260a198

asl97 avatar May 07 '25 17:05 asl97

This just bit me twice today. It would be really nice is this was solved, since at the moment I can't trust the app to keep its state intact.

jjpe avatar Sep 26 '25 16:09 jjpe

@jjpe hasn't affected me after the patch in May 🤷

asl97 avatar Oct 10 '25 11:10 asl97