Giter Site home page Giter Site logo

Comments (6)

shaders avatar shaders commented on August 21, 2024

Could you please send logs from XCode console? I've tried the setTags code and everything worked fine with success callback. Please note that status variable will be null.

Also don't forget to create tag in the control panel before setting it! Also City is default tag, you might not want to modify it.

from pushwoosh-phonegap-plugin.

iolufemi avatar iolufemi commented on August 21, 2024

Thanks for the reply @shaders
I don't use XCode. I use Eclipse, the app is based in Ionic Framework then built with Cordova.
When i do this,

//settings tags
                       pushNotification.setTags({Clientid:"hello"},
                                    function(status) {
                                        console.warn('setTags success '+status);
                                    },
                                    function(status) {
                                        console.warn('setTags failed '+status);
                                    });

I get "setTags failed Invalid action" in console log. But when i check my Pushwoosh backend, i notice that the tag is set.

from pushwoosh-phonegap-plugin.

shaders avatar shaders commented on August 21, 2024

That is super weird. Just tried Android Cordova sample and everything was fine. Can you post logs?

from pushwoosh-phonegap-plugin.

mlassalle avatar mlassalle commented on August 21, 2024

Hello,

I'm getting the same issues with the setTags method (Pushwoosh plugin
from
https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin) in my
Cordova app in Android (I could not check in iOS yet) :
with Android 4.2.1 :
I can't get the setTags method done (executed right after
registerDevice succesful) :
Error MSG retrieved :
09-05 17:56:04.425: W/Pushwoosh: Request manager(15584): Try To sent:
setTags
09-05 17:56:04.435: E/Pushwoosh: Request manager(15584): at
com.arellomobile.android.push.DeviceFeature2_5.sendTags(Unknown
Source)
09-05 17:56:04.435: E/Pushwoosh: Request manager(15584): at
com.arellomobile.android.push.PushManager.sendTagsFromBG(Unknown
Source)
09-05 17:56:04.435: E/Pushwoosh: Request manager(15584): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.internalSendTags(PushNotifications.java:325)
09-05 17:56:04.445: W/System.err(15584): at
com.arellomobile.android.push.PushManager.sendTagsFromBG(Unknown
Source)
09-05 17:56:04.445: W/System.err(15584): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.internalSendTags(PushNotifications.java:325)
09-05 17:56:04.455: W/System.err(15584): at
com.arellomobile.android.push.DeviceFeature2_5.sendTags(Unknown
Source)
09-05 17:56:04.465: W/PluginManager(15584): THREAD WARNING: exec()
call to PushNotification.setTags blocked the main thread for 39ms.
Plugin should use CordovaInterface.getThreadPool().
09-05 17:56:04.465: W/Web Console(15584): failed to set tags "Invalid
action" at file:///android_asset/www/js/openways/Pushwoosh.js:100

Same code is getting a different result :

Android 4.4.2 :

09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): ERROR:
http://cp.pushwoosh.com/json/1.3/applicationOpen. Response = null
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193):
java.io.FileNotFoundException:
http://cp.pushwoosh.com/json/1.3/applicationOpen
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.request.RequestManager.makeRequest(Unknown
Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.request.RequestManager.sendRequest(Unknown
Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.DeviceFeature2_5.sendAppOpen(Unknown
Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.PushManager$8$1.doWork(Unknown Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.utils.WorkerTask.doInBackground(Unknown
Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.utils.WorkerTask.doInBackground(Unknown
Source)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
android.os.AsyncTask$2.call(AsyncTask.java:288)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-05 18:35:13.331: E/Pushwoosh: Request manager(10193): at
java.lang.Thread.run(Thread.java:841)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): ERROR:
http://cp.pushwoosh.com/json/1.3/setTags. Response = null
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193):
java.io.FileNotFoundException:
http://cp.pushwoosh.com/json/1.3/setTags
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.request.RequestManager.makeRequest(Unknown
Source)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.request.RequestManager.sendRequest(Unknown
Source)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.DeviceFeature2_5.sendTags(Unknown
Source)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.arellomobile.android.push.PushManager.sendTagsFromBG(Unknown
Source)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.internalSendTags(PushNotifications.java:325)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.execute(PushNotifications.java:382)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
org.apache.cordova.PluginManager.exec(PluginManager.java:227)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native
Method)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
android.os.Handler.dispatchMessage(Handler.java:102)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
android.os.Looper.loop(Looper.java:157)
09-05 18:35:13.492: E/Pushwoosh: Request manager(10193): at
android.os.HandlerThread.run(HandlerThread.java:61)
09-05 18:35:13.492: W/System.err(10193):
com.arellomobile.android.push.exception.PushWooshException:
java.io.FileNotFoundException:
http://cp.pushwoosh.com/json/1.3/setTags
09-05 18:35:13.492: W/System.err(10193): at
com.arellomobile.android.push.PushManager.sendTagsFromBG(Unknown
Source)
09-05 18:35:13.492: W/System.err(10193): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.internalSendTags(PushNotifications.java:325)
09-05 18:35:13.492: W/System.err(10193): at
com.pushwoosh.plugin.pushnotifications.PushNotifications.execute(PushNotifications.java:382)
09-05 18:35:13.502: W/System.err(10193): at
org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
09-05 18:35:13.502: W/System.err(10193): at
org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
09-05 18:35:13.502: W/System.err(10193): at
org.apache.cordova.PluginManager.exec(PluginManager.java:227)
09-05 18:35:13.502: W/System.err(10193): at
org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
09-05 18:35:13.502: W/System.err(10193): at
com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native
Method)
09-05 18:35:13.502: W/System.err(10193): at
com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
09-05 18:35:13.512: W/System.err(10193): at
android.os.Handler.dispatchMessage(Handler.java:102)
09-05 18:35:13.512: W/System.err(10193): at
android.os.Looper.loop(Looper.java:157)
09-05 18:35:13.512: W/System.err(10193): at
android.os.HandlerThread.run(HandlerThread.java:61)
09-05 18:35:13.512: W/System.err(10193): Caused by:
java.io.FileNotFoundException:
http://cp.pushwoosh.com/json/1.3/setTags
09-05 18:35:13.512: W/System.err(10193): at
com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
09-05 18:35:13.522: W/System.err(10193): at
com.arellomobile.android.push.request.RequestManager.makeRequest(Unknown
Source)
09-05 18:35:13.522: W/System.err(10193): at
com.arellomobile.android.push.request.RequestManager.sendRequest(Unknown
Source)
09-05 18:35:13.522: W/System.err(10193): at
com.arellomobile.android.push.DeviceFeature2_5.sendTags(Unknown
Source)
09-05 18:35:13.522: W/System.err(10193): ... 12 more
09-05 18:35:13.522: W/PluginManager(10193): THREAD WARNING: exec()
call to PushNotification.setTags blocked the main thread for 60219ms.
Plugin should use CordovaInterface.getThreadPool().
Thank you by advance,

from pushwoosh-phonegap-plugin.

shaders avatar shaders commented on August 21, 2024

Does it still happening?

from pushwoosh-phonegap-plugin.

mlassalle avatar mlassalle commented on August 21, 2024

It seems to be resolved on Android 4.4.2.
Anyway, it's stilll returning Invalid action for Android 4.1.2 BUT it's working (I can send and receive pushes with appropriate tags).
This first issue can be solved.
Moreover, I have some issues for sending pushes from time to time:
createMessage request will end on timeout error (Ajax request).
And then it will work, and not working again, etc etc.

from pushwoosh-phonegap-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.