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

Adobe AIR Development

Reply
Highlighted
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone
Accepted Solution

(bb10) Push service error

Hi!

 

When trying to register on push service on my app on simulator, I get an error:

 

Unable to create PushService due to an internal error trying to allocate system resources

 

Very strange, does not have enough resources?

I might be doing something wrong, but what?

 

I'm using las simulator and Gold SDK.

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

[ Edited ]

Example:

 

try {
    var invokeTargetId:String="com.myapp.push";
    var providerAppId:String="YOUR PUSH APP ID";
    pushService = new PushService(invokeTargetId, providerAppId);
    
    // Add event listeners for the various push-related events
    pushService.addEventListener(PushServiceErrorEvent.CREATE_SESSION_ERROR, createSessionErrorHandler);
    pushService.addEventListener(PushServiceEvent.CREATE_SESSION_SUCCESS, createSessionSuccessHandler);
    pushService.addEventListener(PushServiceErrorEvent.REGISTER_TO_LAUNCH_ERROR, registerToLaunchErrorHandler);
    pushService.addEventListener(PushServiceEvent.REGISTER_TO_LAUNCH_SUCCESS, registerToLaunchSuccessHandler);
    
    pushService.addEventListener(PushServiceErrorEvent.CREATE_CHANNEL_ERROR, createChannelErrorHandler);
    pushService.addEventListener(CreateChannelSuccessEvent.CREATE_CHANNEL_SUCCESS, createChannelSuccessHandler);
    pushService.addEventListener(PushServiceErrorEvent.DESTROY_CHANNEL_ERROR, destroyChannelErrorHandler);
    pushService.addEventListener(PushServiceEvent.DESTROY_CHANNEL_SUCCESS, destroySuccessHandler);
    pushService.addEventListener(PushServiceEvent.SIM_CHANGE, simChangeHandler);
    pushService.addEventListener(PushTransportReadyEvent.PUSH_TRANSPORT_READY, pushTransportReadyHandler);
    pushService.addEventListener(PushServiceErrorEvent.UNREGISTER_FROM_LAUNCH_ERROR, unregisterFromLaunchErrorHandler);
    pushService.addEventListener(PushServiceEvent.UNREGISTER_FROM_LAUNCH_SUCCESS, unregisterFromLaunchSuccessHandler);
    
    pushService.createSession();
} catch (error:ArgumentError) {
    // If invokeTargetId is missing or invokeTargetId, providerAppId, or enterpriseAppId contains invalid characters
    trace("ArgumentError while creating push service: " + error.message + "\r" + error.getStackTrace());
    throw error;
} catch (error:InitializationError) {
    // If PushService could not be created
    trace("InitializationError while creating push service: " + error.message + "\r" + error.getStackTrace());
    //throw error;
}

 

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

I have tested with a new blank app that only has that code and breaks the same when instantiating PushService.

 

Any help?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

[ Edited ]

And more info, with sample PushReceiver app from github, same error:

 

 

InitializationError while creating push service: Unable to create PushService due to an internal error trying to allocate system resources.
Error: Unable to create PushService due to an internal error trying to allocate system resources.
    at net.rim.blackberry.push::PushService()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\blackberry\ane\push\as3\src\net\rim\blackberry\push\PushService.as:424]
    at net.rim.blackberry.pushreceiver.service::PushNotificationServiceImpl/initializePushService()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiver\service\PushNotificationServiceImpl.as:102]
    at net.rim.blackberry.pushreceiver.service::PushNotificationServiceImpl/createSession()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiver\service\PushNotificationServiceImpl.as:80]
    at net.rim.blackberry.pushreceiver.ui::ActionBarHelper/storeConfiguration()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiver\ui\ActionBarHelper.as:527]
    at net.rim.blackberry.pushreceiver.ui::ActionBarHelper/configDialogClicked()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiver\ui\ActionBarHelper.as:441]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at net.rim.blackberry.pushreceiver.ui.dialog::ConfigurationDialog/createNotificationEvent()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiver\ui\dialog\ConfigurationDialog.as:298]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at qnx.fuse.ui.dialog::DialogBase/setSelectedIndexAndSendResponse()
    at qnx.fuse.ui.dialog::DialogBase/setAndSendResponse()
    at qnx.fuse.ui.dialog::DialogBase/dialogButtonClick()

 

 

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

Has anybody sucessfully added push service to an app?

I can't find a way it works, I've tried everythin on dev alpha and simulator.

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

No idea? No help? Nobody using push services with air?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: (bb10) Push service error

It's on my list to look into. RIM makes it a little diffilcult as compare to other push systems, but with the right help, I'm certain it works. Probably have to wait till Monday to get help from RIM.
Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: (bb10) Push service error

there was a recent article on the blog about Push service changes...

 

Regards,

Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

I think you did the trick.

With those changes RIM is supposed to have to give your signing keys PUSH permission, without it you can't use push.

I was thinking the error was with SDK and it is with the (undocumented) system itself Smiley Happy

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) Push service error

Usefull info;

 

http://devblog.blackberry.com/2012/11/push-permissions-changes/

 

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/additional-signing-key-permission...

 

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords