Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3290] Some times Push messages are not receiving on devices

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionFixed
Resolution Date2014-12-21T14:30:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsDocumentation, Titanium SDK & CLI
LabelsACS, Android, Push, message
ReporterSilambarasan Raman
AssigneeShuo Liang
Created2014-11-07T12:26:02.000+0000
Updated2016-03-08T07:57:42.000+0000

Description

Some times Push messages are not receiving to devices, But Mean time its receiving fine, Can any one tell this is happening because of ACS Server issue , or the slow internet issue on the device, We are using ACS.

Attachments

FileDateSize
app.js2014-11-26T09:05:54.000+00002314

Comments

  1. Silambarasan Raman 2014-11-16

    Hi Can you update the status? Its important to us for launch our app to stores.
  2. Shuo Liang 2014-11-18

    Hi, Sorry for the late. Would you please provide your App Key (for the app having problem), we can check it from our side. For secure reason, you can send the key to my email. (sliang@appcelerator.com) Also provide some examples: like which one is received, and which one is not but should be received. Regards, Shuo
  3. Silambarasan Raman 2014-11-19

    Hi Shuo, I have emailed you the below, APP ID: XXxxXXXXXXXXXXXXXXXXXX We have coded to send the Push notifications when A commenting on B's item and also when A like that B's item etc. These Push messages are receiving some time But not some other time like i posted here, Note : A,B - Different users
  4. Shuo Liang 2014-11-20

    Hi, Please provide the detail of success and fail push examples. like the push ID or something can identity different push notifications. You may get those info from push log of web console. Regards, Shuo
  5. Silambarasan Raman 2014-11-24

    Hi, Sorry for the late reply, I emailed our AppID to you, and also some time we are getting duplicate push messages. not sure why? please help us to find solution.
  6. Shuo Liang 2014-11-25

    Hi, I need the detail of your example push notification. There are more then 18,000,000 notifications for your app. We can't address it from so many data. Would you please provider some more detail. Like if the push A should be received but it not, you have to provide us the push id of A or anything detail can address it from millions of data. and push b got duplicate, and what is B's push id. Regard, Shuo
  7. Silambarasan Raman 2014-11-25

    Hi, Here is the push ids that we were got the multiple(duplicate) push messages. 547315e62be23cc0ca002d9e 547315b7133307c24b002df1 i used to send a private message on a user 'a' and the user a is logged in with two devices and the above are the device user id's and 547315b7133307c24b002df1 id got duplicate message at the same time and the same happened with the below id (5464db7744f2450e5e06a38c) got duplicate on (2014-11-23 20:20:49). 546f3ff11aab9d121a0b2789 5464db7744f2450e5e06a38c
  8. Shuo Liang 2014-11-26

    Hi, Just check the database from our side, can't find any two push notifications has 2 same payload. There is not any error or unusually. so there is something need to confirmation. 1. When you said got multiple push messages. Do you mean get same message twice in same device or get same message in two device at same time. 2. Please check the push log in your web console[], see there is any push notifications duplicated. If yes, please attach a screen shot of that. 3. If not, maybe there is something wrong with your code. You may need provide part of your code, include how you send a push and how you receive a push. 4. Here is a simple code attached, may help you with the problem.
  9. Shuo Liang 2014-11-26

    About the notification missing, still do more search to address what really happened here
  10. Shuo Liang 2014-12-01

    Hi, Did more research, but can't find any unusual in server side. So did you run the test recently and did the missing problem still happen? If yes, could you provide some latest error example, like push id and so on. Thanks Regards, Shuo
  11. Silambarasan Raman 2014-12-02

    Hi Shuo Liang , Today i got delay for receiving push messages to the id "547d79cecbb1d3c3f204cca0" please look suggest.
  12. Silambarasan Raman 2014-12-07

    Hi Shuo Liang, Awaiting for your request and its important to us .
  13. Sean Snyder 2014-12-15

    I too am waiting for an update on this.
  14. Shuo Liang 2014-12-17

    Hi, Keep monitoring for a while, can't see any delay from our server side. Based on the database, the push notification has been sent to google server at the same time when you send the call notification API to our server. Which means the delay was happened in Google side. The situation happened before, as some times Google Cloud Message Service is not complete stable for free users. On the other hand, does the push notification missing problem still happen? Regards, Shuo
  15. Silambarasan Raman 2014-12-17

    Ok Thanks for the information, push notification missing issue is not happening so far but in android 4.2.2 jellybean not getting push messages , is there any issue with acs android 4.2.2 jellybean? is there any fix regarding this?
  16. Silambarasan Raman 2014-12-18

    Hi Shuo Liang, In addition to my above comment PLEASE read the below and reply ASAP, Since apple will not allow apps update after Dec 22nd, Today we just wanted to ensure the Production mode of Push is working fine or not. So we have tested that, But it seems to be no iOS device is registered on the ACS cloud console, And there was no user list created, So i have google for it, and got the below links are on the same issue. https://developer.appcelerator.com/question/147600/push-notifications-work-dandy-in-development-but-in-production-its-a-different-story https://developer.appcelerator.com/question/177326/acs-cloud-push-notifications-ios So i just test by copy paste the Development api-key, ouath secret, ouath key into Production api-key,ouath secret, ouath key on my tiapp.xml. After that the devices are registered into the acs cloud console with the IPA which i created for Ad hoc distribution. Can you please explain i should revert my changes on tiapp.xml or not? IF yes, then please explain why the device is not registered with the old key pairs. Note: I just created signed apk with the old key pair, and i have installed that signed apk , its subscribed the device and received the push message on that device. I changed this, developmentsecretkeys HERE developmentKEYS HERE ProductionKEY HERE ProductionSECRETHERE ProductionKEYHERE 8AUbJ9eQdJ3Rp2zEmqYekjESqoUTD71Q This is OLD and original:
  17. Sean Snyder 2014-12-18

  18. Shuo Liang 2014-12-19

    HI, 1. You can't mix development key and production key, as it will link to different server environment. push notification through development environment will go to apple's development sandbox server, production will go to different one. 2. For IOS push notification, you have to generate two different certificates. One for development, the other one for production distribution. So make sure you upload the two right certificates to cloud console setting. 3. When you mentioned "no iOS device is registered on the ACS", did you get the device token? If not, it means you didn't register successfully. 4. Also for each IOS device registration, there is a API call. You can view it for api log from acs console. Please confirm those api calling is return 200 status for success. 5. If you still can't figure out it, Please email me this production key, and related API Log(like register IOS device). Then I can check what happened in our side. 6. For ticket TIMOB-18164, just talked to mobile engineer team, I afraid that request will not be handle recently, as we are in middle of two big releases. For now, you may expect that in coming summer or later. Regards, Shuo
  19. Silambarasan Raman 2014-12-19

    Hi Shuo, Thanks for your reply, Please help me to fix this as much as possible, Also i have one BIG doubt, Is it possible to test (on Adhoc distribution) the push message with production keys before submitting to app store? 1. So i should replace the Key combination to old one Right? 2. Yes , i have uploaded two different certificates on ACS console 3, Will check and let you know 4. Yes, I got response as 200. 5.I emailed you the Production key 6.Thanks for talking to them
  20. Shuo Liang 2014-12-19

    Ye, you can test it before submitting to app store. just follow the guide for ad Hoc [http://docs.appcelerator.com/platform/latest/#!/guide/Distributing_iOS_apps] 1.Ye, you have to use the different keys, for your case the old one. 2.Please check whether you can get the device token. 3.Could you provide the API log you mentioned whose response is 200.
  21. Silambarasan Raman 2014-12-19

    Hi Shou, Please check your email and reply to us. We are in the hectic situation now, Regarding Adhoc, We have received the Push messages on Adhoc mode and we have tested that for past 2 months, But that is got under development mode. And yesterday only we noticed the production mode is not working for the Adhoc, after that we have changed the key sets like i said, and we got the push messages on Adhoc in production mode but that key set belongs to development
  22. Amimul Hossain 2014-12-21

    Hello, I am using ti.cloudpush version 3.3.4 with the below code. It's working. I haven't observed any unexpected behaviors.

    PLATFORM SPECIFICATION.

    Mac OSX 10.9.5 ti.coludpush 3.3.4 Android Device, Google Nexus 7.

    CODE SAMPLE

        var win = Ti.UI.createWindow({
        	backgroundColor : '#ccc',
        	title : 'Android Cloud Push Notification'
        });
         
        var CloudPush = require('ti.cloudpush');
          CloudPush.debug = true;
          CloudPush.enabled = true;
          CloudPush.showTrayNotificationsWhenFocused = true;
          CloudPush.showTrayNotification = true;
          CloudPush.focusAppOnPush = false;
        
        var deviceToken=null;
        var Cloud = require('ti.cloud');
        Cloud.debug = true;
         
        var submit = Ti.UI.createButton({
        	title : 'Register For Push Notification',
        	color : '#000',
        	height : 60,
        	width : 200,
        	top : 100,
        });
         
        win.add(submit);
         
        submit.addEventListener('click', function(e) {
        	loginDefault();
        });
        
        var submit1 = Ti.UI.createButton({
        	title : 'Subscribe Device',
        	color : '#000',
        	height : 60,
        	width : 200,
        	top : 200,
        });
         
        win.add(submit1);
         
        submit1.addEventListener('click', function(e) {
        	defaultSubscribe();
        });
        
        var submit2 = Ti.UI.createButton({
        	title : 'Unsubscribe Device',
        	color : '#000',
        	height : 60,
        	width : 200,
        	top : 300,
        });
         
        win.add(submit2);
         
        submit2.addEventListener('click', function(e) {
        	defaultUnSubscribe();
        });
        
        
        CloudPush.retrieveDeviceToken({
        	success : deviceTokenSuccess,
        	error : deviceTokenError
        });
        
        function deviceTokenSuccess(e) {
        	deviceToken = e.deviceToken;
        }
         
        function deviceTokenError(e) {
        	alert('Failed to register for push notifications! ' + e.error);
        }
        
        CloudPush.addEventListener('callback', function(evt) {
        	alert("Notification received: " + evt.payload);
        });
        
        CloudPush.addEventListener('trayClickLaunchedApp', function(evt) {
        	Ti.API.info('Tray Click Launched App (app was not running)');
        });
         
        CloudPush.addEventListener('trayClickFocusedApp', function(evt) {
        	Ti.API.info('Tray Click Focused App (app was already running)');
        });
         
        function loginDefault(e) {
        	Cloud.Users.login({
        		login : '-----------@gmail.com',
        		password : '123456'
        	}, function(e) {
        		if (e.success) {
        			alert("Successfully Loged In");
        		} else {
        			alert('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
        		}
        	});
        }
         
        function defaultSubscribe() {
        	Cloud.PushNotifications.subscribe({
        		channel : 'alert',
        		device_token : deviceToken,
        		type : 'android'
        	}, function(e) {
        		if (e.success) {
        			alert('Device Subscribed!');
        		} else {
        			alert('Error:' + ((e.error && e.message) || JSON.stringify(e)));
        		}
        	});
        }
        
        function defaultUnSubscribe() {
        	Cloud.PushNotifications.unsubscribe({
            	channel: 'alert',
            	device_token: deviceToken,
            	type : 'android'
        	}, function (e) {
            	if (e.success) {
                	alert('Device Unsubscribed!');
            	} else {
                	alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
            	}
        	});
        }
         
        win.open();
        
        
    Thanks.

JSON Source