phonegap-build / PushPlugin

This repository is deprecated head to phonegap/phonegap-push-plugin
https://github.com/phonegap/phonegap-plugin-push
MIT License
1.31k stars 996 forks source link

Android 4.3 + Cordova 3.3.0 - Crash on calling sendJavacript method #184

Open theitalianjob opened 10 years ago

theitalianjob commented 10 years ago

Hi, I've updated my samsung s3 to android 4.3.... after this I've an application crash after the notification registration request... this is the exception log:

V/PushPlugin(13605): ######################## sendJavascript: javascript:onNotificationGCM({"regid":"APA91bFytQORzhcg1_81TDE6iWWmLKrki7HypwTbbsiywC6BaGC3kA-ZXzNTeBsNT5uPAyTOSXeuNFWvkMZ5OJe_7Gb9GroG6PO5Rzcj-IQ3__3JgTm8r517HGYGnJKaI9qOzn_3vHBtgzYY4aBuaseaV7vHYhCK5_cxbyEnYc9j_w6c8_hgFZg","event":"registered"}) W/webview_proxy(13605): java.lang.Throwable: Warning: A WebView method was called on thread 'IntentService[GCMIntentService-GCMIntentService-1]'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads. W/webview_proxy(13605): at android.webkit.WebView.checkThread(WebView.java:2084) W/webview_proxy(13605): at android.webkit.WebView.loadUrl(WebView.java:836) W/webview_proxy(13605): at org.apache.cordova.CordovaWebView.loadUrlNow(CordovaWebView.java:514) W/webview_proxy(13605): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:411) W/webview_proxy(13605): at com.plugin.gcm.PushPlugin.sendJavascript(PushPlugin.java:108) W/webview_proxy(13605): at com.plugin.gcm.GCMIntentService.onRegistered(GCMIntentService.java:47) W/webview_proxy(13605): at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:296) W/webview_proxy(13605): at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:197) W/webview_proxy(13605): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) W/webview_proxy(13605): at android.os.Handler.dispatchMessage(Handler.java:99) W/webview_proxy(13605): at android.os.Looper.loop(Looper.java:176) W/webview_proxy(13605): at android.os.HandlerThread.run(HandlerThread.java:61) V/GCMBaseIntentService(13605): Releasing wakelock W/dalvikvm(13605): threadid=17: thread exiting with uncaught exception (group=0x41936700) E/AndroidRuntime(13605): FATAL EXCEPTION: IntentService[GCMIntentService-GCMIntentService-1] E/AndroidRuntime(13605): java.lang.RuntimeException: java.lang.Throwable: Warning: A WebView method was called on thread 'IntentService[GCMIntentService-GCMIntentService-1]'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads. E/AndroidRuntime(13605): at android.webkit.WebView.checkThread(WebView.java:2093) E/AndroidRuntime(13605): at android.webkit.WebView.loadUrl(WebView.java:836) E/AndroidRuntime(13605): at org.apache.cordova.CordovaWebView.loadUrlNow(CordovaWebView.java:514) E/AndroidRuntime(13605): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:411) E/AndroidRuntime(13605): at com.plugin.gcm.PushPlugin.sendJavascript(PushPlugin.java:108) E/AndroidRuntime(13605): at com.plugin.gcm.GCMIntentService.onRegistered(GCMIntentService.java:47) E/AndroidRuntime(13605): at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:296) E/AndroidRuntime(13605): at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:197) E/AndroidRuntime(13605): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) E/AndroidRuntime(13605): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(13605): at android.os.Looper.loop(Looper.java:176) E/AndroidRuntime(13605): at android.os.HandlerThread.run(HandlerThread.java:61) E/AndroidRuntime(13605): Caused by: java.lang.Throwable: Warning: A WebView method was called on thread 'IntentService[GCMIntentService-GCMIntentService-1]'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads. E/AndroidRuntime(13605): at android.webkit.WebView.checkThread(WebView.java:2084) E/AndroidRuntime(13605): ... 11 more I/ActivityManager( 2346): Notify an ApplicationCrash

hohl commented 10 years ago

Same issue here!