apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 209 forks source link

java.lang.RuntimeException in function onSharedPreferenceChanged() in file AppPreferences.java:39 #43

Closed berndartmueller closed 8 years ago

berndartmueller commented 9 years ago

Hello,

since yesterday I experienced an exception when using your plugin on an android device. Could you please elaborate on this and fix this issue?

Thank you!

Stack trace:

java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'pool-2-thread-5'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {3b9ad6dd} called on null, FYI main Looper is Looper (main, tid 1) {3b9ad6dd}) at android.webkit.WebView.checkThread(WebView.java:2221) at android.webkit.WebView.loadUrl(WebView.java:866) at org.apache.cordova.CordovaWebView.loadUrlNow(CordovaWebView.java:458) at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:357) at me.apla.cordova.AppPreferences$1.run(AppPreferences.java:39) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.Throwable: A WebView method was called on thread 'pool-2-thread-5'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {3b9ad6dd} called on null, FYI main Looper is Looper (main, tid 1) {3b9ad6dd}) at android.webkit.WebView.checkThread(WebView.java:2211) at android.webkit.WebView.loadUrl(WebView.java:866) at org.apache.cordova.CordovaWebView.loadUrlNow(CordovaWebView.java:458) at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:357) at me.apla.cordova.AppPreferences$1.run(AppPreferences.java:39) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

apla commented 9 years ago

Try 0.7.1

apla commented 8 years ago

Fixed long time ago with bc212d542bf4eb37512c591c10a6ef20f864826a