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

failed to connect to (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


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

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

    <access origin="*"/>

  2. Added cordova plugin add cordova-plugin-whitelist

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


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 [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 (port 443): connect failed: ECONNREFUSED (Connection refused). Response = null 04-11 16:58:19.923: E/Pushwoosh(10037): failed to connect to (port 443): connect failed: ECONNREFUSED (Connection refused) 04-11 16:58:19.923: E/Pushwoosh(10037): at 04-11 16:58:19.923: E/Pushwoosh(10037): at 04-11 16:58:19.923: E/Pushwoosh(10037): at 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 in any android browser ...

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


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


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]( "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: 21 Aug '15, 10:30

question was seen: 1,994 times

last updated: 11 Apr '16, 16:38