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

Cannot view/save previously favorited strips #65

Open
mnalis opened this issue Mar 24, 2023 · 2 comments
Open

Cannot view/save previously favorited strips #65

mnalis opened this issue Mar 24, 2023 · 2 comments

Comments

@mnalis
Copy link

mnalis commented Mar 24, 2023

As noted in #63 (comment), I can no longer access old strips. But the app knows the URL to strip which still works, so it would be great if it could use it:

Could we at least have release that allows access to old strips? e.g. If I go to Mar 2, 2018 it says Dilbert.com is not available. Loading failed and strip is not displayed and also Save current image fails, of course.
But if I click on Open in Browser it leads to https://assets.amuniversal.com/1c5f4a60f24f0135172e005056a9545d it shows the picture just fine. Could it integrated so people could still see / save the strips they are interested in the SimpleDilbert app?


please test with data turned off, it could load the data from cache just fine under such conditions

I did, result is the same. I should clarify: for 2020+ the images are cached and show normally (and can be downloaded). It is only when I try go deeper into the past (like 2018) when images are not cached, that strips are not displayed (nor can be downloaded). The Open in browser works always (unless the Internet is disabled, of course).

saving the image should work, what error are you getting?

Saving works for images that display correctly (e.g. 2020+). For those that don't (e.g. only dark grey screen is displayed with barely visible X over it), if I still try to click download button, I get in my notifications <Untitled> Download unsuccessful without any extra information.

yes, the url is just fine, i don't know, why previous 2 issues happen for you, can you try and provide adb logcat logs ? found some guide, might be helpful: https://www.xda-developers.com/guide-sending-a-logcat-to-help-debug-your-favorite-app/

To my untrained eye, it looks like some kind of http failing to redirect to https.

Here is the logcat that appears when image fails to download (click to expand)
03-24 18:59:35.313  8835  8841 I a.simpledilber: jit_compiled:[OK] void huawei.com.android.internal.policy.PressGestureDetector.checkActionMove(android.view.MotionEvent) @ /system/framework/hwEmui.jar
03-24 18:59:35.322  8835  8835 W HiTouch_PressGestureDetector: Touch pointer move a lot. The moving distance of X is:94.81268, limit is:60The moving distance of Y is:1.0, limit is:60
03-24 18:59:35.323  8835  8841 I a.simpledilber: jit_compiled:[OK] void huawei.com.android.internal.policy.PressGestureDetector.checkMotionEvent(android.view.MotionEvent) @ /system/framework/hwEmui.jar
03-24 18:59:35.740  8835  8835 D GetStripUrlListener: url: http://assets.amuniversal.com/3de0a6f0c6480135071f005056a9545d
03-24 18:59:35.791  8835  8835 I HwViewRootImpl: removeInvalidNode all the node in jank list is out of time
03-24 18:59:35.792  8835  8835 W Glide   : Load failed for http://assets.amuniversal.com/3de0a6f0c6480135071f005056a9545d with size [2148x852]
03-24 18:59:35.792  8835  8835 W Glide   : class com.b.a.c.b.p: Failed to load resource
03-24 18:59:35.792  8835  8835 W Glide   : There was 1 cause:
03-24 18:59:35.792  8835  8835 W Glide   : java.io.IOException(Cleartext HTTP traffic to assets.amuniversal.com not permitted)
03-24 18:59:35.792  8835  8835 W Glide   :  call GlideException#logRootCauses(String) for more detail
03-24 18:59:35.792  8835  8835 W Glide   :   Cause (1 of 1): class com.b.a.c.b.p: Fetching data failed, class java.io.InputStream, REMOTE
03-24 18:59:35.792  8835  8835 W Glide   : There was 1 cause:
03-24 18:59:35.792  8835  8835 W Glide   : java.io.IOException(Cleartext HTTP traffic to assets.amuniversal.com not permitted)
03-24 18:59:35.792  8835  8835 W Glide   :  call GlideException#logRootCauses(String) for more detail
03-24 18:59:35.792  8835  8835 W Glide   :     Cause (1 of 1): class com.b.a.c.b.p: Fetch failed
03-24 18:59:35.792  8835  8835 W Glide   : There was 1 cause:
03-24 18:59:35.792  8835  8835 W Glide   : java.io.IOException(Cleartext HTTP traffic to assets.amuniversal.com not permitted)
03-24 18:59:35.792  8835  8835 W Glide   :  call GlideException#logRootCauses(String) for more detail
03-24 18:59:35.792  8835  8835 W Glide   :       Cause (1 of 1): class java.io.IOException: Cleartext HTTP traffic to assets.amuniversal.com not permitted
03-24 18:59:35.792  8835  8835 I Glide   : Root cause (1 of 1)
03-24 18:59:35.792  8835  8835 I Glide   : java.io.IOException: Cleartext HTTP traffic to assets.amuniversal.com not permitted
03-24 18:59:35.792  8835  8835 I Glide   :      at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:124)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.a.j.a(Unknown Source:107)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.a.j.a(Unknown Source:19)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.c.q$a.a(Unknown Source:24)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.c.q$a.e(Unknown Source:22)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.c.q$a.a(Unknown Source:11)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.a.j.a(Unknown Source:61)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.c.q$a.a(Unknown Source:24)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.b.y.a(Unknown Source:109)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.b.g.k(Unknown Source:23)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.b.g.i(Unknown Source:56)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.b.g.run(Unknown Source:25)
03-24 18:59:35.792  8835  8835 I Glide   :      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-24 18:59:35.792  8835  8835 I Glide   :      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-24 18:59:35.792  8835  8835 I Glide   :      at java.lang.Thread.run(Thread.java:929)
03-24 18:59:35.792  8835  8835 I Glide   :      at com.b.a.c.b.c.a$a$1.run(Unknown Source:31)
03-24 18:59:35.801  8835  8835 D MouseWheelSynthesizer: mMoveStepInDp: 64, mMoveStepInPixel: 192, mUpTimeDelayed: 100
03-24 18:59:35.801  8835  8835 D ViewRootImpl: ViewRootImpl mIsInProductivePCDisplay: false
03-24 18:59:35.810  8835  8835 D InputEventReceiver: dispatchInputInterval 1000000
03-24 18:59:35.822  8835  8859 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
03-24 18:59:37.798  8835  8835 I ViewRootImpl: dispatchDetachedFromWindow in doDie
03-24 18:59:37.802  8835  8859 W libEGL  : EGLNativeWindowType 0x7b9c739e10 disconnect failed

I'm using latest f-droid release (4.7)

i'm not very motivated to do anything since the dlibert is dead, sorry, hopefully official archives will re-appear (you can query Scott directly) and then it will be meaningful to release new version. if you can develop it, do a PR and i'll tackle that asap
i believe AMMU will delete those files as well soon, these cached URLs will stop working as well

I was hoping for extracting few dozen/hundred favorites I've marked in the app over the years before the cache dissapears, yes. I'm not an android programmer and lack programming environment for it, but that http/https might be relatively easy to fix and allow users of your SimpleDilbert app to salvage their old comics they're interested in. (maybe some flag just need turning on, or even hardcoded replacing of http: to https: might fix it)

@smarek
Copy link
Owner

smarek commented Apr 2, 2023

Hey, i think i can do something

  1. if you have rooted device, the best would be to extract data directly
    1. URLs are kept in SharedPreferences, the file is plain xml, you can just open it, keys are dates, values are http(s) url for the strip
    2. Images are cached using the photoview library, actual jpg/png files are stored depending on your android os version and settings, usually internally in app (/data/data/com.mareksebera.simpledilbert/...) or externally (usually /sdcard/Android/...)
  2. issue with saving image is not due to domain deactivation, in "Export cached URLs" functionality crashes #64 it says "Caused by: android.os.TransactionTooLargeException: data parcel size 3189520 bytes", this can be fixed pretty quick
  3. "Cleartext HTTP traffic to assets.amuniversal.com not permitted" this can be fixed fairly easily as well

You have the app installed from f-droid, means it's signed by their release keys, and f-droid is currently struggling to release apps: https://gitlab.com/fdroid/admin/-/issues/382

I can try and develop something without testing it (like fixing the export/share functions, because I don't have the app installed and i cannot obtain historical cache, like you have) or I can develop decomission notification (which I wanted to avoid, since in few weeks we might get public historical archives back) or if you can extract the app contents from your phone (might not even need rooted device), it's best course of action

I have really no free time to invest right now, and if i cannot test the app while making changes (dilbert.com is not accessible, and i have no historical dilbert.com data on my phone), i fear this will be long and painful process.

Also if you go in settings, and set "share url instead of image" function (, you get the url and then you can download the strip manually? If we talking about hundreds of cache images you want to export, some automation would be better, but this is the way you can use right now.

@mnalis
Copy link
Author

mnalis commented Apr 2, 2023

Thanks @smarek !

Regarding (1) unfortunately that phone cannot be rooted (Huawei P30 Pro requires code to unlock bootloader, and they're not giving them anymore). If (2) & (3) could be fixed without too much effort as you say, that would be great! I hope f-droid folks will fix their builds soon so it might get there in future builds.

or if you can extract the app contents from your phone (might not even need rooted device),

I've tried looking without root, as some apps have data available without root under /Android/data/com.app.example, but com.mareksebera.simpledilbert does not seem to be one of them (instead it seems to keep all data private, accessible only to root)

I can try and develop something without testing it (like fixing the export/share functions, because I don't have the app installed and i cannot obtain historical cache, like you have)

I can offer to provide any testing and feedback needed, if you're willing to invest time to make export work. (I can also share that export - once it works - with you if you want; but I'll be content if I can get that export out of the phone)

or I can develop decomission notification (which I wanted to avoid, since in few weeks we might get public historical archives back

Yeah, that should probably only considered once there is no hope of getting historical archives back...

Also if you go in settings, and set "share url instead of image" function (, you get the url and then you can download the strip manually?

I've tried that, unfortunately it only shared things like this: Dilbert 2023-03-07 #simpledilbert https://dilbert.com/strip/2023-03-07 which doesn't really help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants