Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
BlackBerry Development Advisor
kwallis
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10

Re: suddenly push notification working stop error 401 unauthorized server

Great, thanks for reporting back everyone.

Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis
Contributor
siddupatil
Posts: 23
Registered: ‎03-17-2014
My Device: 9220

Re: suddenly push notification working stop error 401 unauthorized server

Hi,

 

Push Notification is not yet working for me , while the device is trying to request for the registration for push notification, the http response is 502 ..!!  

 

Kindly have a look at the issue and let me know where exactly it is failing... 

New Developer
BDigital
Posts: 16
Registered: ‎04-22-2014
My Device: BlackBerry Z10

Re: suddenly push notification working stop error 401 unauthorized server

can you paste the full request and response texts exchanged during registration process??

Contributor
siddupatil
Posts: 23
Registered: ‎03-17-2014
My Device: 9220

Re: suddenly push notification working stop error 401 unauthorized server

Model = Blackberry 9220
OS = 7.1

Push Configurations :
port : 35xxx
App ID : 48XX-56B612e003O84y85906Mi7hhhl0062536l7
BPS server URL : https://cp48XX.pushapi.eval.blackberry.com
Push Initiator app URL : http://cp48XX.pushapi.eval.blackberry.com


following is the code from the pushdemo that i downloaded from

https://developer.blackberry.com/devzone/develop/platform_services/sample_push_service_applications....


here is the code.

publicstatic String request( String httpUrl, Transaction tx ) throws IOException {
checkTransaction( tx );

DataBuffer buffer = new DataBuffer( 256, false );
InputStream is = null;
Connection conn = null;
try {
// append connection suffix
httpUrl += getConnectionSuffix();
Logger.log( "Opening URL: " + httpUrl );
conn = Connector.open( httpUrl );
tx.setNetworkOperation( conn, is );
if( conn instanceof HttpConnection ) {
HttpConnection httpConn = (HttpConnection) conn;
int responseCode = httpConn.getResponseCode();
is = httpConn.openInputStream();
tx.setNetworkOperation( conn, is );
int length = is.read( buffer.getArray() );
buffer.setLength( length );

String response = new String( buffer.getArray(), buffer.getArrayStart(), buffer.getArrayLength() );

System.out.println(" response = "+response); ---------> Here the response is 502.
if( responseCode == 200 ) {
Logger.log( "HTTP response: " + response );
return response;
} else {
//Logger.warn( "HTTP error response: " + response );
System.out.println("HTTP error response: " + response);
thrownew IOException( "Http error responseCode : " + responseCode + ", " + response );

}
} else {
thrownew IOException( "Can not make HTTP connection for URL '" + httpUrl + "'" );
}
} finally {
PushUtils.close( conn, is, null );
tx.clearNetworkOperation();
}
}
Contributor
siddupatil
Posts: 23
Registered: ‎03-17-2014
My Device: 9220

Re: suddenly push notification working stop error 401 unauthorized server

to Add to the above mail,
The error that is shown is the PushDemo app is.........
" Request to register failed.Caused by java.io.IOException: Network operation [Subscribe] failed ... Make sure that content provider URL is acceeible."
BlackBerry Development Advisor
twindsor
Posts: 832
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: suddenly push notification working stop error 401 unauthorized server

Can you try a Ping and a Traceroute on the push URL that you are trying to reach? There should be no blockage on this end.

Tim Windsor
Open Source Technical Lead
Contributor
siddupatil
Posts: 23
Registered: ‎03-17-2014
My Device: 9220

Re: suddenly push notification working stop error 401 unauthorized server

[ Edited ]

Hi Twindsor,

this is how it reads when i ping and traceroute

Pinging cp48xx.pushapi.eval.blackberry.com [206.53.155.184] with 32 bytes of data:
Reply from 206.53.155.184: bytes=32 time=301ms TTL=232
Reply from 206.53.155.184: bytes=32 time=301ms TTL=232
Reply from 206.53.155.184: bytes=32 time=301ms TTL=232
Reply from 206.53.155.184: bytes=32 time=301ms TTL=232

Ping statistics for 206.53.155.184:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 301ms, Maximum = 301ms, Average = 301ms

New Developer
mailkishorev
Posts: 8
Registered: ‎06-27-2014
My Device: 9900,9860

Re: suddenly push notification working stop error 401 unauthorized server

Hi,

 

Even I am unable to register to blackberry push services and getting the same error as siddupatil for push evaluation credentials. Before it was working fine, from 4 weeks I'm facing this problem. I have Airtel Carrier with BIS enabled but still when I try to register using the PPG url, I am getting Connection reset by peer intead of rc=200.

 

Regards,

Kishore

Contributor
siddupatil
Posts: 23
Registered: ‎03-17-2014
My Device: 9220

Re: suddenly push notification working stop error 401 unauthorized server

Hi Kishore,

You are getting response 502....????
New Developer
mailkishorev
Posts: 8
Registered: ‎06-27-2014
My Device: 9900,9860

Re: suddenly push notification working stop error 401 unauthorized server

Yes. I am getting response code 502. Previously it was working fine and I was able to register and receive push messages also but suddenly it stopped working for me.