1. 19 Oct, 2023 1 commit
  2. 18 Oct, 2023 2 commits
  3. 17 Oct, 2023 2 commits
    • auto-submit[bot]'s avatar
      Reverts "Skip injecting Bonjour settings when port publication is disabled" (#136750) · 54c0a350
      auto-submit[bot] authored
      Reverts flutter/flutter#136562
      Initiated by: vashworth
      This change reverts the following previous change:
      Original Description:
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      54c0a350
    • Victoria Ashworth's avatar
      Skip injecting Bonjour settings when port publication is disabled (#136562) · 0383d8ba
      Victoria Ashworth authored
      Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).
      
      Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.
      
      To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
      0383d8ba
  4. 26 Sep, 2023 1 commit
    • Victoria Ashworth's avatar
      Wait for CONFIGURATION_BUILD_DIR to update when debugging with Xcode (#135444) · 3cfe3720
      Victoria Ashworth authored
      So there appears to be a race situation between the flutter CLI and Xcode. In the CLI, we update the `CONFIGURATION_BUILD_DIR` in the Xcode build settings and then tell Xcode to install, launch, and debug the app. When Xcode installs the app, it should use the `CONFIGURATION_BUILD_DIR` to find the bundle. However, it appears that sometimes Xcode hasn't processed the change to the build settings before the install happens, which causes it to not be able to find the bundle.
      
      Fixes https://github.com/flutter/flutter/issues/135442
      
      --- 
      
      Since it's a timing issue, there's not really a consistent way to test it.
      
      I was able to confirm that it works, though, by using the following steps:
      1. Create a flutter project
      2. Open the project in Xcode
      3. `flutter clean`
      4. `flutter run --profile -v`
      
      If I saw a print line `stderr: CONFIGURATION_BUILD_DIR: build/Debug-iphoneos`, that means it first found the old and incorrect `CONFIGURATION_BUILD_DIR` before updating to the the new, so I was able to confirm that it would wait until it updated.
      3cfe3720
  5. 18 Sep, 2023 1 commit
    • Victoria Ashworth's avatar
      Don't uninstall before retrying to connect during app launch (#134542) · abf8361a
      Victoria Ashworth authored
      When retrying to connect to the device during app launch, don't uninstall the app first.
      
      Latest test flake for https://github.com/flutter/flutter/issues/120808:
      https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8770202475999850785/+/u/run_hot_mode_dev_cycle_ios__benchmark/test_stdout
      
      Shows that it uninstalled and then tried debugging and failed, which would make sense since the app wasn't installed anymore.
      ```
      [2023-09-11 18:02:24.555646] [STDOUT] stdout: [   +6 ms] Lost connection to device. Trying to connect again...
      [2023-09-11 18:02:24.556949] [STDOUT] stdout: [   +1 ms] executing: /opt/s/w/ir/x/w/recipe_cleanup/tmp53fs1szo/flutter sdk/bin/cache/artifacts/libimobiledevice/idevicesyslog -u 00008030-00144DA10185402E
      [2023-09-11 18:02:24.557323] [STDOUT] stdout: [        ] executing: script -t 0 /dev/null /opt/s/w/ir/x/w/recipe_cleanup/tmp53fs1szo/flutter sdk/bin/cache/artifacts/ios-deploy/ios-deploy --id 00008030-00144DA10185402E --bundle build/ios/iphoneos/Flutter Gallery.app --app_deltas build/ios/app-delta --uninstall --noinstall --debug --no-wifi --args --enable-dart-profiling --disable-vm-service-publication --enable-checked-mode --verify-entry-points
      [2023-09-11 18:02:24.578010] [STDOUT] stdout: [  +20 ms] [....] Waiting for iOS device to be connected
      [2023-09-11 18:02:24.712631] [STDOUT] stdout: [ +134 ms] [....] Using 00008030-00144DA10185402E (N104AP, iPhone 11, iphoneos, arm64e, 16.2, 20C65) a.k.a. 'iPhone 11'.
      [2023-09-11 18:02:24.712725] [STDOUT] stdout: [        ] ------ Uninstall phase ------
      [2023-09-11 18:02:24.818293] [STDOUT] stdout: [ +105 ms] [ OK ] Uninstalled package with bundle id io.flutter.examples.gallery
      [2023-09-11 18:02:24.906833] [STDOUT] stdout: [  +88 ms] ------ Debug phase ------
      [2023-09-11 18:02:24.906924] [STDOUT] stdout: [        ] Starting debug of 00008030-00144DA10185402E (N104AP, iPhone 11, iphoneos, arm64e, 16.2, 20C65) a.k.a. 'iPhone 11' connected through USB...
      [2023-09-11 18:02:25.285252] [STDOUT] stdout: [ +378 ms] [  0%] Looking up developer disk image
      [2023-09-11 18:02:25.529937] [STDOUT] stdout: [ +244 ms] [ 90%] Mounting developer disk image
      [2023-09-11 18:02:25.545261] [STDOUT] stdout: [  +15 ms] [ 95%] Developer disk image already mounted
      [2023-09-11 18:02:25.587923] [STDOUT] stdout: [  +42 ms] Detected path to iOS debug symbols: "Symbol Path: /Users/swarming/Library/Developer/Xcode/iOS DeviceSupport/16.2 (20C65) arm64e/Symbols"
      [2023-09-11 18:02:25.857177] [STDOUT] stdout: [ +269 ms] Script started, output file is /dev/null
      [2023-09-11 18:02:25.857259] [STDOUT] stdout: [        ] Script done, output file is /dev/null
      [2023-09-11 18:02:25.857511] [STDOUT] stdout: [        ] ios-deploy exited with code 0
      [2023-09-11 18:02:25.858066] [STDOUT] stderr: [        ] Could not run build/ios/iphoneos/Flutter Gallery.app on 00008030-00144DA10185402E.
      [2023-09-11 18:02:25.858130] [STDOUT] stderr: [        ] Try launching Xcode and selecting "Product > Run" to fix the problem:
      [2023-09-11 18:02:25.858214] [STDOUT] stderr: [        ]   open ios/Runner.xcworkspace
      [2023-09-11 18:02:25.858537] [STDOUT] stdout: [        ] Installing and launching... (completed in 52.4s)
      [2023-09-11 18:02:25.858956] [STDOUT] stderr: [        ] Error launching application on iPhone 11.
      ```
      abf8361a
  6. 13 Sep, 2023 1 commit
  7. 05 Sep, 2023 1 commit
  8. 14 Aug, 2023 1 commit
    • Victoria Ashworth's avatar
      Fix log filtering and CI tests for iOS 17 physical devices (#132491) · ec0b7443
      Victoria Ashworth authored
      Fixes a couple of issues introduced in new iOS 17 physical device tooling: https://github.com/flutter/flutter/pull/131865.
      
      1) Duplicate messages were being filtered out too aggressively. 
      
      For example, if on the counter app, you printed "Increment!" on button click, it would only print once no matter how many times you clicked.
      
      Sometimes more than one log source is used at a time and the original intention was to filter duplicates between two log sources, so it wouldn't print the same message from both logs. However, it would also filter when the same message was added more than once via the same log.
      
      The new solution distinguishes a "primary" and a "fallback" log source and prefers to use the primary source unless it's not working, in which it'll use the fallback. If the fallback is faster than the primary, the primary will exclude the logs received by the fallback in a 1-to-1 fashion to prevent too-aggressive filtering. Once a flutter-message has been received by the primary source, fallback messages will be ignored.
      
      Note: iOS < 17 did not regress.
      
      2) There was a race condition between the shutdown hooks and exiting XcodeDebug that was causing a crash when deleting a file that doesn't exist. This only affects CI  - for the new integration tests and when testing with iOS 17 physical devices.
      ec0b7443
  9. 09 Aug, 2023 1 commit
    • Victoria Ashworth's avatar
      New tooling for iOS 17 physical devices (#131865) · d631b262
      Victoria Ashworth authored
      This PR includes the following changes. These changes only apply to iOS 17 physical devices.
      
      | Command | Change Description  | Changes to User Experience |
      | ------------- | ------------- | ------------- |
      | `flutter run --release` | Uses `devicectl` to install and launch application in release mode.  | No change.  |
      | `flutter run`  | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
      | `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal.  |
      | `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app.  | No change.  |
      | `flutter screenshot` | Will return error.  | Will return error.  |
      
      Other changes include:
      * Using `devicectl` to get information about the device
      * Using `idevicesyslog` and Dart VM logging for device logs
      
      Note:
      Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.
      
      Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
      d631b262
  10. 20 Jun, 2023 1 commit
  11. 02 Jun, 2023 1 commit
  12. 22 May, 2023 1 commit
  13. 19 May, 2023 1 commit
  14. 16 May, 2023 1 commit
  15. 15 May, 2023 1 commit
  16. 04 May, 2023 1 commit
  17. 19 Apr, 2023 1 commit
  18. 04 Apr, 2023 1 commit
  19. 29 Mar, 2023 1 commit
  20. 15 Mar, 2023 1 commit
  21. 28 Feb, 2023 1 commit
  22. 27 Feb, 2023 2 commits
  23. 23 Feb, 2023 1 commit
  24. 17 Feb, 2023 1 commit
  25. 13 Feb, 2023 1 commit
  26. 20 Jan, 2023 1 commit
  27. 19 Jan, 2023 2 commits
    • Jenn Magder's avatar
      Revert "Support iOS wireless debugging (#118104)" (#118826) · cbf2e168
      Jenn Magder authored
      This reverts commit 5cd2d4c6.
      cbf2e168
    • Victoria Ashworth's avatar
      Support iOS wireless debugging (#118104) · 5cd2d4c6
      Victoria Ashworth authored
      * setup wireless debugging to use device IP
      
      * fix tests
      
      * fix unused var and missing annotation
      
      * remove unneeded try catch
      
      * remove commented out line, change null to package id
      
      * better way to get package id
      
      * update mDNS lookup to continously check for server, add messaging if takes too long to find observatory url, update flutter drive to enable publish-port if using network device
      
      * Refactor mDNS Discovery to poll for observatories and better handle multiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available
      
      * add and update comments, use logger spinner intead of timer in flutter attach, other small improvements
      
      * add newline to message so next log won't be on same line
      
      * fix install/waiting for permission status progress so it doens't double print the time it took.
      
      * only print backtrace if observatory times out on a physical usb connected device
      
      * fix test
      
      * Update related references from Observatory to Dart VM Service
      
      * fix test
      5cd2d4c6
  28. 15 Dec, 2022 1 commit
  29. 09 Nov, 2022 1 commit
    • Victoria Ashworth's avatar
      Add more supported simulator debugging options and improve tests (#114628) · 3a656b16
      Victoria Ashworth authored
      * add debugging options to simulator, test more debugging flags, add tests for other launch arguements
      
      * refactor iOS launch arguments to use one function for both simulator and physical devices
      
      * treat dart flags differently between physical and simulator
      
      * Simplify some flags between devices.
      
      Change --disable-service-auth-codes to not always be included for physical devices, only if disableServiceAuthCodes is true.
      Change --disable-observatory-publication to be used for simulator devices too.
      Change --enable-checked-mode & --verify-entry-points to be used if debuggingEnabled is true regardless of device type.
      Chnage --trace-startup to be used for simulator devices too.
      
      * fix ios release mode with buildable app startApp test
      
      * determine observatory-port from deviceVmServicePort and hostVmServicePort
      
      * add comments and remove hasObservatoryPort
      3a656b16
  30. 02 Sep, 2022 1 commit
  31. 03 Jun, 2022 1 commit
  32. 07 May, 2022 2 commits
  33. 27 Apr, 2022 1 commit
  34. 12 Apr, 2022 2 commits