{ "id": "172650", "key": "TIMOB-26585", "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": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-19T01:15:58.000+0000", "created": "2018-11-20T21:04:37.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "regression" ], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-16T23:23:02.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" }, { "id": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "This is a regression.\r\n\r\nh5.Steps to reproduce:\r\n1. Build and launch an Android app to device/simulator with liveview turned on.\r\n2. Make changes to any property so that reload of the app is triggered.\r\n\r\nh5.Actual results:\r\n1. After the app launch we see {{Address in use, retrying...}} in the studio console.\r\n2. After a property is changed & app reloads below exception is thrown:\r\n{code}\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: (main) [290,9951] Attempt to invoke virtual method 'java.io.InputStream java.net.Socket.getInputStream()' on a null object reference\r\n[ERROR] : [Nexus 6P] TiExceptionHandler:\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: ti.modules.titanium.network.socket.TCPProxy.readSync(TCPProxy.java:392)\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: ti.modules.titanium.stream.StreamModule.pumpSync(StreamModule.java:359)\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: ti.modules.titanium.stream.StreamModule.access$300(StreamModule.java:24)\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: ti.modules.titanium.stream.StreamModule$3.run(StreamModule.java:343)\r\n[ERROR] : [Nexus 6P] TiExceptionHandler: java.lang.Thread.run(Thread.java:764)\r\n{code}\r\nNOTE: The app reloads fine & the necessary changes are seen behind the runtime error in the device.\r\n\r\nh5.Expected result:\r\n1. No runtime error is seen & liveview works as expected.", "attachment": [], "flagged": false, "summary": "Android: Liveview throws exception due to null object reference with latest 8.0.0", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Studio Ver: 5.1.2.201810301430\r\nSDK Ver: 8.0.0.v20181120090229\r\nOS Ver: 10.14\r\nXcode Ver: Xcode 10.1\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.8-5\r\nDaemon Ver: 1.1.3\r\nTi CLI Ver: 5.1.1\r\nAlloy Ver: 1.13.4\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10.0.2\r\nDevices: ⇨ google Nexus 5 (Android 6.0.1)\r\n ⇨ google Nexus 6P (Android 8.1.0)", "comment": { "comments": [ { "id": "443808", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~lchoudhary] I'll take a look into this, the \"address in use\" error is probably down to the dual liveview hook situation going on in 5.1.2 studio/sdk 8.0.0, I asked for TISTUD-9119 to be considered to 5.1.2 and raised the as a potential issue for the 8.0.0 release.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-11-21T11:32:33.000+0000", "updated": "2018-11-21T11:32:33.000+0000" }, { "id": "443878", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~gmathews], this looks to be coming from Java-land in the SDK. I'm guessing it's either related to the _restart method in the SDK not disposing of everything correctly or something in the HTTPClient stuff? The liveview version works fine for me on SDK 7.5.0 Any ideas? It looks to be beyond my knowledge :)", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-11-26T14:36:35.000+0000", "updated": "2018-11-26T14:40:13.000+0000" }, { "id": "443893", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/10490", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-26T19:32:32.000+0000", "updated": "2018-11-26T19:32:32.000+0000" }, { "id": "443899", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~eharris], this exception will happen if the JavaScript {{HTTPClient}} was closed and then re-used while closed. I don't see how our Java code changes in the past release would cause this error. Even the past release would have thrown an exception. It would have turned the Java exception into a JavaScript exception.\r\n\r\n(I'm still approving Gary's PR anyways since it's an improvement.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-26T22:25:19.000+0000", "updated": "2018-11-26T22:25:19.000+0000" }, { "id": "443915", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~jquick] Just my 2c (with added limited knowledge) but the area of code that the errors being thrown from looks to have undergone a fair few changes in 8.0.0 https://github.com/appcelerator/titanium_mobile/pull/10347. That with the fact that I was unable (and based off the ticket so was Lokesh) to reproduce this led me to believe it might be more on the native side than liveview itself. It might just be that liveview needs to adapt to those changes.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-11-27T08:52:44.000+0000", "updated": "2018-11-27T08:52:44.000+0000" }, { "id": "443932", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jquick], [~eharris], [~gmathews] - As I mentioned in the Asia standup yesterday now I am seeing this with 7.5.0.GA as well. I have asked Keerthi to give it a shot as I want to rule out if its an issue with my network (not likely though). Also, I don't see any liveview related changes going in studio 5.1.2. But I am going to try it with latest GA studio.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-27T17:08:54.000+0000", "updated": "2018-11-27T17:08:54.000+0000" }, { "id": "443934", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "GA studio & 7.5.0.GA looks fine for me. Keerthi was seeing the {{address in use ...}} in the console as well. She was testing with 8.0.0 earlier before moving to 5.1.2 studio & 7.5.0.GA for smokes.\r\nI restarted my machine & I am seeing the issue 100% with latest 8.0.0 SDK. But yesterday was seeing it with 7.5.0.GA (this is a mystery) but now I don't see it.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-27T18:02:07.000+0000", "updated": "2018-11-27T18:02:25.000+0000" }, { "id": "444021", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A quick update here is that prior LiveView servers are not terminating when they should. This holds onto the port that needs to be used by any new LiveView servers. Which is why you are seeing \"Address in use, retrying...\"\r\n\r\n[~eharris] may know more about why this is happening?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-28T22:55:24.000+0000", "updated": "2018-11-28T22:56:47.000+0000" }, { "id": "444214", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Missed that ping, there is a known around liveview servers not being killed always (TIMOB-25821), this generally isn't an issue as liveview will attempt to kill any existing servers on startup, but it only calls localhost:8324 so if you're using custom IPs/ports then there's issues (TIMOB-25823).\r\n\r\nI don't think this is what Lokesh is seeing though, when building with SDK 8 you're pulling in the liveview hook from Studio AND the hook from the SDK (we can't remove the Studio hook for compatibility reasons). TISTUD-9119 aimed to mitigate this by making the hook in Studio a no-op on SDK 8 or above. The problem here is that fix is only shipping in 6.0.0 (despite my requests), this means that when you run a build you'll be having two liveview servers attempting to start, causing the \"address in use\" issue. If you use Studio 6 then you shouldn't see this issue.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-12-04T11:41:21.000+0000", "updated": "2018-12-04T11:41:21.000+0000" }, { "id": "444618", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "One thing to note is I do get the exception above when live view is run from CLI as well.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-14T23:04:44.000+0000", "updated": "2018-12-14T23:04:44.000+0000" }, { "id": "444723", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.\r\nPart of this fix will in studio 5.1.2.GA", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-19T01:15:40.000+0000", "updated": "2018-12-19T01:15:53.000+0000" }, { "id": "445418", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 8.0.0.v20190115162133 & studio 5.1.2.\r\n\r\nClosing.\r\nStudio Ver: 5.1.2.201812191831\r\nSDK Ver: 8.0.0.v20190115162133\r\nOS Ver: 10.14\r\nXcode Ver: Xcode 10.1\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.10-master.5\r\nDaemon Ver: 1.1.3\r\nTi CLI Ver: 5.1.1\r\nAlloy Ver: 1.13.7\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10.0.2\r\nDevices: ⇨ google Nexus 5 (Android 6.0.1)\r\n ⇨ google Pixel (Android 9)\r\n\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-16T23:22:57.000+0000", "updated": "2019-01-16T23:22:57.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }