Docile-Alligator / Infinity-For-Reddit

A Reddit client for Android
https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit
GNU Affero General Public License v3.0
4.02k stars 404 forks source link

Nothing loads #1648

Closed bbaster closed 3 weeks ago

bbaster commented 1 month ago

Checklist

App version

7.2.1

Where did you get the app from

Other

Android version

ArrowOS 13.1

Device model

Poco X3 Pro

First occurred

today (30th May)

Steps to reproduce

  1. Open the app
  2. Get "Error loading posts" error

Example post, link, markdown...

-

Expected behaviour

Posts load

Current behaviour

Throws an error

Logs

From logcat: org.json.JSONException:` Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject at org.json.JSON.typeMismatch(JSON.java:112) at org.json.JSONObject.<init>(JSONObject.java:172) at org.json.JSONObject.<init>(JSONObject.java:185)

Likely Reddit broke something in the API again...

AlexJoaquimPereira commented 1 month ago

Yeah same with me, it's related to the "posts not loading" thing I raised an issue yesterday. Because the only thing which works is the posts on a profile.

bbaster commented 1 month ago

Doesn't seem related to the newest bugfix, this happened too on an older version.

ditydot commented 1 month ago

Same for me, but on 7.2.2 beta 1. I was halfway through reading a comment when the post suddenly reloaded, and then a whole lotta nothin'.

AlexJoaquimPereira commented 1 month ago

The latest bugfix is the actual solution, we need to apply to the whole app. That isn't the issue. And the app did start crashing out of nowhere then.

If you search for posts they work, but the app crashes in a short while.

Generator commented 1 month ago

It was working till about 17h GMT, i was using the app without issues, then stopped working.

Anonymous works.

Tested RedReader with logged user, also working.

Infinity for Reddit: v7.2.2-beta1

marovira commented 1 month ago

The issue also occurs on Boost (patched with ReVanced) so it's not just Infinity having issues. Feels like reddit broke something again.

Toastie commented 1 month ago

The latest bugfix is the actual solution, we need to apply to the whole app. That isn't the issue. And the app did start crashing out of nowhere then.

If you search for posts they work, but the app crashes in a short while.

Yeah, it seems to be related, nothing except my own profile and my saved posts is loading on 7.2.2.-Beta 1

yuukiAme commented 1 month ago

v7.2.3 is out now. But it fails to patch with Revanced Manager v1.20.1

Spoof client failed: app.revanced.patcher.patch.PatchException: Failed to resolve APIUtilsFinger

so the output app doesn't work with ClientID when I tried to login with my Reddit account.

louis-pre commented 1 month ago

The workaround v7.2.3 introduces is to comment out the spoofed client so if Revanced Manager tries to update it (which I'm pretty sure it does) then it will fail.

You can as easily build your own apk with your own API key, there is a Google Colab for that somewhere or you could do it locally but it's slightly more involved. No need for Revanced here.

yuukiAme commented 1 month ago

The workaround v7.2.3 introduces is to comment out the spoofed client so if Revanced Manager tries to update it (which I'm pretty sure it does) then it will fail.

You can as easily build your own apk with your own API key, there is a Google Colab for that somewhere or you could do it locally but it's slightly more involved. No need for Revanced here.

Can you show a link to a guide that does that? I haven't never done that before. I'm used to Revanced Manager because it's really easy with downloading the APK and patch with my own ClientID. The GUI is pretty user friendly so that's why I stuck with it. I would gladly learn a new method of patching Infinity For Reddit.

flokol120 commented 1 month ago

@yuukiAme: https://colab.research.google.com/drive/13AE8RvjnCfuBJGaACEqxeBIMo33_l-Sc?usp=sharing from https://www.reddit.com/r/Infinity_For_Reddit/comments/14c2v5x/build_your_own_apk_with_your_personal_api_key_in/

4rtemis-4rrow commented 1 month ago

same issue here

7.1.1, patched with revanced

issue started about an hour or 2 ago, so about the same time as you guys

edit: tried patching the new release with revanced, and it caused an error

- Device Info
ReVanced Manager: 1.21.0-dev.2
Model: 23106RN0DA
Android version: 14
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: Yes

- Patch Info
App: ml.docilealligator.infinityforreddit v7.2.3 (Suggested: Any)
Patches version: v4.8.2
Patches added: Default
Patches removed: None
Default patch options changed: Spoof client [OAuth client ID:]

- Settings
Allow changing patch selection: true
Version compatibility check: true
Show universal patches: false
Patches source: revanced/revanced-patches
Integration source: revanced/revanced-integrations

- Logs
Reading APK
Decoding app manifest
Loading patches
Executing patches
Spoof client failed: app.revanced.patcher.patch.PatchException: Failed to resolve APIUtilsFingerprint
    at app.revanced.util.BytecodeUtilsKt.getException(BytecodeUtils.kt:26)
    at app.revanced.patches.reddit.customclients.BaseSpoofClientPatch.execute$executePatch(BaseSpoofClientPatch.kt:44)
    at app.revanced.patches.reddit.customclients.BaseSpoofClientPatch.execute(BaseSpoofClientPatch.kt:46)
    at app.revanced.patches.reddit.customclients.BaseSpoofClientPatch.execute(BaseSpoofClientPatch.kt:11)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:190)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Unknown Source:292)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:71)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$2.invokeSuspend(Unknown Source:76)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:46)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Unknown Source:23)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Unknown Source:73)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:0)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Unknown Source:6)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:470)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$hTJfH-rv2j-9Y91G5H_L5jFDN6U(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)
Unlock subscription failed: app.revanced.patcher.patch.PatchException: 'Unlock subscription' depends on 'Spoof client' that raised an exception:
app.revanced.patcher.patch.PatchException: 'Spoof client' did not succeed previously
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:45)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:91)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Unknown Source:292)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:71)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$2.invokeSuspend(Unknown Source:76)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:46)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Unknown Source:23)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Unknown Source:73)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:0)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Unknown Source:6)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:470)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$hTJfH-rv2j-9Y91G5H_L5jFDN6U(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)

    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:148)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Unknown Source:292)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:71)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$2.invokeSuspend(Unknown Source:76)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:46)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Unknown Source:23)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Unknown Source:73)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:0)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Unknown Source:6)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:470)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$hTJfH-rv2j-9Y91G5H_L5jFDN6U(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)
Compiling patched dex files
Compiled 4 dex files
Aligning APK
Signing APK
Patched APK
edgan commented 1 month ago

It was working till about 17h GMT, i was using the app without issues, then stopped working.

Anonymous works.

Tested RedReader with logged user, also working.

Infinity for Reddit: v7.2.2-beta1

@Generator

Can you say more on RedReader working for you? RedReader seems to work, as a logged in user, mostly if I don't put in a custom access token. Yet some features are broken. If I do put in a custom access token I get errors on logging in.

yuukiAme commented 1 month ago

@flokol120

Thank you. After I changed my redirect uri in Reddit preference, everything works just fine after building the APK for the first time ever.

but the version that I built but I did not select was version 7.2.2-beta1. In the Google Scholar, there was no choosing version 7.2.3.

edgan commented 1 month ago

Thank you. After I changed my redirect uri in Reddit preference, everything works just fine after building the APK for the first time ever.

but the version that I built but I did not select was version 7.2.2-beta1. In the Google Scholar, there was no choosing version 7.2.3.

@yuukiAme I too got it working.

edgan commented 1 month ago

The solution seems to be as seem as removing "android:" from the user agent for Slide, and it seems the same will work for Infinity for Reddit.

diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
index 4a87af1c..fb22d72b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
@@ -46,7 +46,7 @@ public class APIUtils {
     public static final String AUTHORIZATION_KEY = "Authorization";
     public static final String AUTHORIZATION_BASE = "bearer ";
     public static final String USER_AGENT_KEY = "User-Agent";
-    public static final String USER_AGENT = "android:ml.docilealligator.infinityforreddit:v7.2.0-beta1 (by /u/Hostilenemy)";
+    public static final String USER_AGENT = "ml.docilealligator.infinityforreddit:v7.2.0-beta1 (by /u/Hostilenemy)";

     public static final String GRANT_TYPE_KEY = "grant_type";
     public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";

Edit: Not my solution. /u/bigscrub1 on Reddit gave me this link.

https://old.reddit.com/r/revancedapp/comments/1d4d4ea/did_reddit_break_third_party_apps_dev_token_patch/l6divr5/

bbaster commented 1 month ago

Now it's all working fine, even on 7.2.1 with the old patches. Maybe Reddit fixed this on their side...

4rtemis-4rrow commented 1 month ago

yup, working for me too, I do suppose it was an issue on reddit's side

I patched 7.2.2, but it didn't work, kept it and went to sleep, when I woke up, it was working, even though I didn't change anything

adripo commented 2 weeks ago

@Docile-Alligator should we revert back the user-agent to the standard android:... now that the issue is solved or we keep using mobile:... ?

ref: https://github.com/Docile-Alligator/Infinity-For-Reddit/blob/master/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java#L49