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.25k stars 409 forks source link

Redgifs throwing JSONException #252

Closed anonymous-developer-12 closed 3 years ago

anonymous-developer-12 commented 3 years ago

Hey there,

Over the last few days I've noticed that some videos (notably redgifs) are throwing the following:

01-22 12:24:33.333 25081 25175 W System.err: org.json.JSONException: No value for webmUrl
01-22 12:24:33.334 25081 25175 W System.err:    at org.json.JSONObject.get(JSONObject.java:400)
01-22 12:24:33.334 25081 25175 W System.err:    at org.json.JSONObject.getString(JSONObject.java:561)
01-22 12:24:33.334 25081 25175 W System.err:    at ml.docilealligator.infinityforreddit.FetchGfycatOrRedgifsVideoLinks$ParseGfycatVideoLinksAsyncTask.doInBackground(FetchGfycatOrRedgifsVideoLinks.java:103)
01-22 12:24:33.334 25081 25175 W System.err:    at ml.docilealligator.infinityforreddit.FetchGfycatOrRedgifsVideoLinks$ParseGfycatVideoLinksAsyncTask.doInBackground(FetchGfycatOrRedgifsVideoLinks.java:86)
01-22 12:24:33.334 25081 25175 W System.err:    at android.os.AsyncTask$3.call(AsyncTask.java:394)
01-22 12:24:33.334 25081 25175 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
01-22 12:24:33.334 25081 25175 W System.err:    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
01-22 12:24:33.334 25081 25175 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
01-22 12:24:33.334 25081 25175 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
01-22 12:24:33.334 25081 25175 W System.err:    at java.lang.Thread.run(Thread.java:923)

Reddit link to example crash: https://www.reddit.com/r/JustFriendsHavingFun/comments/l1wmqz/having_her_guess_whos_doing_what_original_content/

Oddly enough, when selecting the share button and then Copy Video Link it provides this link which seems to work in the browser - https://v.redd.it/jwzkglh67oc61/DASH_360.mp4. This is even when the original link isn't even a v.redd.it domain (https://redgifs.com/watch/sociablefabulouscollie).

The app shows this when trying to load the video: photo_2021-01-22_12-46-32

Many thanks!

Edit: Tried app version 4.1.1 and 4.2.0-beta2

theoasispc commented 3 years ago

same issue on both versions :(

anonymous-developer-12 commented 3 years ago

I've been able to fix it locally and create a demo build that works on my phone. PR - https://github.com/Docile-Alligator/Infinity-For-Reddit/pull/253

Docile-Alligator commented 3 years ago

Thank you very much for your help!