Hi, I am trying to implement push woosh API in my Android application and getting error. It seems register process is OK but setTags fails (getting blocked in the main thread). Please advice. See bellow log file:

06-11 15:23:40.591: W/System.err(13744): com.arellomobile.android.push.exception.PushWooshException: android.os.NetworkOnMainThreadException 06-11 15:23:40.591: W/System.err(13744): at com.arellomobile.android.push.PushManager.sendTagsFromBG(Unknown Source) 06-11 15:23:40.591: W/System.err(13744): at com.pushwoosh.plugin.pushnotifications.PushNotifications.internalSendTags(PushNotifications.java:321) 06-11 15:23:40.591: W/System.err(13744): at com.pushwoosh.plugin.pushnotifications.PushNotifications.execute(PushNotifications.java:378) 06-11 15:23:40.599: W/System.err(13744): at com.arellomobile.android.push.request.RequestManager.makeRequest(Unknown Source) 06-11 15:23:40.599: W/System.err(13744): at com.arellomobile.android.push.request.RequestManager.sendRequest(Unknown Source) 06-11 15:23:40.599: W/System.err(13744): at com.arellomobile.android.push.DeviceFeature2_5.sendTags(Unknown Source) 06-11 15:23:40.599: W/PluginManager(13744): THREAD WARNING: exec() call to PushNotification.setTags blocked the main thread for 28ms. Plugin should use CordovaInterface.getThreadPool(). 06-11 15:23:40.607: D/CordovaLog(13744): file:///android_asset/www/js/lib/phonegap/cordova.js: Line 1034 : processMessage failed: Message: F07 PushNotification1169643433 sInvalid action 06-11 15:23:40.607: I/Web Console(13744): processMessage failed: Message: F07 PushNotification1169643433 sInvalid action at file:///android_asset/www/js/lib/phonegap/cordova.js:1034

asked 11 Jun '14, 13:15
Amit%20Nadir's gravatar image

Amit Nadir


we also have seen this issue and investigate a bit more on this:

This happens with cordova/phonegap since version 3.4 because they have changed the behavior in CordovaWebView.exposeJSInterface() method. All devices with Android < 4.2 using the prompt bridge which means every JS-Call on the Java-Side is executed on the main thread. And the PushManager.sendTagsFromBG in the plugin do the webrequest on the same thread.

There is no issue with Android >= 4.2

I consider this as a bug in the PushManager.sendTagsFromBG() method or in the cordova plugin PushNotifications.internalSendTags() method.

Please Pushwoosh, could you fix this.

permanent link
answered 14 Jul '14, 10:25
Daniel%20Toplak's gravatar image

Daniel Toplak

Same problem here - Would be nice to have a fix for this.

permanent link
answered 14 Oct '14, 08:58
Jacta's gravatar image


We have received a patch from Pushwoosh for Android which fixes the problem, unfortunately this patch is not in the github repo :-(. I suggest that you send a request via the contact us form.

(16 Oct '14, 06:53) Daniel Toplak Daniel%20Toplak's gravatar image

Please don't forget to update Pushwoosh Cordova plugin to 3.4.0!

permanent link
answered 24 Nov '14, 12:12
shader's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Jun '14, 13:15

question was seen: 2,436 times

last updated: 24 Nov '14, 12:12