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

Offline full article getting deleted due to being stored in cachedir #443

Open
4 tasks done
asl97 opened this issue Dec 5, 2024 · 6 comments
Open
4 tasks done

Offline full article getting deleted due to being stored in cachedir #443

asl97 opened this issue Dec 5, 2024 · 6 comments

Comments

@asl97
Copy link
Contributor

asl97 commented Dec 5, 2024

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:


original report:

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same bug report.
  • I have also used the search function for CLOSED issues to see if the problem is already solved and just waiting to be released.
  • I will describe the problem with as much detail as possible.
  • 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 asl97 added the Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet label Dec 5, 2024
@asl97
Copy link
Contributor Author

asl97 commented Dec 5, 2024

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'.

Screenrecorder-2024-12-05-12-05-07-589.mp4

@spacecowboy
Copy link
Owner

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 spacecowboy added Type: Question / support and removed Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet labels Dec 6, 2024
@asl97
Copy link
Contributor Author

asl97 commented Dec 6, 2024

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.

Screenrecorder-2024-12-06-15-01-16-955.mp4

Here is with wifi turned on and the article loading:

Screenrecorder-2024-12-06-15-01-55-914.mp4

I don't think setting is inverted:

Screenrecorder-2024-12-06-14-55-31-619.mp4

@asl97
Copy link
Contributor Author

asl97 commented Dec 6, 2024

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.

false -> {
if (blobFile(article.id, filePathProvider.articleDir).isFile) {
try {
blobInputStream(article.id, filePathProvider.articleDir).use {
htmlLinearizer.linearize(
inputStream = it,
baseUrl = article.feedUrl ?: "",
)
}.also {
textToDisplay.update { TextToDisplay.CONTENT }
}
} catch (e: Exception) {
// EOFException is possible
Log.e(LOG_TAG, "Could not open blob", e)
textToDisplay.update { TextToDisplay.FAILED_TO_LOAD_FULLTEXT }
LinearArticle(elements = emptyList())
}
} else {
Log.e(LOG_TAG, "No default file to parse")
textToDisplay.update { TextToDisplay.FAILED_MISSING_BODY }
LinearArticle(elements = emptyList())

@spacecowboy
Copy link
Owner

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?

@asl97
Copy link
Contributor Author

asl97 commented Dec 6, 2024

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 asl97 changed the title Older articles becoming "Found nothing to fetch" Offline full article getting deleted due to being stored in cachedir Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants