Title: Plugin crashes Android&#039;s WebView?
Last modified: August 21, 2016

---

# Plugin crashes Android's WebView?

 *  Resolved [jgadsby](https://wordpress.org/support/users/jgadsby/)
 * (@jgadsby)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/)
 * Hi there,
 * First of all, love the plugin – makes the commenting experience much slicker.
   It also works fine on Android’s own web browser.
 * The problem is, it crashes WebView right as the green ‘comment posted’ message
   appears. It crashes my app with a ‘null pointer exception’. Any ideas at all?
 * Thanks!
 * [http://wordpress.org/extend/plugins/wp-ajaxify-comments/](http://wordpress.org/extend/plugins/wp-ajaxify-comments/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673793)
 * Hi,
 * thanks for your comment. Do you have any further information about the error ?
   Is it a client side (JavaScript) error or an application (Java) error? Something
   like a StackTrace, line of code where the error occurred would be helpful to 
   find the cause.
    Have you tried to disable the WP-Ajaxify-Comments plugin to 
   make sure that the error is caused by the plugin?
 * Hope this helps…
 *  Thread Starter [jgadsby](https://wordpress.org/support/users/jgadsby/)
 * (@jgadsby)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673794)
 * I’ve tried disabling the plugin and the site works normally – comments go through
   fine on the app. Here’s the (java?) error I see when the app crashes:
 *     ```
       04-20 17:04:49.588: D/WebView(29814): onSizeChanged - w:480 h:762
       04-20 17:04:51.743: I/GATE(29814): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
       04-20 17:04:51.743: D/AndroidRuntime(29814): Shutting down VM
       04-20 17:04:51.743: W/dalvikvm(29814): threadid=1: thread exiting with uncaught exception (group=0x40fdc2a0)
       04-20 17:04:51.938: E/AndroidRuntime(29814): FATAL EXCEPTION: main
       04-20 17:04:51.938: E/AndroidRuntime(29814): java.lang.NullPointerException
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.shuffleelffuhs.shufflemylife.MainActivity$WebClientClass.onPageFinished(MainActivity.java:110)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.os.Handler.dispatchMessage(Handler.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.os.Looper.loop(Looper.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.app.ActivityThread.main(ActivityThread.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at java.lang.reflect.Method.invokeNative(Native Method)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at java.lang.reflect.Method.invoke(Method.java:511)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
       04-20 17:04:51.938: E/AndroidRuntime(29814): 	at dalvik.system.NativeStart.main(Native Method)
       ```
   
 *  Thread Starter [jgadsby](https://wordpress.org/support/users/jgadsby/)
 * (@jgadsby)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673795)
 * The specific code in the app that seems to be breaking:
 *     ```
       @Override
         public void onPageFinished(WebView view, String url) {
          super.onPageFinished(view, url);
          pd.dismiss();
          pd = null;
         }
        }
       }
       ```
   
 * This code basically just dismisses a ‘loading’ popup in the app once a page has
   finished loading. I suppose there’s some bug here because the comments code isn’t
   technically reloading the page? I’m not sure.
 * Also note that there are other AJAX elements being used on the site but these
   don’t seem to crash?
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673800)
 * I don’t know the internals of your Android application, but you may have to check
   if `pd` is (already) `null` before calling `dismiss()` in the `onPageFinished`
   method.
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673919)
 * Problem seems to be fixed. Please feel free to reopen the thread if you need 
   further assistance…
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673920)
 * Resolved…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Plugin crashes Android's WebView?’ is closed to new replies.

 * ![](https://ps.w.org/wp-ajaxify-comments/assets/icon-256x256.png?rev=2962290)
 * [Ajaxify Comments - Ajax and Lazy Loading Comments](https://wordpress.org/plugins/wp-ajaxify-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ajaxify-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ajaxify-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ajaxify-comments/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [android](https://wordpress.org/support/topic-tag/android/)
 * [Crash](https://wordpress.org/support/topic-tag/crash/)
 * [webview](https://wordpress.org/support/topic-tag/webview/)

 * 6 replies
 * 2 participants
 * Last reply from: [janjonas](https://wordpress.org/support/users/janjonas/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-crashes-androids-webview/#post-3673920)
 * Status: resolved