12-12-2012 04:32 AM
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.
Solved! Go to Solution.
12-12-2012 10:10 AM - edited 12-12-2012 10:10 AM
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(PushServiceErrorEven t.CREATE_SESSION_ERROR, createSessionErrorHandler);
pushService.addEventListener(PushServiceEvent.CRE ATE_SESSION_SUCCESS, createSessionSuccessHandler);
pushService.addEventListener(PushServiceErrorEven t.REGISTER_TO_LAUNCH_ERROR, registerToLaunchErrorHandler);
pushService.addEventListener(PushServiceEvent.REG ISTER_TO_LAUNCH_SUCCESS, registerToLaunchSuccessHandler);
pushService.addEventListener(PushServiceErrorEven t.CREATE_CHANNEL_ERROR, createChannelErrorHandler);
pushService.addEventListener(CreateChannelSuccess Event.CREATE_CHANNEL_SUCCESS, createChannelSuccessHandler);
pushService.addEventListener(PushServiceErrorEven t.DESTROY_CHANNEL_ERROR, destroyChannelErrorHandler);
pushService.addEventListener(PushServiceEvent.DES TROY_CHANNEL_SUCCESS, destroySuccessHandler);
pushService.addEventListener(PushServiceEvent.SIM _CHANGE, simChangeHandler);
pushService.addEventListener(PushTransportReadyEv ent.PUSH_TRANSPORT_READY, pushTransportReadyHandler);
pushService.addEventListener(PushServiceErrorEven t.UNREGISTER_FROM_LAUNCH_ERROR, unregisterFromLaunchErrorHandler);
pushService.addEventListener(PushServiceEvent.UNR EGISTER_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;
}
12-12-2012 04:11 PM
I have tested with a new blank app that only has that code and breaks the same when instantiating PushService.
Any help?
12-13-2012 03:41 AM - edited 12-13-2012 03:44 AM
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\w orkspace\BB10_0_09-AIR_SDK_API\blackberry\ane\push \as3\src\net\rim\blackberry\push\PushService.as:42 4]
at net.rim.blackberry.pushreceiver.service::PushNotif icationServiceImpl/initializePushService()[C:\User s\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiv er\service\PushNotificationServiceImpl.as:102]
at net.rim.blackberry.pushreceiver.service::PushNotif icationServiceImpl/createSession()[C:\Users\jmigle sias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiv er\service\PushNotificationServiceImpl.as:80]
at net.rim.blackberry.pushreceiver.ui::ActionBarHelpe r/storeConfiguration()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiv er\ui\ActionBarHelper.as:527]
at net.rim.blackberry.pushreceiver.ui::ActionBarHelpe r/configDialogClicked()[C:\Users\jmiglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiv er\ui\ActionBarHelper.as:441]
at flash.events::EventDispatcher/dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at net.rim.blackberry.pushreceiver.ui.dialog::Configu rationDialog/createNotificationEvent()[C:\Users\jm iglesias\Adobe Flash Builder 4.6\PushReceiver\src\net\rim\blackberry\pushreceiv er\ui\dialog\ConfigurationDialog.as:298]
at flash.events::EventDispatcher/dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at qnx.fuse.ui.dialog::DialogBase/setSelectedIndexAnd SendResponse()
at qnx.fuse.ui.dialog::DialogBase/setAndSendResponse( )
at qnx.fuse.ui.dialog::DialogBase/dialogButtonClick()
12-13-2012 05:42 PM
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.
12-15-2012 11:06 AM
No idea? No help? Nobody using push services with air?
12-15-2012 02:49 PM
12-15-2012 03:14 PM
there was a recent article on the blog about Push service changes...
Regards,
12-16-2012 11:25 AM
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 ![]()
12-16-2012 11:28 AM
Usefull info;
http://devblog.blackberry.com/2012/11/push-permiss