Firebase FCM XMPP server error: connection denied due to policy
NickName:Edijae Crusar Ask DateTime:2017-01-21T18:10:55

Firebase FCM XMPP server error: connection denied due to policy

I am trying to implement an XMPP server in my Google Cloud module (endpoints) for my Android app using Android Studio in order to send downstream messages to devices.

I have found an example project which uses Smark here. The following is the code for the connection:

CcsClient ccs = CcsClient.prepareClient(Utils.FCM_ID,Utils.FCM_KEY,false);
try {
    ccs.connect();
} catch (XMPPException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
} catch (SmackException e) {
    e.printStackTrace();
}

But I am getting the following SmackException:

The following addresses failed: 'fcm-xmpp.googleapis.com:5236' failed because 
java.net.SocketException: Permission denied: connection to 
(10, [2607:f8b0:4001:c06::bc]:5236,6) denied due to policy

How can I fix this?

Copyright Notice:Content Author:「Edijae Crusar」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41778081/firebase-fcm-xmpp-server-error-connection-denied-due-to-policy

More about “Firebase FCM XMPP server error: connection denied due to policy” related questions

Firebase FCM XMPP server error: connection denied due to policy

I am trying to implement an XMPP server in my Google Cloud module (endpoints) for my Android app using Android Studio in order to send downstream messages to devices. I have found an example proj...

Show Detail

Unable to Connect my App Server to FCM XMPP Server

I am trying to connect to FCM XMPP server using Openssl TLS I have registered a project and have a Server Key and Sender ID. I follow the notes in https://firebase.google.com/docs/cloud-messaging/...

Show Detail

One XMPP connection for more than one GCM/FCM app

I have a bunch of FCM projects and I'd like to use the same XMPP connection to send messages for all those projects. The FCM docs say that each connection needs to authenticate with the app id and ...

Show Detail

XMPP server. How to open TLS connection?

I need help with initialization TLS connection to Firebase Cloud Messaging from my XMPP Java server app. I know that FCM do not support STARTTLS extension. How to do it in the other way?

Show Detail

XMPP Connection to Firebase Cloud Messaging Disconnects

When I connect to Firebase Cloud Messaging using XMPP the connection typically disconnects after approximately 10 minutes. What I find is that I have to keep sending an upstream message to FCM ever...

Show Detail

Error: self-signed certificate When connecting to google FCM with XMPP protocol

I am trying to connect to google Firebase Messaging with xmpp protocol with Node Js with node-xmpp-client But I am getting an TLS error Below is the code: const XMPP = require("node-xmpp-clien...

Show Detail

How to send upstream FCM notification from android to spring boot server using XMPP protocol?

I am working on a spring-boot project. Where I am sending FCM notification from my server to android application using Firebase using HTTP protocol, but there is one major update Send FCM notificat...

Show Detail

FCM XMPP interface with VAPID

Is is possible to use the Firebase Cloud Messing XMPP interface with VAPID? I tried to do it, but as soon as I register my javascript client with messaging.usePublicVapidKey('') I get a

Show Detail

FCM XMPP: no 'success' response

I am using nodejs to implement a server application with XMPP. I am following the guide to authorize an XMPP connection. My problem is exactly when I expect a <success xmlns="urn:ietf:params:xm...

Show Detail

Trying to setup device-to-device notifications via FCM; any recommendation when it comes to FCM and choosing XMPP server?

I read the documentation for FCM in Firebase website, looked into answers here for related questions and googled. All good, but as a newbie I am not sure what's best approach when it comes in choos...

Show Detail