[AC-6345] Running osascript sim_focus.scpt hangs for 7-8 minutes when running iOS Alloy app in emulator
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-12-20T16:01:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Joe |
Assignee | Motiur Rahman |
Created | 2019-08-24T00:51:48.000+0000 |
Updated | 2019-12-20T16:01:25.000+0000 |
Description
Steps to Reproduce
Two weeks ago I updated to Studio 5.1.3.201907112159, CLI 7.1.0 and SDK 8.1.0 GA.
Now when running an alloy project in the iOS simulator, studio hangs after about 7-8 minutes after : [TRACE] : [ioslib] Running: osascript ....sim_focus.scpt 'Simulator'
The emulator is displayed immediately but it takes 7+ minutes before the next trace log '[TRACE] : [ioslib] iPhone 8 Simulator successfully focused' is displayed.
Once the app is shown in emulator, changes to alloy project code do reload the app in emaulator as expected.
I tried to resolve this issue by changing to CLI 7.0.12 (appc use 7.0.12) and also tried using 8.0.2GA SDK - but neither resolved this issue.
Actual Result
Simulator hangs for 8 minutes before displaying the app
Expected Result
Simulator should display the app quickly after simulator is activated
Attachments
I'm surprised nobody is reporting this same issue. I have a standard and clean environment. I previously thought I was able able to resolve this by using CLI 7.0.12 but that wasn't the case. I have tried every which way to clean/build, use different simulators etc. without any progress. Any suggestions / ideas? Node version? OS version/feature? Is there any type of AppleScript logging/trace I can turn on that may help?
[~NewportSolutions], if you build your project from the CLI using
DEBUG=*,-babel appc run -p ios
(with Studio closed) do you see the same difference in time between the log output? If you could upload that log output it might contain some info that could help us debug your issueI was able to build using the CLI as instructed and the default simulator opened and displayed the app immediately. I also tried choosing a specific simulator (one that delays when building with Studio) and the app displays immediately - as it should. I will upload the log output from studio.
I just ran the app from Studio and again almost exactly 10 minutes staring at the simulator until you see the app gets installed and opens immediately. I cleared the Studio log file before the running the app and the log file is empty (I think you meant that log file). I also ran NOT using LiveView and am experience the same result - simulator opens, 10 mins goes by, then app installs and opens in simulator.
How does it behave when you compile via CLI instead of studio?
[~NewportSolutions], I meant the log output from a build. You can find a file in the build directory called
build_iphone.log
or you can just copy and paste it into a text file from the terminal/studio output. Based off all the information you've provided this does look identical to TIMOB-27102, it only occurs in Studio, happens in the identical place etc, is the app you're building definitely using 8.0.2.GA or higher?Yes - I am sure about 8.0.2GA or higher and have just ran two clean tests with log files attached. I cleaned and built the app to run on a simulator using CLI 7.0.12 and SDK 8.0.2GA - same results, log file attached. I cleaned and built the app to run on a simulator using CLI 7.1.0 and SDK 8.1.0GA - same results, log file attached.
Could this issue be caused by the Node version installed? I am using Node v8.9.4 but looks like I could upgrade to 8.16.x according to the [Titanium Compatibility Matrix](https://docs.appcelerator.com/platform/latest/#!/guide/Titanium_Compatibility_Matrix-section-src-29004837_TitaniumCompatibilityMatrix-Node.js).
I'm not sure that could improve anything. Did you by any chance upgrade Java as well? And what version of Java/JDK are you running?
No Java updates. Here's what I have installed: java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) What script is running when this is displayed, "Running: osascript ....sim_focus.scpt 'Simulator' "? The sim_focus.scpt is working, it's the script/process that runs sim_focus.scpt that is not responding. This is killing me and hard to believe I'm the only one having this issue. Maybe some type of environment / config issue...
Upgrading to Node 8.16 did not help and neither did SDK 8.1.1.GA. I did find a mention that [Node 8.16.0 is "required" for Studio 5.1.3+](https://docs.appcelerator.com/platform/latest/#!/guide/Titanium_Compatibility_Matrix-section-src-29004837_safe-id-VGl0YW5pdW1Db21wYXRpYmlsaXR5TWF0cml4LVN0dWRpb05vZGUsQ0xJLGFuZFRpdGFuaXVtU0RLc3VwcG9ydGVkdmVyc2lvbnM) in the docs. Can either of you ( @topener @eharris ) tell me what process is running when this is displayed, "Running: osascript ....sim_focus.scpt 'Simulator' "? The sim_focus.scpt is working fine - it's the script/process that runs sim_focus.scpt that is not responding.
Hello [~NewportSolutions], What happens if you run from the terminal inside the studio. Can you run with the DEBUG=*,-babel appc run -p ios -l trace? Click on the terminal icon in the studio to open the terminal inside the studio and run this command. You can run your choice of the simulator with the -C
I ran the app (and other apps) using this method with the same result - 10 full minutes after Simulator launches before the app install is triggered. Running the app using the console inside studio did not reveal anything as far as I can tell. See below:
BTW I can use and interact with Simulator immediately after it is started (booted). But sim_focus.scpt does not "seem" to complete for 10 minutes.
Hello, What's the update of the issue on the latest SDK 8.2.1.GA?
I stopped using Studio altogether and now use VS Code without any problems. Studio still has the issue regardless of the SDK version. This has not been resolved but since nobody else seemed to report this issue perhaps you should close it.
[~NewportSolutions] Thanks for your update. I tested with the latest Studio v5.1.4.201909061933 and it's working faster. Here is my testing environment. Appcelerator Command-Line Interface, version 7.1.2 Name = Mac OS X Version = 10.14.6 Node.js Node.js Version = 10.16.3 npm Version = 6.9.0 Titanium CLI CLI Version = 5.2.2 Titanium SDK SDK Version = 8.3.0.GA So I am going to close it. If you experience the same issue with the latest environment then you can raise another ticket. Thanks!