Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5186] Device registration, not on Push Device list

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2017-12-09T20:20:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsArrow Push
Labelsn/a
ReporterUrsin Cola
AssigneeShak Hossain
Created2017-09-11T20:10:30.000+0000
Updated2017-12-09T20:20:02.000+0000

Description

we work since some year with your push notification api. until now it was working fine, but right now, all our new devices ar not listed on the push device list (production). if we register an android or ios to the "general" push list, it is not listed on the list. but on the logfile we see that they receve a reigstration: Date Sep 11, 2017 9:56 PM Request POST /v1/push_notification/subscribe_token.json Status 200 Source IP 194.230.159.XXX { "ti_analytics": "{\"id\":\"c20781e7-3792-4931-ac49-de8f7d320XXX\",\"mid\":\"6f03751856aa8XXX\",\"aguid\":\"facc704b-3522-4c93-9bbb-3f794de57XXX\",\"event\":\"cloud.push_notification.subscribe_token\",\"deploytype\":\"production\",\"sid\":\"18a4fc05-083a-4b54-a29d-d4c3ce9d6XXX\"}", "suppress_response_codes": "true", "device_token": "APA91bHGrN2TErv0DWYVfk-LsCkED_cpTWTZLC1yPA8M0socFmJ3htvCI-k-5X2Q0fwvy9NHK9p2ONmcE6i0yRe-FPhfjMr3biYhucY094R-KG6CiRcwYJk", "type": "android", "channel": "general", "key": "KuJMdxY9LIjF3QgKPVX2wdoOyl4JqzKQ" } it is very urgent, because we use this on a production app and we dont know where we can find help we find out this issue, as we was sending push notifications to the whole "general" list, but the new devices was not recevign the push notification. so we search on the push device list, and we see there no new devices with this ID. interesting is, that if we install the developer app, subscribe it then to the developer channel, it works there! only on production we have this issue... thank you

Attachments

FileDateSize
2017-09-11_23-40-23.png2017-09-11T21:41:01.000+0000266267
2017-09-12_08-25-48.png2017-09-12T06:26:30.000+000090755
2017-09-13_16-54-24.png2017-09-13T14:58:47.000+000081975
2017-09-13_16-54-55.png2017-09-13T14:56:50.000+0000107783
2017-09-13_17-03-17.png2017-09-13T15:05:42.000+0000295609
2017-09-13_17-03-55.png2017-09-13T15:05:47.000+0000138708
check_registration.png2017-09-18T06:55:18.000+000091613
error_sending.png2017-09-18T06:55:42.000+0000234536
registration.png2017-09-18T06:55:11.000+0000257945
Screen Shot 2017-09-12 at 3.29.28 AM.png2017-09-11T21:32:11.000+0000109501

Comments

  1. Mostafizur Rahman 2017-09-11

    Hello [~ursin@cola.li], Thanks for your query. Would you please provide the below information? 1. Your Org ID or Org Name 2. App name, App GUID Thanks
  2. Ursin Cola 2017-09-11

    Hi Mostafizur of corse, thats all that you need? ch.hcd.mobile Hockey Club Davos 555a3e20982f8a0b77e4cc03 https://secure-identity.cloud.appcelerator.com https://api.cloud.appcelerator.com appc_app_user_dev https://secure-identity.cloud.appcelerator.com https://api.cloud.appcelerator.com appc_app_user 100001043 9d86707d-9174-4fbe-b333-5f32dfaf0a3d thank you for helping
  3. Mostafizur Rahman 2017-09-11

    As we can see your last push was sent on Sep 10, 2017, 1:57 AM from the general channel. !Screen Shot 2017-09-12 at 3.29.28 AM.png|thumbnail! Would you please share the screen shot which devices are not listed on push device list? Do you have got this problem for all apps or just got for this specific app? Another thing did you get this issue for both Android and iOS devices? Thanks
  4. Ursin Cola 2017-09-11

    exactly, this was the last push that we send. we only use push on this app. the issue is not to sending the push, the issue is that new devices they install our app and subscribe then for the general channel are not listed on the device list. so if we push then to the general, all new devices dose not receve the push message (because they are not on this list). how I write in the issue, you can check the logfile, there you see that I register my device for the general channel. but this device is not listed on the device list, thats the problem why I dont receve pushs on my device. !2017-09-11_23-40-23.png|thumbnail! and yes, i know the lat push ist older the the registration date of my device :) but i have register another device two weeks ago, and this device dont receve the lat push message they we send... and this device is also not listed on the device list. and yes, issue is for both ios and android. so the issue must be on the "device list"... it does not depend on ios and android, its an issue of the device list. the strange thing is, that the development mode is working. if I register on development app the push, then i see the new entry on the device list (development)....
  5. Jebun Naher 2017-09-12

    Hello, Thanks for your feedback. Our team has investigated the issue and push service is working as expected .It looks like you are using indie package. The push services are limited for this plan. To get more, you need to subscribe another plan “Cloud Capacity and Mobile Services”. Hope cloud capacity plan will solve your problem. For details please visit our [pricing details](http://www.appcelerator.com/pricing/). Best
  6. Ursin Cola 2017-09-12

    thank you for your answer, can you tel me where I see that the limited is reached? and can you tel me which one of all this "Cloud Capacity and Mobile Services" options i need to expand so that my need is working?
  7. Ursin Cola 2017-09-12

    Check out my screenshot, I dont know why we are reaching the limitation? !2017-09-12_08-25-48.png|thumbnail!
  8. Motiur Rahman 2017-09-13

    Hello! [~ursin@cola.li], Could you please share your pushnotification code and ti.cloud and ti.cloudpush module version? I recommend you to use firebase server key for Android and updated push certificate for iOS. Currently, you are using old google console server key. - http://titaniumsolution.blogspot.com/2016/12/sending-push-via-firebase-api-key.html Thanks
  9. Ursin Cola 2017-09-13

    Hi Motiur Thank you for your answer. Firebase and iOS certificate? It is stil working with old devices, only the new devices became no push messages... why it is necessary to switch to firebase or update the certificate (installed certificate, Expires Jul 9, 2018 6:28 AM)? Bellow the code and versions: ti.cloud 3.2.11, ti.cloudpush 4.0.3
       // ########################################################################################################################################
       // ### Cloud Push for soul.media
       // ########################################################################################################################################
       
       /**
        * Get push token for android
        */
       if (Titanium.Platform.osname == 'android') {
       	// Require the module
       	var CloudPush = require('ti.cloudpush');
       	 
       	// Initialize the module
       	CloudPush.retrieveDeviceToken({
       		success: deviceTokenSuccess,
       	  error: deviceTokenError
       	});
       	
       	// Enable push notifications for this device
       	// Save the device token for subsequent API calls
       	function deviceTokenSuccess(e) {
       	  deviceToken = e.deviceToken;
       	}
       	
       	function deviceTokenError(e) {
       	  Ti.API.info('Failed to register for push notifications! ' + e.error);
       	  
       	  var dialog = Ti.UI.createAlertDialog({
       	    message: 'Fehler bei der Registration!',
       	    ok: 'Schliessen',
       	    title: 'Fehler'
       	  });
       	  dialog.show();
       	}
       	 
       	// Process incoming push notifications
       	CloudPush.addEventListener('callback', function (evt) {
       	  Ti.API.info("Notification received: " + JSON.stringify(evt));
       	  // Extract PUSH.
       	  var notification = JSON.parse(evt.payload);
       	  
       	  // Redirect webview to URL.
       	  if (notification.custom_field.url) {
       	  	setTimeout(function () {
               webView.url = notification.custom_field.url;
            	}, 1500);
       	  }
       	  
       	  // Create dialog.
       	  // Deactivate because they allways came on app start if multiple.
       	  /*
       	  var dialog = Ti.UI.createAlertDialog({
       	    message: notification.android.alert,
       	    ok: 'Schliessen',
       	    title: notification.android.title
       	  });
       	  dialog.show();
       	  */
       	  
       	});
       }
       
       /**
        * Get push token for iOS
        */
       if (Titanium.Platform.osname == 'iphone' || Titanium.Platform.osname == 'ipad') {
       	// Reset badge.
       	Titanium.UI.iPhone.setAppBadge(null);
       	  
       	// Check if the device is running iOS 8 or later
       	if (Ti.Platform.name == "iPhone OS" && parseInt(Ti.Platform.version.split(".")[0]) >= 8) {
       	 
       		// Wait for user settings to be registered before registering for push notifications
       	  Ti.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {
       	 
       		 	// Remove event listener once registered for push notifications
       		  Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush); 
       		 
       		  Ti.Network.registerForPushNotifications({
       		    success: deviceTokenSuccess,
       		    error: deviceTokenError,
       		    callback: receivePush
       		  });
       		});
       	 
       		// Register notification types to use
       		Ti.App.iOS.registerUserNotificationSettings({
       		  types: [
       	      Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,
       	      Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,
       	      Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE
       	    ]
       		});
       	}
       	 
       	// For iOS 7 and earlier
       	else {
       		Ti.Network.registerForPushNotifications({
       	 		// Specifies which notifications to receive
       		  types: [
       	      Ti.Network.NOTIFICATION_TYPE_BADGE,
       	      Ti.Network.NOTIFICATION_TYPE_ALERT,
       	      Ti.Network.NOTIFICATION_TYPE_SOUND
       		  ],
       		  success: deviceTokenSuccess,
       		  error: deviceTokenError,
       		  callback: receivePush
       	  });
       	}
       	
       	// Process incoming push notifications
       	function receivePush(e) {
       	  Ti.API.info('Received push: ' + JSON.stringify(e));
       	  
       	  // Reset badge.
       	  Titanium.UI.iPhone.setAppBadge(null);
       	  
       	  // Redirect webview to URL.
       	  if (e.data.custom_field.url) {
       	  	setTimeout(function () {
               webView.url = e.data.custom_field.url;
            	}, 1500);
       	  }
       	  
       	  // Create alert dialog.
       	  // Deactivate because they allways came on app start if multiple.
       	  /*
       	  var dialog = Ti.UI.createAlertDialog({
       	    message: e.data.alert,
       	    ok: 'Schliessen',
       	    title: e.data.title
       	  });
       	  dialog.show();
       	  */
       	}
       	
       	// Save the device token for subsequent API calls
       	function deviceTokenSuccess(e) {
       	  deviceToken = e.deviceToken;
       	}
       	
       	function deviceTokenError(e) {
       	  Ti.API.info('Failed to register for push notifications! ' + e.error);
       	  
       	  var dialog = Ti.UI.createAlertDialog({
       	    message: 'Fehler bei der Registration!',
       	    ok: 'Schliessen',
       	    title: 'Fehler'
       	  });
       	  dialog.show();
       	}
       }
       
  10. Aminul Islam 2017-09-13

    Hi, GCM https://developers.google.com/cloud-messaging/faq is going to be eventually deprecated for FCM https://firebase.google.com/docs/cloud-messaging/ GCM users are strongly recommended to upgrade to FCM.
  11. Ursin Cola 2017-09-13

    ok i have now do this and move it to firebase. how can i test it if they works? i have register my device and see this on the logs
          "ti_analytics": "{\"id\":\"2dfc9ff0-3a8c-4abd-afb9-873c35a8786a\",\"mid\":\"6f03751856aa8a6c\",\"aguid\":\"facc704b-3522-4c93-9bbb-3f794de572fc\",\"event\":\"cloud.push_notification.subscribe_token\",\"deploytype\":\"production\",\"sid\":\"92ff4320-15ae-48fc-b0bc-ff411c4ec3d2\"}",
          "suppress_response_codes": "true",
          "device_token": "APA91bHGrN2TErv0DWYVfk-LsCkED_cpTWTZLC1yPA8M0socFmJ3htvCI-k-5X2Q0fwvy9NHK9p2ONmcE6i0yRe-FPhfjMr3biYhucY094R-KG6CiRcwYJk",
          "type": "android",
          "channel": "general",
          "key": "KuJMdxY9LIjF3QgKPVX2wdoOyl4JqzKQ"
        }
        
    but they solve not my problem writen on the issue... how can i solve the issue written on this issue?
  12. Aminul Islam 2017-09-13

    Hi, Did you get device_token after the move it to firebase? After import, a cloud enables project into Firebase You need to [Configur push service on the dashboard](http://docs.appcelerator.com/platform/latest/#!/guide/Configuring_push_services) with firebase server key and sender ID. Now, try to register new devices again. To test it if they work, check registered new devices on dashboard and [send a push notification from Dashboard](http://docs.appcelerator.com/platform/latest/#!/guide/Sending_and_Scheduling_Push_Notifications) Let us know how it goes. Regards, Aminul
  13. Ursin Cola 2017-09-13

    Hi Aminul I have put the new Server key, is this configured right? Firebase !2017-09-13_16-54-55.png|thumbnail! platform.appcelerator.com !2017-09-13_16-54-24.png|thumbnail! Did you mean the device token on my last post? "device_token": "APA91bHGrN2TErv0DWYVfk-LsCkED_cpTWTZLC1yPA8M0socFmJ3htvCI-k-5X2Q0fwvy9NHK9p2ONmcE6i0yRe-FPhfjMr3biYhucY094R-KG6CiRcwYJk", I have now try again to unregister and register my android device, but I dont see it on the last page of the list, you see it on my printscreens that my device is always not listed in the list but it is on the logfile... the same issue we have with ios, if we register new devices we dont see it on the list... only on the logfiles
        {
          "ti_analytics": "{\"id\":\"d8b797ec-f631-4bb0-9a7a-056c486d0d07\",\"mid\":\"6f03751856aa8a6c\",\"aguid\":\"facc704b-3522-4c93-9bbb-3f794de572fc\",\"event\":\"cloud.push_notification.subscribe_token\",\"deploytype\":\"production\",\"sid\":\"33dcfa84-67c1-4297-b7e0-8b3cec7e00be\"}",
          "suppress_response_codes": "true",
          "device_token": "APA91bHGrN2TErv0DWYVfk-LsCkED_cpTWTZLC1yPA8M0socFmJ3htvCI-k-5X2Q0fwvy9NHK9p2ONmcE6i0yRe-FPhfjMr3biYhucY094R-KG6CiRcwYJk",
          "type": "android",
          "channel": "general",
          "key": "KuJMdxY9LIjF3QgKPVX2wdoOyl4JqzKQ"
        }
        
    !2017-09-13_17-03-17.png|thumbnail! !2017-09-13_17-03-55.png|thumbnail!
  14. Ursin Cola 2017-09-13

    Hi Aminul Of corse, I wil be back in 3h and wil came then into the hangout... Thank you for your help
  15. Ursin Cola 2017-09-18

    hi all we have still a strange issue with some devices (one of them is my device). check my following steps 1. i install my test app with a second test channel (generaltest), so that I can send to his channel only (for testing) 2. check the logfile, there you see that my devices is registeres successfull to the generaltest channel !registration.png|thumbnail! 3. check the device liste, there you see also my device !check_registration.png|thumbnail! 4. send a push notification to generaltest channel 5. check sending log, strange is that there all devices have the same ID, but the first is my device, and there you see the error "Exception Type: GCM; Error Code: 3009; Error Message: The user has uninstalled the application or turned off notifications. Sender should stop sending messages to this device and delete the registration_id. The client needs to re-register with the GCM servers to receive notifications again" !error_sending.png|thumbnail! 6. i dont receve any messages to this device... I uninstall / install the app a lot of times and I also delete the cache from the app etc. Any ideas?
  16. Daniel Woodward 2017-11-09

    I'm having the same issue, exactly as described above. Device seems to register successfully and I can see it has been added to the device list in the dashboard, but as soon as I send a push to it the registration is removed and the push shows as failed with error code 3009. The push is not received. Has there been any progress on this?
  17. Ursin Cola 2017-11-10

    @Daniel Woodward no, we have no new information about this issue, always the same issue. Appcelerator don't answer me on my last comment
  18. Aminul Islam 2017-11-10

    Hi [~ursin@cola.li], We have tested this issue and so far we have been unable to reproduce this issue. Did you get this issue(r code 3009) on all devices? Error code 3003 means: Bad registration_id. Sender should remove this registration_id. Please take a look: https://docs.appcelerator.com/arrowdb/latest/#!/guide/troubleshooting
  19. Sharif AbuDarda 2017-11-30

    Hello [~ursin@cola.li], Can you give us an update on the status of your issue. Are you still having the issue?
  20. Ursin Cola 2017-12-01

    i cannot reproduce it because i have buy for me a new device.... since this i have registered it without problems. but it is possible that other users have the same issue. strange was, that the device was registred on the ticloud, but aber the first push on it, it was removed...

JSON Source