Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Failed to load articles #16

Open
abelini opened this issue Nov 2, 2016 · 1 comment
Open

Failed to load articles #16

abelini opened this issue Nov 2, 2016 · 1 comment

Comments

@abelini
Copy link

abelini commented Nov 2, 2016

This happens right after the launch. So I cannot even see the app working for 2 seconds... I have a self-hosted wordpress installation and the required plugin installed and activated.

So, how can I fix it?

screenshot_20161102-134408

Log:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: me.declangao.wordpressreader, PID: 12077
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.optString(java.lang.String, java.lang.String)' on a null object reference
at me.declangao.wordpressreader.util.JSONParser.parsePosts(JSONParser.java:91)
at me.declangao.wordpressreader.app.RecyclerViewFragment$3.onResponse(RecyclerViewFragment.java:252)
at me.declangao.wordpressreader.app.RecyclerViewFragment$3.onResponse(RecyclerViewFragment.java:246)
at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65)
at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

And this is JSONParser.java:91 post.setFeaturedImageUrl(featuredImages.optJSONObject("full").optString("url", Config.DEFAULT_THUMBNAIL_URL));

@mihau87
Copy link

mihau87 commented Feb 3, 2017

I just installed sugested WP Json

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

No branches or pull requests

2 participants