I have a MobileFirst app that only sees some occasional use by the customer (an iOS Enterprise app). I updated it and when testing push notifications found out that push notifications were not being sent by the server.
var userSubscription = WL.Server.getUserNotificationSubscription("XXXAdapter.invoiceMessages", userId);
returned undefined. Upon inspecting the database I found out that almost all push subscriptions (PUSH_SUBSCRIPTIONS
table) for the adapter listed USER_ID
as empty. I removed them and subscribed from the app again, but an empty user id was inserted again. The MySQL full log listed the transaction as follows:
284 Query INSERT INTO PUSH_SUBSCRIPTIONS (CREATED_MODE, CREATED_TIME, LAST_UPDATED_TIME, ALIAS, OPTIONS,
STATE, TAG_NAME, USER_ID, DEVICE_ID) VALUES
('API', '2016-09-23T14:06:52Z', '2016-09-23T14:06:52Z', 'invoiceMessages',
'{"alert":true,"badge":true,"sound":true,"requestHeaders":{}}', '{}',
'XXXAdapter.invoiceMessages', '', 14)
The adapter does list a valid user id when I log in:
Sep 23, 2016 4:06:40 PM com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation info
INFO: Fri Sep 23 2016 16:06:40 GMT+0200 (CEST)Login result: {"resultSet":[{"id":8,"name":"Andrey"}],"isSuccessful":true} [project XXX]
As I said, the app only sees occasional use and I think it was upgraded from 6.2 or so almost a year ago, so it may be it hasn't been working since then. Any ideas?
The current assumption is that this issue has been fixed in a recent iFix release. Login to IBM Fix Central and download the latest available iFix for MobileFirst Platform Foundation (currently 7.1.0.0-MFPF-IF201610060540) to verify that the issue has been resolved.