You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.
I encountered this intermittent error on version 1.1.4. The org.jinstagram.utils.LogHelper fails to pretty-print the received JSON from Instagram. Check the stack trace below. Could we simply follow the suggestion (ie. Use JsonReader.setLenient(true) ) ?
Unfortunately I didn't log/capture the actual response from Instagram, so at this point, I'm not sure what kind of response that Instagram sends to us.
10:26:54.943 [pool-1-thread-1] ERROR o.l.p.r.CheckMediaProfileRunnable - A wild throwable appears! idToCrawl: 53267135
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 6
at com.google.gson.JsonParser.parse(JsonParser.java:65) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at com.google.gson.JsonParser.parse(JsonParser.java:45) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.jinstagram.utils.LogHelper.prettyPrintJSONResponse(LogHelper.java:98) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.jinstagram.Instagram.createInstagramObject(Instagram.java:928) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.jinstagram.Instagram.getRecentMediaFeed(Instagram.java:256) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.larc.palanteer.runnable.CheckMediaProfileRunnable.getMediaWithinAMonth(CheckMediaProfileRunnable.java:301) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.larc.palanteer.runnable.CheckMediaProfileRunnable.run(CheckMediaProfileRunnable.java:170) ~[insta-crawler-3.0.0-SNAPSHOT-jar-with-dependencies.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_51]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
The text was updated successfully, but these errors were encountered:
@sachin-handiekar this probably happens when the Instagram API doesn't return 200 OK. For example, try TagMedia.getRecent with an invalid tag, e.g.: "@test". The response code will be 404, and the response document will be HTML instead of JSON.
To prevent this bug, we should be checking for 200 OK, and otherwise return an error / throw an instagram exception.
I encountered this intermittent error on version 1.1.4. The
org.jinstagram.utils.LogHelper
fails to pretty-print the received JSON from Instagram. Check the stack trace below. Could we simply follow the suggestion (ie. UseJsonReader.setLenient(true)
) ?Unfortunately I didn't log/capture the actual response from Instagram, so at this point, I'm not sure what kind of response that Instagram sends to us.
The text was updated successfully, but these errors were encountered: