After I register device (ionic - android) I try to unregister it but i get following error:

failed to connect to cp.pushwoosh.com/127.0.0.1 (port 80) connect failed: ECONNREFUSED (Connection refused)

my code looks like this:

pushNotification.unregisterDevice(function (success) {
                alert('unregistering device success:' + success);
            }, function (fail) {
                alert('unregistering device fail:' + fail);
            });

I'm using pushwoosh-phonegap-3.0-plugin.

What am I doing wrong?

asked 21 Aug '15, 10:30
sffovac's gravatar image

sffovac
112

Hello! Can you confirm that you have done the following?

  1. Whitelisted *.pushwoosh.com domain in the config.xml file:

    <access origin="*.pushwoosh.com"/>

  2. Added cordova plugin add cordova-plugin-whitelist

permanent link
answered 21 Aug '15, 10:47
Benedict's gravatar image

Benedict
7127

edited 21 Aug '15, 10:48

Hi everyone,

is there a solution for this problem?

I got the same error registering a device using the Ionic/Cordova Plugin and I ran it on a real Android device:

Log level: NOISE [PushManager] This is android device [RequestManager] Try To send: registerUser [PushRegistrarGCM] number of receivers for io.ionic.starter: 4 [PushRegistrarGCM] Found 1 receivers for action com.google.android.c2dm.intent.RECEIVE [DeviceRegistrar] Registering for pushes [PushEventsTransmitter] No android.permission.BROADCAST_STICKY. Reverting to simple broadcast [RequestManager] Try To send: applicationOpen [RequestManager] ERROR: failed to connect to cp.pushwoosh.com/127.0.0.1 (port 443): connect failed: ECONNREFUSED (Connection refused). Response = null 04-11 16:58:19.923: E/Pushwoosh(10037): java.net.ConnectException: failed to connect to cp.pushwoosh.com/127.0.0.1 (port 443): connect failed: ECONNREFUSED (Connection refused) 04-11 16:58:19.923: E/Pushwoosh(10037): at libcore.io.IoBridge.connect(IoBridge.java:114) 04-11 16:58:19.923: E/Pushwoosh(10037): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) 04-11 16:58:19.923: E/Pushwoosh(10037): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460) and so on ...

EDIT: I found the problem. I have "AdFree-App" installed which uses localhost to block ads. When I turned of this App, it worked. When the App was turned on, I could not load the site https://cp.pushwoosh.com/ in any android browser ...

permanent link
answered 11 Apr '16, 16:04
RayComBomber's gravatar image

RayComBomber
215

edited 11 Apr '16, 16:38

Hi! Thx for fast answer.

I have, in config.xml:

<access origin="*"/>

and i have added cordova plugin add cordova-plugin-whitelist, but same error remains.

Also i have noticed this message in console

No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.

Could it be related ?

permanent link
answered 21 Aug '15, 14:03
sffovac's gravatar image

sffovac
112

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×39
×21
×12

question asked: 21 Aug '15, 10:30

question was seen: 1,994 times

last updated: 11 Apr '16, 16:38