{ "id": "172756", "key": "TIMOB-26751", "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": null, "resolutiondate": null, "created": "2018-12-16T15:55:44.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-19T14:34:35.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "While using a third-party [Android Calendar|https://github.com/psinetron/slycalendarview] library with *Hyperloop* for date-range selection, we are getting a crash error as below.\r\n\r\n{noformat}\r\n[ERROR] : TiExceptionHandler: (main) [6808,6808] /hyperloop/ru.slybeaver.slycalendarview.SlyCalendarDialog$Callback.js:32\r\n[ERROR] : TiExceptionHandler: \t\t\tif (arg.apiName && arg.isNativeProxy && arg.isInstanceProxy) { // Assume hyperloop proxy, wrap in JS wrapper\r\n[ERROR] : TiExceptionHandler: ^\r\n[ERROR] : TiExceptionHandler: TypeError: Cannot read property 'apiName' of null\r\n[ERROR] : TiExceptionHandler: at _wrapArg (/hyperloop/ru.slybeaver.slycalendarview.SlyCalendarDialog$Callback.js:32:12)\r\n[ERROR] : TiExceptionHandler: at Instance._wrapArgs (/hyperloop/ru.slybeaver.slycalendarview.SlyCalendarDialog$Callback.js:42:18)\r\n[ERROR] : TiExceptionHandler: at Instance.modified.(anonymous function) (/hyperloop/ru.slybeaver.slycalendarview.SlyCalendarDialog$Callback.js:55:53)\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:55)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:41)\r\n[ERROR] : TiExceptionHandler: hyperloop.HyperloopInvocationHandler.invoke(HyperloopInvocationHandler.java:58)\r\n[ERROR] : TiExceptionHandler: java.lang.reflect.Proxy.invoke(Proxy.java:913)\r\n[ERROR] : TiExceptionHandler: $Proxy0.onDataSelected(Unknown Source)\r\n[ERROR] : TiExceptionHandler: ru.slybeaver.slycalendarview.SlyCalendarView$2.onClick(SlyCalendarView.java:133)\r\n[ERROR] : TiExceptionHandler: android.view.View.performClick(View.java:6294)\r\n[ERROR] : TiExceptionHandler: android.view.View$PerformClick.run(View.java:24770)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.handleCallback(Handler.java:790)\r\n[ERROR] : V8Exception: Exception occurred at /hyperloop/ru.slybeaver.slycalendarview.SlyCalendarDialog$Callback.js:32: Uncaught TypeError: Cannot read property 'apiName' of null\r\n{noformat}\r\n\r\nThis error is happening when we click *Save* button (see attached screenshots for Save button UI) either without selecting any date or after selecting only start or single date. Selecting start and end dates both is giving correct/expected results. \r\n\r\nAlso note that I tried this in native Android sample app using Android Studio and it's not crashing there in any cases. Seems it's pretty related to *Hyperloop* if any argument in listener callback method is found as null.\r\n\r\n*_Sample code for reproducing this error:_*\r\n\r\n{code:java}\r\nvar AppCompatActivity = require('android.support.v7.app.AppCompatActivity');\r\nvar SlyCalendarDialog = require('ru.slybeaver.slycalendarview.SlyCalendarDialog');\r\n\r\n\r\nfunction showCalendar(e){\r\n // need to pass support-fragment manager to this library\r\n var compatActivity = new AppCompatActivity(Ti.Android.currentActivity);\r\n\r\n new SlyCalendarDialog()\r\n .setSingle(false)\r\n .setCallback(new SlyCalendarDialog.Callback({\r\n onCancelled : function () {\r\n alert('calendar dialog cancelled');\r\n },\r\n \t\tonDataSelected: function(firstDate, secondDate, hours, minutes) {\r\n \t\t\ttry {\r\n Ti.API.info('firstDate - ' + firstDate);\r\n \t\t\tTi.API.info('secondDate - ' + secondDate);\r\n \t\t\tTi.API.info('hours - ' + hours);\r\n \t\t\tTi.API.info('minutes - ' + minutes);\r\n } catch (exc) {\r\n Ti.API.error('exc - ' + exc);\r\n }\r\n \t\t}\r\n \t}))\r\n .show(compatActivity.getSupportFragmentManager(), \"TAG_SLYCALENDAR\");\r\n}\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar btn = Ti.UI.createButton({ 'title' :'Show Calendar' });\r\nbtn.addEventListener('click', showCalendar);\r\n\r\nwin.add(btn);\r\n\r\nwin.open();\r\n{code}\r\n\r\n*_Steps to reproduce:_*\r\n1- Run the sample code in a test app after properly adding the attached .aar file.\r\n2- Tap on `Show Calendar` button, the calendar dialog should open now.\r\n3- Without selecting any date, tap on `Save` button inside dialog.\r\n4- This error should come up. Tap on `Continue` to run further tests.\r\n5- Now open the calendar dialog again and select a single date and tap on `Save`, the error will come up again.\r\n6- Open the dialog again and select start and end dates and tap on `Save`, this time it will print the result properly.\r\n\r\nI cannot find any work-around here as of now, so I am looking forward to get a quick fix for this bug as early as possible.\r\n\r\n_*Note:*_ I have attached the .aar file for this library and the required screenshots (UI theme may differ but that should not affect the code functionality at all).\r\nAlso here's [My Own KitchenSink|https://drive.google.com/file/d/17U1IFY1rNSjy_o1X0En_qVFyQAPNJOHH/view?usp=sharing] test app I have been using for all sample stuffs. You can try this sample in this test app.", "attachment": [ { "id": "65981", "filename": "Calendar Dialog.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-16T15:50:40.000+0000", "size": 33033, "mimeType": "image/png" }, { "id": "65982", "filename": "Calendar Dialog Result Without Selecting Any Date.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-16T15:50:40.000+0000", "size": 70779, "mimeType": "image/png" }, { "id": "65983", "filename": "slycalendarview-0.0.8.aar", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-16T15:49:05.000+0000", "size": 48338, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Hyperloop Android: Cannot read property 'apiName' null upon calling callback", "creator": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8.0GB\r\n\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.13\r\n Core Package = 7.0.8\r\n\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\n node-appc Version = 0.2.44\r\n\r\nTitanium SDKs\r\n 7.5.0.GA\r\n Version = 7.5.0\r\n Install Location = /Users/prashant/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA\r\n Platforms = iphone, android\r\n git Hash = 2e5a7423d0\r\n git Timestamp = 11/15/2018 21:52\r\n node-appc Version = 0.2.47\r\n\r\n \r\nMac OS X\r\n Command Line Tools = installed\r\n\r\nJava Development Kit\r\n Version = 1.8.0_144\r\n Java Home = /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home", "comment": { "comments": [ { "id": "444675", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nThanks for reporting this. Are you experiencing this in all android devices or sepcifice one?", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T08:40:07.000+0000", "updated": "2018-12-18T08:40:07.000+0000" }, { "id": "444676", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T08:45:27.000+0000", "updated": "2018-12-18T08:45:27.000+0000" }, { "id": "444677", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~prashant_saini],\r\nThanks for your feedback. Did you follow [this|https://docs.axway.com/bundle/Titanium_SDK_allOS_en/page/android_hyperloop_programming_guide.html#AndroidHyperloopProgrammingGuide-UsingThird-partylibraries ] accordingly? Unable to reproduce the same error. It would be helpful if you can share your full sample test project with us. ", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T11:49:07.000+0000", "updated": "2018-12-18T11:49:07.000+0000" }, { "id": "444679", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, I had followed the steps properly and that's why I am able to implement that library otherwise I would not have seen this error at all.\r\n\r\nI believe you have not followed the steps properly as I have defined the steps to reproduce as clear as possible and it will surely reproduce the error. I have also added the sample screenshot for that error and the other ticket also has the same issue.\r\n\r\nPlease provide me your environment details you have used and also the sample code so I can test it here and match with my code. \r\n\r\nIt's getting quite disappointing that you guys are unable to test the stuffs properly despite of the very detailed informations provided by reporting users.", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T11:54:27.000+0000", "updated": "2018-12-18T12:02:00.000+0000" }, { "id": "444680", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have already provided the sample code (a single file code) and the .aar file and the related screenshots, now I do not understand what else you need from me as I have nothing to provide now.\r\n\r\nI would suggest to please focus on the *_Steps to Reproduce_* properly. I am still able to reproduce this issue as many times as I am tapping on *Save* button in calendar dialog without selecting any date.", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T11:59:57.000+0000", "updated": "2018-12-18T11:59:57.000+0000" }, { "id": "444685", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~prashant_saini],\r\n\r\nThanks for your feedback. We are closely investigating this issue. Hope we will get back to soon. ", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T12:40:22.000+0000", "updated": "2018-12-18T12:40:37.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }