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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Push Development

Reply
Contributor
tiagormribeiro
Posts: 11
Registered: ‎07-12-2012
My Carrier: Vodafone
Accepted Solution

Blackberry Push Service - Error 10026 in Subscribe message

Hello everybody.

 

I'm trying to solve a problem implementing a Blackberry Push Service in java. I've downloaded the SDK (without TomCat because I already have one) and I started the "sample-push-initiator" locally.

 

Before you ask I've installed the DB and I see a "push application" at bpss_push_application table. The registry in DB contains this:

id=[my app id]

name=[my app name]

lowername=[my app name] in lower case

version=1.0

username=[my app name] I've user this because I don't know what to use...

public_password=null

enterprise_password=[Pwd field in PDF delivered by Blackberry with my credentials]

description=Sample Push Initiator

max_daily_quota=1000

status=ACTIVE

store_push_requests=F

bypass_subscription=F

start_date=2012-07-12 11:35:41

expiry_date=2013-07-12 11:35:41

created_date=2013-07-12 11:35:41

modified_date=2013-07-12 11:35:41

modified_by=SamplePushInitiator

push_live_time=28800

application_reliable=T

service_level=Push Essentials

last_notification_enabled=F

auto_delete_requests=F

type=Enterprise Push

 

The two things that I don't understand are: dates are all the same and store_push_requests is false. There is some problem here?

 

All the other tables are empty except bpss_push_stats that have a row with my app id.

 

When I'm trying to subscribe with my Blackberry I get an error. I saw in the log the url that I'm sending and is this one: http://[my server]:8090/sample-push-initiator/subscribe?username=[username in DB]&password=[password in DB]&appid=[my app id]&address=23a8e799&osversion=6.0.0.668&model=9780&type=enterprise&field1=190&deviceside=false&ConnectionType=mds - public

 

When I put this in my local computer I get the same error (rc=10026) so the problem is not in the connection. This error means "Authentication of the subscriber, based on the username and password they passed in, failed." what is weird because I'm giving the same username and password that I have on the database.

 

Thanks in advance,

Tiago Ribeiro.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: Blackberry Push Service - Error 10026 in Subscribe message

Hi Tiago and welcome to the forums!

Based on the URL being used:
http://[my server]:8090...

It looks like you are trying to register to your computer when you should be trying to register against the BlackBerry Push Infrastructure. When using EVAL the base URL should be:
http://pushapi.eval.blackberry.com

Please test using a real device and the corrected URL then let us know if the issues are resolved.

Thanks,
Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Contributor
tiagormribeiro
Posts: 11
Registered: ‎07-12-2012
My Carrier: Vodafone

Re: Blackberry Push Service - Error 10026 in Subscribe message

Hello.

 

Thanks for your fast reply.

 

My configurations locally are the same that in the first post. When I access http://localhost:8090/sample-push-initiator/main and click on "Start General Push" I got "ERROR: There are no active subscribers.".

 

So I tried to subscribe with my Blackberry. My settings are:

Port: [the one supplied in PDF from Blackberry]

App Id: [my app id]

Push Initiator application URL: http://pushapi.eval.blackberry.com

App Acknowledgment: Checked

Use enterprise (BES) network

 

When I make "Register" it ask me for Username & Password. With both filled or with Username empty the result is the same: "Request to register failed. Caused by java.lang.IllegalArgumentException".

 

Do you have a clue of what it can be?

 

Thanks in advance.

 

Best regards,

Tiago Ribeiro.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: Blackberry Push Service - Error 10026 in Subscribe message

Are you trying to test through BES or BIS? Where will your application run when published?
Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Contributor
tiagormribeiro
Posts: 11
Registered: ‎07-12-2012
My Carrier: Vodafone

Re: Blackberry Push Service - Error 10026 in Subscribe message

Good morning. Thanks for your answer.

 

I'm trying to test with BES because with BIS the Blackberry phone need another URL that I don't know what is.

 

My application will run in a TomCat AS accessible from the web. It's this that you are asking for?

 

Thanks in advance.

 

Tiago Ribeiro.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: Blackberry Push Service - Error 10026 in Subscribe message

To test with BIS you need to send the push to the MDS-CS simulator instance which should be running on port 8080 by default.

 

Note that in order to use BES in a production environment you would need to have a BlackBerry Enterprise Server set up and your devices would need to be Enterprise Activated on these servers.

 

If you would like to use BIS, good for commercial applications, then I would suggest signing up for Push Services where you will receive credentials so you can test pushing to BIS enabled devices:

https://developer.blackberry.com/devzone/services/push

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Contributor
tiagormribeiro
Posts: 11
Registered: ‎07-12-2012
My Carrier: Vodafone

Re: Blackberry Push Service - Error 10026 in Subscribe message

Hello Garett.

 

I already have that credentials. I just want to try my connection between a message send by my server to be received by my Blackberry phone.

 

What I understand by your words is that I've to user "publicpush" application type right? I'm using the sample-push-initiator provided by Blackberry so in sample-push-initiator.properties I've to write:

application.port=8080
application.type=publicpush
application.service.level=pushessentials
application.public.password=[my password]

application.public.notify.url=pushapi.eval.blackberry.com/

 

BTW with this configurations I've "Start General Push" and I'm receiving "Accepted for processing.".

 

Now I've to configure my Blackberry phone to access this. I'm gonna use BIS as you said and test if it works now.

 

Thanks.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: Blackberry Push Service - Error 10026 in Subscribe message

The issue was that when using BES push you would need to have a real BES set up in order to receive the push at an actual device. BIS is typically a much simpler scenario to test if you do not already have a BES et up.

 

Let us know how you manage using BIS!

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Contributor
tiagormribeiro
Posts: 11
Registered: ‎07-12-2012
My Carrier: Vodafone

Re: Blackberry Push Service - Error 10026 in Subscribe message

Yep. I understood that. Thanks very much.

 

I'm trying to configure my Blackberry but when I register it returns an error "Request to register failed. Caused by java.lang.IllegalArgumentException".

 

My settings are:

Port: the Push Port in section Configuration properties for the push-enabled application (client application) provided in the PDF

App ID: The Application ID in the same place

BPS server URL: I used https://pushapi.eval.blackberry.com but I also tried with http version and I've got the same error

Push initiator application URL: http://pushapi.eval.blackberry.com

App Acknowledgment checked

Use public (BIS) network choosen

 

When I make "Register" I need to provide Username and Password. I tried both empty, only password, username (I've user Company Name once and Application Name another time) and password (Pwd field in section Configuration properties for the Push Initiator (server application) provided in the PDF) filled. The error is always the same:

 

Request to register failed. Caused by java.lang.IllegalArgumentException

 

Do you have a clue of what can be?

 

Thanks in advance.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: Blackberry Push Service - Error 10026 in Subscribe message

The port being used should be the one assigned to you when you registered for Push Services, which PDF are you referencing?

 

From the server (push initiator) side you should always use HTTPS, from the device (smartphone) side you should always use HTTP.

 

Where are you setting these values?

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.