[DAEMON-260] Android configuration issues with the Studio 5.1.0
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2019-03-13T20:42:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 2.0.0 |
Components | androidlib |
Labels | n/a |
Reporter | Kondal Kolipaka |
Assignee | Chris Barber |
Created | 2018-06-26T03:47:14.000+0000 |
Updated | 2019-03-13T20:42:26.000+0000 |
Description
Hi all. I am having issues with Studio on my Mac. It seems to randomly not know that I have Android SDKs installed. It worked last week. Just this morning, I start up studio and on the dashboard I see that Android is ready to go. Then an few seconds later it changes to grayed out and the button says download. I click download and run the install - when I do it recognizes that I already have some versions of the SDK installed. But once through the install process, the problem still exists. I have been doing this all morning. An interesting point is that one of the times I did this process, it worked and I saw the emulators that I have always had available in Studio. Also note that the preferences pane in Studio sometimes shows that it has found the SDKs and the emulators dropdown is populated, but most of the time it looks like the attached screenshot. Any help would be greatly appreciated as I am unable to do Android mobile demonstrations and I have several in the near future. Thanks in advance.
Attachments
[~fuzzywhite] If I understand the issue correctly, you're unable to configure Android SDK in the studio and it doesn't update in the studio dashboard page after installing a couple of times.Hope you're on the latest studio RC which is 5.1.0.201806130758 as on June 26th. Can you please provide the following logs and studio version which you're using. Before you fetch all the logs, please restart the studio with the following settings
Go to Studio Preferences -> Studio -> Trouble Shooting
Select Debug Level to "All" from the drop-down
Click on Apply and restart the studio
Once studio is launched, verify the android configuration in the dashboard and studio preferencesGo to Studio Preferences -> Studio -> Platforms -> Android
If no android SDK is configured or shown here, click on the "Browse" button to select android SDK location.
*To fetch Studio diagnostic Log:*Go to Help -> Studio -> Run Diagnostic Test
*To fetch Studio log:*Go to Help -> Studio -> View Log file
*To fetch Appc Daemon Log:*Go to Help -> Studio -> Generate Appc Daemon Log
*To fetch Appc ti info*Go to terminal and run
Please attach all the logs to the ticket to process further.appc ti info
Diagnostic test will not run. Attached screenshot shows the error. Other requested info is attached. Thanks very much. [^tiInfo.rtf] [^appcd_dump_1530044433964.log] !Screen Shot 2018-06-26 at 1.18.59 PM.png|thumbnail!
[~rwhite] Can you please add the missing studio log file as mentioned above
Sorry. I’ll get that for you in an hour or so.
[^studio.log]
Thanks [~rwhite] for providing the logs. Looks like the problem is with the getting the android system-info from the Appc Daemon with in the 5sec, after making a system-info request if the daemon process doesn't respond with in the 5sec, studio will cancel the request process. [~cbarber] Why this can happen and how can we trace the root problem for this? I believe 5sec is good enough to fetch the system info from the daemon process. *Here is the request made by studio:*
Here is the Appc Daemon [^appcd_dump_1530044433964.log], But I don't see any issue here. *Error log:*
I think 5 seconds is most likely insufficient. The first time the system-info is called, it takes time to get warmed up. There are performance issues too with serializing the giant system-info object. I created DAEMON-230 to look into speeding it up, but without a major effort, it's just not feasible. Querying each type of info separately would be more efficient than system-info.
https://github.com/appcelerator/titanium_studio/pull/1085
FR Passed. The login, dashboard and platform configuration works fine with the changes. Also no significant changes in performance noticed.
[~rwhite] Please pick 5.1.0 RC build - 5.1.0.201806291005 which is published here http://preview.appcelerator.com/appc-studio/ Let us know how it goes.
Unfortunately, the problem still exists with this version . However, it looks like the log file may have some more valuable info in it. Attached. [^log]
reopening, because it is not resolved. Thanks
[~kondal kolipaka]. I will ping you on teams around 10 am Singapore time. Now iOS is not working either. I am going to need help reconfiguring my Mac to get Appc Studio working again. Thanks
Few observations from the today's call with [~rwhite]
appc appcd exec /android/1.x/info
is not responding. We have waited for more than 2mins still it doesn't return.appc appcd exec /system-info/1.x/info
is also not responding from the terminal, butappc appcd exec /ios/1.x/info
seems to work fine.I'm 99% positive I found the culprit and it's in androidlib. androidlib's logic was ported from node-titanium-sdk. During the port, the code for executing a command over an adb connection was erroneously changed from a
socket.on('end')
to asocket.on('close')
. When a command that is to buffer until the socket is closed, such as "shell", is executed, the "close" event would never fire. Turns out this needs to be an "end" event. It was fixed in [this commit](https://github.com/appcelerator/androidlib/pull/20/commits/099b8d22866b4bd4c574f2a98fed2d1c396990e5) and shipped in androidlib@2.4.0. Since the fix, I haven't seen any hanging. Resolving this issue as fixed.