Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27331] Xcode 11: No logs shown on recurring builds

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-10-21T21:36:09.000+0000
Affected Version/sRelease 8.2.0
Fix Version/sRelease 8.2.1
ComponentsiOS
LabelsengSchedule
ReporterHans Knöchel
AssigneeChris Barber
Created2019-08-12T13:18:43.000+0000
Updated2019-10-21T21:36:09.000+0000

Description

Using the latest Xcode 11 B5, application logs are no longer visible. Logs:
[TRACE] ** BUILD SUCCEEDED **
[INFO]  Finished building the application in 41s 82ms
[INFO]  Launching iOS Simulator
[TRACE] [ioslib] Selected iOS Simulator: iPhone Xʀ
[TRACE] [ioslib]   UDID    = DF1A2054-2C4C-4C7F-9E4A-C1BA5338D43E
[TRACE] [ioslib]   iOS     = 13.0
[TRACE] [ioslib] Autoselected Xcode: 11.0
[TRACE] [ioslib] Checking if the simulator /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator is already running
[TRACE] [ioslib] Simulator is running (pid 30875)
[TRACE] [ioslib] Waiting for simulator to boot...
[TRACE] [ioslib] Simulator is booted!
[TRACE] [ioslib] iPhone Xʀ Simulator already running with the correct UDID
[TRACE] [ioslib] Tailing iPhone Xʀ Simulator system log: /Users/user/Library/Logs/CoreSimulator/DF1A2054-2C4C-4C7F-9E4A-C1BA5338D43E/system.log
[TRACE] [ioslib] Running: osascript "/Users/user/Library/Application Support/Titanium/mobilesdk/osx/8.2.0/node_modules/ioslib/lib/sim_focus.scpt" "Simulator"
[TRACE] [ioslib] iPhone Xʀ Simulator successfully focused
[TRACE] [ioslib] Installing the app
[TRACE] [ioslib] App launched
[TRACE] [ioslib] Trying to connect to log server port 50092...

Comments

  1. Hans Knöchel 2019-09-18

    Any update on this [~amukherjee] [~vsingh]?
  2. Ewan Harris 2019-09-24

    I can reproduce this, steps to reproduce 1. Build the app to a simulator 2. Without killing the app, rebuild If I kill the app or rebuild using --force, then the CLI can reconnect just fine. Debugging the CLI, I can see that we're continually getting stuck in a loop [here](https://github.com/appcelerator/ioslib/blob/aa91c851fcc8ce137c1ded39088abc17afa3d582/lib/simulator.js#L1663-L1670), if I change the logServerPort to point at the original value the cli determined from my app id (as opposed to the randomly generated value) then it connects just fine. Running lsof -i tcp | grep <name> where name is the first 9 letters of your app name shows the app has a port open on the app id log server port value, but not the randomly generated log server port value. Maybe we need to make the logserver port a toggle in the rebuild checks? But seeing as that will more than likely toggle each build with the current checks that seems totally unwanted. cc [~cb1kenobi]
  3. Chris Barber 2019-09-27

    I can also reproduce this. Essentially xcodebuild is not picking up the changes in the Xcode project (the log server port changing) and forcing a rebuild. Instead it doesn't detect any changes and skips the build. If I manually change the log server port in the generated Xcode project, then manually build and install the app, it works just fine. I'm still trying to pinpoint exactly what we need to do to replicate what Xcode does. It does not touch any build files or derived data. It's worth noting that when I open the generated Xcode project and manually change the settings, Xcode will change and shift around quite a few things, but in general, the files are the same. We may need to go back to NSLog() writing to a file on disk and the Titanium CLI tailing that log file.
  4. Chris Barber 2019-09-27

    Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/11245 Ti SDK 8_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/11246 These PRs revert the simulator log mechanism back to the file-based log from Titanium SDK 5.5.0 that was removed in Titanium SDK 6 in favor of the log server. The build generates the name of the log file that the app is to write log output to. It is baked into the build using a gcc define When the app is launched, it writes the log file located at ~/Library/Developer/CoreSimulator/Devices/<udid>/data/.../<app guid>.log. This log file is then tailed and output by the Titanium CLI. Note that the log server running in the iOS app is still used for device builds.
  5. Lokesh Choudhary 2019-10-16

    FR Passed.
  6. Lokesh Choudhary 2019-10-17

    PR's merged.
  7. Lokesh Choudhary 2019-10-21

    Verified the fix with SDK 8.2.1.v20191021132318 & 8.3.0.v20191021123610. Closing.

JSON Source