{ "id": "175263", "key": "TIMOB-28008", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2020-10-02T15:17:34.000+0000", "created": "2020-07-07T06:56:43.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "arrow", "dashboard", "push", "pushnotification", "sdk9.0.3.ga" ], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-10-02T15:17:34.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Recently I have observed that a device is registered by the app but does not appear in the dashboard.\r\n\r\nI get a DeviceToken (_retrieveDeviceToken_), the registration of the push channel (_PushNotifications.subscribeToken_) is also returned as success.\r\n\r\nThe app now thinks that signing up for the push messages was successful. However, since the device does not appear in the dashboard, the device does not receive any push messages.\r\n\r\nIs this a bug? Or is this behavior more common in test versions (Android Distribute Build installed manually)? \r\n\r\nUnfortunately, I haven't had the frequency of it yet.", "attachment": [], "flagged": false, "summary": "Push Notifications: Subscribed Device not showing in Dashboard", "creator": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "*Operating System*\r\n Name = Mac OS X\r\n Version = 10.14.6\r\n Architecture = 64bit\r\n # CPUs = 12\r\n Memory = 16.0GB\r\n\r\n*Node.js*\r\n Node.js Version = 12.13.0\r\n npm Version = 6.12.0\r\n\r\n*Appcelerator CLI*\r\n Installer = 5.0.0\r\n Core Package = 8.0.0\r\n\r\n*Titanium CLI*\r\n CLI Version = 5.2.2\r\n node-appc Version = 0.2.49\r\n\r\n*SDK*\r\n9.0.3.GA", "comment": { "comments": [ { "id": "456010", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unfortunately, I cannot name a relationship between successful and unsuccessful registrations. But in my current tests, it happened 3-4 times.\r\n\r\nI delete the app and reinstall it. Then the device is theoretically created anew and the push channel is set. The app gets the success back, the device does not appear in the dashboard.", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-07T08:02:07.000+0000", "updated": "2020-07-07T08:02:07.000+0000" }, { "id": "456028", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Important update:*\r\n\r\nWe did some tests today and found an unsightly bug.\r\n\r\nAn existing app on Android10 (API 30) devices was deleted and reinstalled. After the new installation, the device is created again in the Axway dashboard and the push channel is registered. If a push message is sent to the device, it does not arrive. The following error appears in Push Notification Logs:\r\n\r\n{code:java}\r\nException 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\r\n{code}\r\n\r\nIt is not possible to register the device for push notifications without deleting it immediately after sending the first Push notification.\r\n\r\nWe urgently need a solution to this problem!\r\n\r\nthank you", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-09T14:48:53.000+0000", "updated": "2020-07-09T15:06:47.000+0000" }, { "id": "456031", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~aschattat] we are investigating this issue now, we will get this resolved at the earliest", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-09T15:09:11.000+0000", "updated": "2020-07-09T15:09:11.000+0000" }, { "id": "456034", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We can't reproduce your issue.\r\n\r\nIn fact, we're seeing the \"opposite\" problem. Every time you uninstall/re-install the app, a duplicate notification token is generated and added to the dashboard. Google has made a recent change where the previous token for the same token is no longer being unregistered. This causes duplicate notifications to be sent to the dashboard for the same device. You'll see a duplicate notification everytime your re-install the app (each re-install gets a new token). We have multiple customers experiencing this issue.\r\n\r\nAre you sure you don't have notifications disabled under system settings?\r\nThat's what your error message suggests.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-09T16:08:35.000+0000", "updated": "2020-07-09T16:08:35.000+0000" }, { "id": "456037", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We have already successfully tested on some Android 10 Desvices. But unfortunately not on all of our test devices. Therefore, it is difficult for us to understand what the problem is.\r\n\r\nHere is the process again:\r\n\r\nPush notifications are activated and Android version 10 is used.\r\n\r\n1. App is installed.\r\n2. A push is sent via the API - status success. The error message appears in the push notification logs.\r\n3. The device token is automatically deleted from the dashboard. Not from us.\r\n4. A push is sent via the API, the error occurs (subscription not found).\r\n5. User deletes the app and reinstalled it.\r\n6. Registration of the device (device token) and push channel. Attention: Although the app has been deleted, the same device token appears to be used!\r\n7. The device token is visible in the dashboard.\r\n8. A push is sent via the API - status success. The error message appears in the push notification logs.\r\n9. The device token is automatically deleted from the dashboard. Not from us. And so on ... vicious cycle ;-)\r\n\r\nIn this case we have no chance to register the device again and send push notifications.", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-10T12:51:47.000+0000", "updated": "2020-07-10T12:51:47.000+0000" }, { "id": "456040", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Our \"Dashboard\" will automatically delete the device token when you do a push and Google's server returns an HTTP error response. An error response will happen if the token has been unregistered, expired, or is invalid. So, our \"Dashboard\" will delete the token in this case since we know the token will never work.\r\n\r\nSo, I'm thinking your app is unregistering the token somehow.\r\n\r\nAre you using any 3rd party modules that use Firebase? Anything that might be deleting the Firebase app instance? Because that would invalidate the token.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-10T19:42:56.000+0000", "updated": "2020-07-10T19:42:56.000+0000" }, { "id": "456041", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I created a firebase project for the app and transferred the server key and the sender ID to the dashboard. I copied the file google-services.json into the project.\r\n\r\nIn the app I use the modules ti.cloud and ti.cloudpush to read the device token (retrieveDeviceToken) and to register the app (subscribeToken). That also works, I see the device in the dashboard.\r\n\r\nThe push notification is sent via the API. First there is a login (https://api.cloud.appcelerator.com/v1/users/login.json) and then the push is sent (https://api.cloud.appcelerator.com/v1/push_notification/notify. json). The app key is included. The API returns a success. An error is displayed in the dashboard and in the push logs:\r\n\r\n{code:java}\r\n{\r\n \"meta\": {\r\n \"code\": 200,\r\n \"status\": \"ok\",\r\n \"more\": false,\r\n \"method_name\": \"queryPushLogDetails\"\r\n },\r\n \"response\": {\r\n \"push_log_details\": [\r\n {\r\n \"_id\": \"5f0846cb0cf2827b758ae768\",\r\n \"msg_id\": \"b3d9f25e-a7f6-44c3-aa9f-8fbf218c098e\",\r\n \"push_id\": \"5f0846c334c53f01884e281e\",\r\n \"type\": \"android\",\r\n \"token\": \"APA91bFDXO0c6qs01TCp83ijReS_RUMtVBLJrzOD5AHXMOAEDxgp9uhEDKN4qxJmIXC2qjc8quMmU1IT3RMlh6snyn55ALr89id1YaWD-CX-olgvXIR5crb-bZcnhxQm_bktwFhTRgWO\",\r\n \"channel\": \"5efd0d271cef14b99bd41c6335748b1b\",\r\n \"app_id\": \"5ee35a318ad1f00184c2c5bb\",\r\n \"send_status\": 2,\r\n \"sent_at\": \"2020-07-10T10:45:27+0000\",\r\n \"updated_at\": \"2020-07-10T10:45:30+0000\",\r\n \"error_message\": \"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\",\r\n \"created_at\": \"2020-07-10T10:45:31+0000\"\r\n }\r\n ]\r\n }\r\n{code}\r\n\r\nThe device is not unregistered in the app or in the backend (with the API). We do not use any 3rd party modules.\r\n\r\nIt works in the emulator (Android 10 API 30). However, a new device token is created each time the app is deleted. Some of our test devices (Android 10), despite deleting the app, do not create a new device token. That is the only difference I can see. Possibly. is that also the problem?\r\n\r\nThank you for the amazing support.\r\n\r\n\r\n", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-10T21:46:07.000+0000", "updated": "2020-07-10T21:46:07.000+0000" }, { "id": "456075", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-14T05:14:24.000+0000", "updated": "2020-07-14T05:15:05.000+0000" }, { "id": "456081", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~aschattat], try downloading our pre-release \"ti.cloudpush\" module to see if it works for you. The below is being tested/reviewed now and works fine so far. Once it passes we'll make the below link public on our Dashboard.\r\nhttps://appcelerator-modules.s3.amazonaws.com/ti.cloudpush-android-7.1.0.zip\r\n\r\nNote that the above module only works with Titanium 9.0.1 and higher. You also have to add a \"google-services.json\" file to your Titanium project's \"./platform/android\" directory.\r\n\r\nAlso note that it's normal for a new token to be generated after uninstalling/reinstalling the app. You'll end up with a duplicate token on the device. When you do a \"push\" from our Dashboard, the duplicate token will be automatically removed because it's been expired/unregistered and only the newest token for that device will be kept. (We still can't reproduce the issue where you say all tokens for that device have been removed though.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-14T15:51:33.000+0000", "updated": "2020-07-14T15:51:57.000+0000" }, { "id": "456093", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I loaded the ti.cloudpush 7.1.0 and integrated it into the app. The device is added to the dashboard and there is a success in the push notification log. The error comes in the app as soon as the push is received.\r\n\r\nI now always get the following error:\r\n\r\n{code:java}\r\n{color:red}[ERROR] : TiExceptionHandler: (main) [3,31523] Unable to instantiate receiver com.appcelerator.aps.GCMReceiver: java.lang.ClassNotFoundException: Didn't find class \"com.appcelerator.aps.GCMReceiver\" on path: DexPathList[[zip file \"/data/app/~~Wavolez8eyPufYlFb1L1gA==/com.sihf.webapp-pvm9UbvdXQaMkRcrqIv4TA==/base.apk\"],nativeLibraryDirectories=[/data/app/~~Wavolez8eyPufYlFb1L1gA==/com.sihf.webapp-pvm9UbvdXQaMkRcrqIv4TA==/lib/x86, /data/app/~~Wavolez8eyPufYlFb1L1gA==/com.sihf.webapp-pvm9UbvdXQaMkRcrqIv4TA==/base.apk!/lib/x86, /system/lib, /system_ext/lib, /product/lib]]\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)\r\n[ERROR] : TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:379)\r\n[ERROR] : TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:312)\r\n[ERROR] : TiExceptionHandler: android.app.AppComponentFactory.instantiateReceiver(AppComponentFactory.java:110)\r\n[ERROR] : TiExceptionHandler: androidx.core.app.CoreComponentFactory.instantiateReceiver(CoreComponentFactory.java:60)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.handleReceiver(ActivityThread.java:4011)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.access$1400(ActivityThread.java:237)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1924)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106)\r\n[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:223)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:7656)\r\n[ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)\r\n[ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947){color}\r\n{code}\r\n\r\nBut in the AndroidManifest.xml it is:\r\n{code:java}\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n{code}\r\n\r\nThe error does not come with ti.cloudpush 7.0.0.\r\n\r\nNote: I send the push notification via Firebase. \r\n\r\n", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-15T08:22:40.000+0000", "updated": "2020-07-15T08:45:56.000+0000" }, { "id": "456094", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "According to ([https://developers.google.com/cloud-messaging/android/android-migrate-fcm|https://developers.google.com/cloud-messaging/android/android-migrate-fcm]), I deleted the described entries in the AndroidManifest.xml. Now the error doesn't come anymore.\r\n\r\nNow I will test the new ti.cloudpush 7.1.0 extensively. :-)", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-15T08:48:03.000+0000", "updated": "2020-07-15T08:48:03.000+0000" }, { "id": "456100", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Glad you got it building. :)\r\nYou actually don't need any of the GCM and APS related entries in the \"tiapp.xml\" file's AndroidManifest.xml section. The \"ti.cloudpush\" module will automatically inject the XML entries for you during the build (the old module version did the same). We also completely removed our GCM usage from \"ti.cloudpush\" 7.1.0.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-15T16:15:26.000+0000", "updated": "2020-07-15T16:15:26.000+0000" }, { "id": "456117", "author": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Our first tests all worked. The customer will run additional tests today. But I am hopeful that everything will work out.\r\n\r\nThank you for the good support and quick implementation.", "updateAuthor": { "name": "aschattat", "key": "aschattat", "displayName": "Antje Schattat", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-16T07:05:06.000+0000", "updated": "2020-07-16T07:05:06.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }