Titanium SDK and Studio
Error enabling Cloud service for the project
If you receive a message similar to "Error enabling Cloud service for the project" in Studio when trying to enable Cloud services for your project, the Mobile Backend Services (MBS) server may be down or Studio is unable to connect to the MBS server. Try to enable Cloud services later.
If you are still receiving this error when trying to enable Cloud services, check to see if your application was created in https://platform.axway.com/.
If the application was created, check to see if MBS keys were created for the application. To find your MBS keys, go to https://platform.axway.com/, select your application from the Apps drop-down list, then click Configuration. You should see items for App Key, OAuth Consumer Key, and OAuth Secret. Click the Show link to expand these items. Note that you need both the Development and Production version of these items. You can switch between the two by clicking the drop-down box in the top-right corner that displays either Development or Production.
If you do not have MBS keys, try to enable Cloud services again at a later time.
If you do have MBS keys, manually enter the MBS key information in the
tiapp.xml file. To manually enter this information:
- Double-click your
tiapp.xmlfile to open it in the Editor.
- Click the tiapp.xml tab in the lower-left corner of the Editor.
Insert the following MBS property keys as children of the
ti:appparent tag and replace with the application's MBS keys found earlier:
Save and close your
- Reopen your
tiapp.xmlfile. In the Overview tab, it should show that Cloud services are enabled.
Push notification error messages
The following table lists error messages reported by the MBS push notification dispatcher, which is responsible for sending push notifications to the Apple Push Notification Service (APNS) and Firebase Cloud Messaging (FCM).
Apple Push Notification Server (APNS) errors
|2001||There was a problem loading or reading the keystore.||There was a problem loading the keystore (APNS certificate). Try re-creating and uploading your keystore.|
|2002||There was a network problem communicating with APNS, such as an SSL or socket error.||Network communication between the MBS push notification dispatcher and APNS was interrupted for some reason.|
|2003||Certificate does not exist.||The specified APNS push certificate does not exist.|
|2004||Certificate is disabled.||The specified APNS push certificate is disabled.|
|2005||Payload is invalid.||The JSON payload is invalid.|
|2006||Payload is longer than 2048 bytes.||The JSON payload is longer than 2048 bytes. You need to make the payload smaller.|
|2007||Certificate is revoked.||The specified APNS push certificate has been revoked. You need to generate a new certificate.|
|2008||Certificate is expired.||The specified APNS push certificate has expired. You need to generate a new certificate.|
|2009||Certificate is invalid.||The specified APNS push certificate is invalid. You need to generate a new certificate.|
|2010||Socket is closed.||The socket connection between the Mobile Backend Services push dispatcher and APNS was closed.|
Firebase Cloud Messaging (FCM) errors
Error codes in the 3000-3099 range are FCM error codes. Error codes above 3100 are for custom MBS push dispatcher errors.
|3001||Too many messages were sent to a specific device. Retry sending after a while.||FCM limits the number of push messages that can be sent to a particular device over a period. Increase the period between notifications for this device.|
|3002||A particular message could not be sent because the FCM servers encountered an error.||FCM servers encountered an error.|
|3003||Bad registration_id. The sender should remove this registration_id.||The FCM client sent a bad registration ID and should re-register with FCM to obtain a new ID. This error is uncommon if you are using the Modules.CloudPush module.|
|3004||Time-to-live value provided is less than zero, or more than the allowed maximum.||The message's Time to Live (expiration date) value is invalid. This error is uncommon if you are using the Modules.CloudPush module.|
|3005||Payload is longer than the maximum allowed size of 4096 bytes.||FCM limits push notification payload size to 4096 bytes; try reducing the JSON message size and sending again.|
|3006||The sender_id contained in the registration_id does not match the sender_id used to register with the FCM servers.||The FCM client did not use the proper sender_id. This error is uncommon if you are using the Modules.CloudPush module.|
|3007||Collapse key is required. Include collapse key in the request.||If you are using a custom FCM client you need to include a collapse key in the request. This error is uncommon if you are using the Modules.CloudPush module.|
|3008||The request was missing a registration_id; registration_id is required with every request.||The FCM client did not include a registration ID in its request. This error is uncommon if you are using the Modules.CloudPush module.|
|3009||The user has uninstalled the application or turned off notifications. The sender should stop sending messages to this device and delete the registration_id. The client needs to re-register with the FCM servers to receive notifications again.|
|3010||Too many messages sent by the sender. Retry after a while.||FCM limits the number of push notifications that can be sent by a particular sender over a given period. Increase the period between push notification send requests.|
|3011||A particular message could not be sent because the FCM servers were not available.||The FCM server was not available for an unknown reason. Try again later.|
|3101||No result retrieved from FCM Server.||The FCM server did not return a response from the push notification request.|
|3102||fcm_apiKey is null.||Make sure you've configured Mobile Backend Services push notifications with your API key.|
|3103||RegistrationId(s) is null or empty.||The FCM client provided a null or empty registration ID. This error is uncommon if you are using the Modules.CloudPush module.|
|3104||FCM internal error.||An internal error occurred with FCM. Check FCM status.|
|3105||Message could not be sent, or there was a JSON parsing error.||Make sure that the notification JSON payload is properly formatted.|