Skip to content

refactor flutter logs - #1504

Merged
devoncarew merged 1 commit into
flutter:masterfrom
devoncarew:flutter_logs
Feb 1, 2016
Merged

devoncarew merged 1 commit into
flutter:masterfrom
devoncarew:flutter_logs

Conversation

@devoncarew

Copy link
Copy Markdown
Contributor

Refactor the flutter logs command.

  • fix flutter logs doesn't print any acknowledgement when run #1377
  • implement clear logs for ios simulator
  • refactor logging so that a device can create and provide a LogReader. Different devices might create the same log reader - as in the case of android - or one per device. The logs command de-dups the log readers and then asks them to start reading the logs
  • if there are no devices connected, print that and exit
  • at start, print which devices we think we're listening to (Logging for Android, iPhone 6s...)
  • change the logging prefix to use the device name
  • log all the output from the ios simulator. This is very verbose, but filtering the log is problematic as not all lines important to the user mention flutter. We use some regexs to try and make the log output more readable.
  • tail the simulator log starting from the first line. Otherwise the app can crash between between when start is run and logs, and the user will have no indication of the crash in the logs output
  • in addition, listen to the system log for crashes in the simulator. This location is where info about crash report files are written.
Logging for iPhone 6s...
[iPhone 6s] CoreSimulatorBridge: Requesting installation of file:///Users/devoncarew/flutter/flutter_sunflower/ios/build/Release-iphonesimulator/Runner.app/ with options: {
[iPhone 6s]         CFBundleIdentifier = "io.flutter.runner.Runner";
[iPhone 6s]         PackageType = Developer;
[iPhone 6s]         SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
[iPhone 6s]         SimulatorUserPath = "/Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data";
[iPhone 6s]     }
[iPhone 6s] CoreSimulatorBridge: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x7fb30d205820> io.flutter.runner.Runner <(null) *Not found in database*>
[iPhone 6s] CoreSimulatorBridge: LaunchServices: Not creating progress for <LSApplicationProxy: 0x7fb30d205820> io.flutter.runner.Runner <(null) *Not found in database*> since it is not a placeholder.
[iPhone 6s] installd: 0x700000117000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/Users/devoncarew/flutter/flutter_sunflower/ios/build/Release-iphonesimulator/Runner.app" type Developer (LSInstallType = (null)) requested by CoreSimulatorBridge (pid 90443)
[iPhone 6s] installd: 0x700000094000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with:
[iPhone 6s]     state->old_bundle: /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Containers/Bundle/Application/4588EF8A-7E17-46C7-92D1-B01570C81C35/Runner.app
[iPhone 6s]     state->new_bundle: /Users/devoncarew/flutter/flutter_sunflower/ios/build/Release-iphonesimulator/Runner.app
[iPhone 6s]     state->dst_bundle: /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Library/Caches/com.apple.mobile.installd.staging/temp.rKh3Am/extracted/Payload//Runner.app, binaryDiff flag: FALSE
[iPhone 6s]         dst_ipa: /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Library/Caches/com.apple.mobile.installd.staging/temp.rKh3Am/extracted
[iPhone 6s] installd: 0x70000019a000 __MDMDirectoryDiff_block_invoke37: calling writeDictToFile with: /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Library/Caches/com.apple.mobile.installd.staging/temp.rKh3Am/extracted/ManifestCache.plist
[iPhone 6s] installd: 0x70000019a000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Library/Caches/com.apple.mobile.installd.staging/temp.rKh3Am/extracted/ManifestCache.plist
[iPhone 6s] installd: 0x700000094000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundlePatch ID=io.flutter.runner.Runner; Version=1, ShortVersion=1.0>
[iPhone 6s] installd: 0x700000094000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of io.flutter.runner.Runner from 1 (1.0) to 1 (1.0)
[iPhone 6s] installd: 0x700000094000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for io.flutter.runner.Runner is now at /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Containers/Data/Application/964BCE38-9CE9-44F4-9C67-EE98AC3459E2
[iPhone 6s] installd: 0x700000094000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for io.flutter.runner.Runner at /Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Containers/Bundle/Application/A20C9784-08B6-4A75-B12A-D6C981FCE61F
[iPhone 6s] installd: 0x700000094000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.04s; Waiting: 0.00s; Preflight/Patch: 0.01s, Verifying: 0.00s; Overall: 0.07s
[iPhone 6s] CoreSimulatorBridge: LaunchServices: NotifiedObservers <LSApplicationProxy: 0x7fb30d30b2c0> io.flutter.runner.Runner <file:///Users/devoncarew/Library/Developer/CoreSimulator/Devices/B0484E69-8A54-4CCF-8804-4780BD7D5DD4/data/Containers/Bundle/Application/A20C9784-08B6-4A75-B12A-D6C981FCE61F/Runner.app> was installed
[iPhone 6s] lsd: LaunchServices: Updating identifier store
[iPhone 6s] pkd: releasing plug-in hold D2B2B2BD-10F2-4DA9-866D-ADFF5D3E895F at client's request
[iPhone 6s] SpringBoard: Installed apps did change.
[iPhone 6s]     Added: {(
[iPhone 6s]     )}
[iPhone 6s]     Removed: {(
[iPhone 6s]     )}
[iPhone 6s]     Modified: {(
[iPhone 6s]         "io.flutter.runner.Runner"
[iPhone 6s]     )}
[iPhone 6s] SpringBoard: throwing out icon because its isn't visible in the model : node=<SBApplicationIcon: 0x7fdc4ac45d50; nodeID: "com.apple.camera"> com.apple.camera
[iPhone 6s] searchd: tcp_connection_set_tfo 6 TFO is not yet supported on Simulator
[iPhone 6s] SpringBoard: Reply Error: Connection interrupted
[iPhone 6s] CoreSimulatorBridge: Requesting launch of io.flutter.runner.Runner with options: {
[iPhone 6s]         environment =     {
[iPhone 6s]         };
[iPhone 6s]     }
[iPhone 6s] assertiond: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
[iPhone 6s] SpringBoard: LICreateIconForImage passed NULL CGImageRef image
[iPhone 6s] backboardd: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
[iPhone 6s] backboardd: SecTaskCopyDebugDescription: FlutterRunner[90982]
[iPhone 6s] backboardd: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
[iPhone 6s] backboardd: SecTaskCopyDebugDescription: FlutterRunner[90982]
[iPhone 6s] backboardd: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
[iPhone 6s] backboardd: SecTaskCopyDebugDescription: FlutterRunner[90982]
[iPhone 6s] backboardd: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
[iPhone 6s] backboardd: SecTaskCopyDebugDescription: FlutterRunner[90982]
[iPhone 6s] backboardd: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
[iPhone 6s] backboardd: SecTaskCopyDebugDescription: FlutterRunner[90982]
[iPhone 6s] FlutterRunner: assertion failed: 15C50 13C75: libxpc.dylib + 58018 [3E9AE163-9A95-35D3-BA2C-2E7144498580]: 0x7d
[iPhone 6s] assertiond: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
[iPhone 6s] --- last message repeated 1 time ---
[iPhone 6s] SpringBoard: [MPUSystemMediaControls] Updating supported commands for now playing application.
[iPhone 6s] SpringBoard: BSXPCMessage received error for message: Connection interrupted
[iPhone 6s] com.apple.CoreSimulator.SimDevice.B0484E69-8A54-4CCF-8804-4780BD7D5DD4.launchd_sim[90418] (UIKitApplication:io.flutter.runner.Runner[0xba57]: Service exited due to signal: Trace/BPT trap: 5
[iPhone 6s] SpringBoard: HW kbd: Failed to set (null) as keyboard focus
[iPhone 6s] assertiond: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
[iPhone 6s] SpringBoard: BSXPCMessage received error for message: Connection invalid
[iPhone 6s] SpringBoard: Application 'UIKitApplication:io.flutter.runner.Runner[0xba57]' crashed.
[iPhone 6s] assertiond: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
[iPhone 6s] assertiond: notify_suspend_pid() failed with error 7
[iPhone 6s] assertiond: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
[iPhone 6s] SpringBoard: Reply Error: Connection interrupted
[iPhone 6s] ReportCrash: Saved crash report for FlutterRunner[90982] version 1.0 (1) to /Users/devoncarew/Library/Logs/DiagnosticReports/FlutterRunner_2016-02-01-105423_devoncarew-macbookpro3.crash

@abarth

abarth commented Feb 1, 2016

Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<String>[...]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, but we may want to make a pass through this source base and add these in one PR.

devoncarew added a commit that referenced this pull request Feb 1, 2016
@devoncarew
devoncarew merged commit 5a21ef2 into flutter:master Feb 1, 2016
TahaTesser pushed a commit to NevercodeHQ/flutter that referenced this pull request Aug 13, 2020
[firebase_storage] Return error when failing to read file and assert that file exists when calling putFile
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter logs doesn't print any acknowledgement when run

3 participants