[TIMOB-17601] iOS8: Simulator - unexpected behavior before launching the app
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2016-12-23T23:38:05.000+0000 |
Affected Version/s | Release 3.4.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | ios8, qe-3.4.0 |
Reporter | Olga Romero |
Assignee | Chris Barber |
Created | 2014-09-02T18:28:29.000+0000 |
Updated | 2016-12-23T23:38:05.000+0000 |
Description
Description
When launching the app on iOS8 Simulator, I encountered that as soon as the simulator started, it hanged with the black screen for a while before the splash screen appeared. The simulator displays the home screen with the installed app icon. The second attempt to launch the app is successful.
Note: the black screen appears for iOS7 and iOS8 Simulators, the return to the home screen happens on iOS8 Sim only.
To reproduce
1. Create the default app with appcelerator services enabled
2. Run iOS Simulator
Actual result
The black screen for a while, the splash screen and return to the home screen.
Expected result
The application should be launched successfully
Attachments
This appears to be prevalent on slower machines.
affects me too and I am on a latest and greatest fully stocked MBPr
Issue appears on iPhone 6 simulators also. Environment: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409032106 Titanium SDK build: 3.4.0.v20140909144631 Titanium CLI, build: 3.4.0-beta Alloy: 1.5.0-beta2 iOS Simulator iPhone 6 8.0
[~eharris] to re-reproduce, [~cbarber] to review.
Attempted to reproduce on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409112242 Titanium SDK build: 3.4.0.v20140912120914 Titanium CLI, build: 3.4.0-rc2 Alloy: 1.5.0-beta2 iOS Simulators iPhone 6 (8.0), iPhone 6 Plus (8.0), iPhone 5s (7.1) Xcode6 GM Seed Saw the issue this morning before being asked to reproduce, I was building a newly created app to an iPhone 6 Simulator and the issue appeared. However since then I have been unable reproduce the issue. The issue exists but appears to be intermittent and can't be reproduced reliably.
An additional note, we noted similar behavior when running in Xcode alone. It was a titanium-created project, but launched using Xcode on a slower mac. If anyone is able to reproduce, please try a project created by Xcode of similar complexity to see if this issue is exhibited by Xcode as well.
Please, see the attached files.
Analyzing the ios-sim and system.log we see that the app was indeed launched, but the process was killed by iOS.
Why? No idea. It's not clear yet if this is an SDK issue or a tooling issue.
I am unable to reproduce on MBP Retina, 15-inch, Mid 2014, 16 GB, 512 SSD, OS X 10.9.4, Xcode Version 6.0 (6A313) The two internal engineers that have been able to reproduce the issue have the same software versions but more modest MacBook Pros (one a 15-inch, Mid 2010, the other a 15-inch, Mid 2012). Both have 8 GB and HDD instead of SSD.
To anyone who can reproduce this problem, will you please attach your launchd_bootstrap.plist to this ticket? You can find the path to this file by running this command from Terminal:
This log output, from iOS-sim, is normal and indicates the expected shutdown of an app launched from ios-sim when the user launches the app for a subsequent time; it is not an indication of the error:
This log output, from the system log, is also normal and not an indication of the error (it occurs at the same time that the user launches the app for a subsequent time under iOS-sim):
My suggestion for a workaround to this issue is to modify ios-sim (or its driver ioslib) to look for this log output from the system log as an indication failure to launch the app, and upon detecting this output launch the app again (and repeatedly) using ios-sim:
Since I cannot reproduce the problem, I cannot be certain that this algorithm is absolutely correct, but it does represent a reasonable algorithm based on the data we have.
Having the same issue since I installed this. http://builds.appcelerator.com/mobile/3_4_X/mobilesdk-3.4.0.v20140916151649-osx.zip
Thank you Malcolm. To any one else who can reproduce this problem, please check to see if your app has a crash log, or if your iOS Simulator itself is crashing (you will find these crash reports under ~/Library/Logs/DiagnosticReports/) and attach them to this ticket.
[~mlangston] just attached the launchd_boostrap generated after this issue occured. Let me know if you need any other files.
Thank you [~eharris]. Could you also upload the crash logs mentioned above?
Tested: Mac osx 10.9.4 Maverics Appcelerator Studio, build: 3.4.0.201409131030 Titanium SDK, build: 3.4.0.v20140916181713 acs@1.0.16 alloy 1.5.0-rc2 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0-rc4 titanium-code-processor@1.1.1 Xcode6GM iOS 8 Simulator iPhone5s [~mlangston] trying to find useful logs, please check (format.zip-built for ios8 sim) in your email, could not attach due to a large size.
Test steps
1. Updated CLI and SDK build 2. Created a default classic project 3. Run> iOS 8 iPhone5s SimulatorHave attached the logs from a failed build as SystemLogsEHarris, at line 202 the application exits and the console prints
Thank you [~eharris] and [~oromero]. FYI, the line containing
is expected. The problem which both of you can reproduce (and that I cannot reproduce) causes this line in the syslog:
You have both confirmed for us that this is symptomatic of the root cause (which is still unknown). We are developing a workaround that looks for this specific datum under the simulator and re-launches the app under this circumstance.
Master: https://github.com/appcelerator/titanium_mobile/pull/6136 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6137
Hello, I have observed similar issue with the new SDK and iOS 8.0 simulator. Sometimes the app doesn't launch on the first try. The simulator hangs in there with a black screen and after some time, the studio console display an error "project failed to build". Then again on the second try it's working fine. Another problem, that happens sometime is , after i run a project. In studio console though "Launching iOS Simulator" appears, but it hangs there and dosen't open the simulator. the only way is to stop the process and re run the project. this time it works. Thanks.
I built repeatedly for various iOS7 & 8 simulators and was unable to reproduce the original issue. PRs merged.
Reopening ticket. Can still reproduce this issue on: Appcelerator Studio, build: 3.4.0.201409161950 SDK build: 3.4.0.v20140922070914 CLI: 3.4.0-rc4 Alloy: 1.5.0-rc3 Xcode: 6.0.1 Devices: iphone 5 simulator (8.0), iphone 5s simulator (7.1) *Steps to reproduce:* 1. Create a titanium project from CLI 2. Launch project to device simulator e.g.
ti build -p ios -C "74A48716-6FC7-45DA-982A-81F699A8E1CA"
Also, I was *not* able to reproduce this in native (Xcode 6.0.1) i.e. created the default two-tabbed default application, launched project in simulator 8.0, and app was able to launch successfully. One thing I noticed when trying to reproduce this issue in native is that Xcode 6.0.1 generated a default splash screen; see native_splash_screen.png attachment. Not sure if it's related to this issue, but in Xcode 5.1.1, no splash screen was generated. Also, will attach my log and crash reports when I was able to reproduce this issue in Titanium; see wluu_titanium.zip
PRs to revert: 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6164 Master: https://github.com/appcelerator/titanium_mobile/pull/6165
Improved handling of timeouts and update the latest version of ioslib. Master: https://github.com/appcelerator/titanium_mobile/pull/6173 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6184
Code looks good. I can't reproduce the issue. Maybe [~wluu] or [~oromero] should try before I merge the PR?
[~skypanther] Technically, [~oromero] already tested it yesterday and the adjusted ios-sim timeout did allow the simulator enough time to launch, but it did still kill the app after 20 seconds.
I'm seeing this on Mavericks 10.9.5, Titanium Studio 3.4.0 GA, Xcode 6.0.1, CPU 2x3 GHz, 8 GByte RAM, Building an existing (since TI 1.8) classic app for IOS8 and iPhone 6 simulator. [INFO] Skipping xcodebuild [INFO] Finished building the application in 4s 344ms [INFO] Launching iOS Simulator [ERROR] Project failed to build after 8s 399ms Build (incremental) from command line is fast in about 4 seconds while simulator shows the home screen after additional 5 seconds. No additional error message then those above. If I use a IOS7 simulator the simulator starts without any problems, running the app. Going into the build directory and opening the build/iphone/App.xcodeproj directly with XCode and building and running it there with the IOS8 simulator for a iPhone 6 device is successfull and shows no problems. If I create a fresh classic app in Titanium and build it without any change for IOS8 and the iPhone 6 simulator, the simulator starts without problems. I see no difference in startup time between IOS7 and IOS8 simulator.
[~skypanther] I believe you can go ahead and merge at this point, assuming you are okay with the code. I did make one comment on a milliseconds/seconds switch.
PRs merged
This is a modified version of ioslib. It uses 'xcrun simctl' provided by xCode 6 to launch the simulator, install and run the project. It was tested on a Core 2 Duo MacBook Pro and the unexpected behavior could not be reproduced.
[~mdadu] Why submit a zip file instead of a pull request? I would prefer to build and test from source.
Reopening ticket as issue still occurs on: Mac OSX 10.10 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.4.2.v20141117130125, 3.5.0.v20141117130916 Titanium CLI, build: 3.4.1 Xcode 6.1, 6.1.1 GM Seed, 6.2 Beta iOS Simulator 8.1, 8.2 I have set my ios.simTimeout to 720(12 minutes) and when building to sim I regularly see the original issue where the splash screen would show and then it will fall back to the home screen. In the logs however there are differences, I see the line
but I do not see
[~eharris] Can you confirm that on latest SDK's?
Resolving as "Cannot Reproduce" with newer versions of our SDK. Confirmation by [~cbarber] welcome!