Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios-deploy not validating #8

Closed
mmcc007 opened this issue Jun 4, 2019 · 22 comments
Closed

ios-deploy not validating #8

mmcc007 opened this issue Jun 4, 2019 · 22 comments
Labels
experimentation experiments with flutter and devices

Comments

@mmcc007
Copy link
Owner

mmcc007 commented Jun 4, 2019

On a macOS with an attached iOS device on Device Farms (via web interface) with an uploaded debug .app.

ios-deploy is not validating:

ios-deploy --bundle build/ios/Debug-iphoneos/Runner.app --no-wifi --justlaunch --args '--enable-dart-profiling --start-paused --enable-checked-mode --verify-entry-points'
ios-deploy --bundle build/ios/Debug-iphoneos/Runner.app --no-wifi --justlaunch --args '--enable-dart-profiling --start-paused --enable-checked-mode --verify-entry-points'
[....] Waiting for iOS device to be connected
[....] Using bb66dc1943570628375e82055b7770b33883dc73 (D22AP, D22AP, uknownos, unkarch) a.k.a. '9905944754'.
------ Install phase ------
[  0%] Found bb66dc1943570628375e82055b7770b33883dc73 (D22AP, D22AP, uknownos, unkarch) a.k.a. '9905944754' connected through USB, beginning install
[  5%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/META-INF/ to device
[  5%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/META-INF/com.apple.ZipMetadata.plist to device
[  5%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/_CodeSignature/ to device
[  6%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/_CodeSignature/CodeResources to device
[  6%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppFrameworkInfo.plist to device
[  6%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x.png to device
[  7%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x~ipad.png to device
[  7%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@3x.png to device
[  7%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20~ipad.png to device
[  8%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29.png to device
[  8%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x.png to device
[  8%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x~ipad.png to device
[  9%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@3x.png to device
[  9%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29~ipad.png to device
[ 10%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x.png to device
[ 10%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x~ipad.png to device
[ 10%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@3x.png to device
[ 11%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40~ipad.png to device
[ 11%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@2x.png to device
[ 11%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@3x.png to device
[ 12%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon76x76@2x~ipad.png to device
[ 12%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon76x76~ipad.png to device
[ 12%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/AppIcon83.5x83.5@2x~ipad.png to device
[ 13%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Assets.car to device
[ 13%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/ to device
[ 13%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/ to device
[ 14%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib to device
[ 14%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/Info.plist to device
[ 15%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib to device
[ 15%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/ to device
[ 15%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib to device
[ 16%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/Info.plist to device
[ 16%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib to device
[ 16%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Debug.xcconfig to device
[ 17%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/embedded.mobileprovision to device
[ 17%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/ to device
[ 17%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/ to device
[ 18%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/_CodeSignature/ to device
[ 18%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/_CodeSignature/CodeResources to device
[ 18%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/App to device
[ 19%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/ to device
[ 19%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/AssetManifest.json to device
[ 20%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/FontManifest.json to device
[ 20%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/fonts/ to device
[ 20%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/fonts/MaterialIcons-Regular.ttf to device
[ 21%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/isolate_snapshot_data to device
[ 22%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin to device
[ 27%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/LICENSE to device
[ 28%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/ to device
[ 28%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/ to device
[ 29%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/ to device
[ 29%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf to device
[ 29%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/vm_snapshot_data to device
[ 30%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/Info.plist to device
[ 30%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/ to device
[ 30%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/_CodeSignature/ to device
[ 31%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/_CodeSignature/CodeResources to device
[ 31%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/Flutter to device
[ 47%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/icudtl.dat to device
[ 48%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/Info.plist to device
[ 48%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Info.plist to device
[ 49%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/PkgInfo to device
[ 49%] Copying /private/tmp/scratchrBjb_g.scratch/test-packageX4pGG_/flutter_app/build/ios/Debug-iphoneos/Runner.app/Runner to device
[ 52%] CreatingStagingDirectory
[ 57%] ExtractingPackage
[ 60%] InspectingPackage
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] VerifyingApplication
2019-06-02 12:49:43.347 ios-deploy[544:5128] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)

Currently experimenting with installing provisioning profile and developer certificate, etc...

@tvolkert @aristeia

@mmcc007 mmcc007 added the experimentation experiments with flutter and devices label Jun 4, 2019
@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 6, 2019

Created an experimental project to test signing using Fastlane's match (Match is not a requirement for managing certificates and provisioning profiles, just a convenient way to experiment for now):
https://github.com/mmcc007/flutter_ios_build
Build on travis:
https://travis-ci.com/mmcc007/flutter_ios_build/builds/114622843

Will try to implement on Device Farm (manually via test_spec.yml). (Secure env variables can ultimately be passed via sylph -- securely? -- when automated. Though these variables will need to be declared 'locally' -- or securely on travis, etc... -- before starting a sylph run)

AFAIK there is no way to get around needing to register the Device Farm device with Apple Developer Account (barring access to Device Farm's Apple Developer Account, since there does not seem to be a secure way to do that via the API that would fit this use case. BTW: currently using public, not private devices). Looks like:
https://docs.fastlane.tools/actions/register_devices/
may have potential for automating registration of devices. So, unless there are alternatives on Device Farm, will probably be looking into auto-registering using register_devices Fastlane module.

BTW: if using some parts of Fastlane makes sense, Fastlane and a Fastfile, etc.., can be added automatically during a Sylph run by adding to Appium bundle and test_spec.yml without requiring to make changes to the original app project.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 6, 2019

I think I can output a testable app, packaged and signed as a .ipa.

If packaging the testable app as an .ipa works, we can upload it as a usual app (not as an auxiliary) and see if the flutter tools can find it. As I recall, I think I tried this and ran into some problems running flutter driver. If I can assume the testable app gets auto-resigned with Device Farm's enterprise cert, I will try running an integration test (again) and see what happens.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 7, 2019

I updated
https://github.com/mmcc007/flutter_ios_build
to publish on GitHub the .app (Runner.app) which was signed using my developer certificate:
https://github.com/mmcc007/flutter_ios_build/releases
This app of course will only run on my registered device(s) (I was able to get it started, using ios-deploy, but it shows a blank screen... will debug some more).

Even if I get Runner.app running on my device and then bundle it as a .ipa and then re-signed with Device Farm's enterprise certificate, it seems likely that a test will not run on the app on Device Farm. This is because flutter tools is expecting the app to be started in test mode. If there is a way to start an already installed app with arguments, I am currently not aware of it.

The most likely path forward at the moment is to explore the use of the register_devices Fastlane module. This would involve, while on a Device Farm macOS, downloading the developer's certificate and the app's provisioning profile (similar to flutter_ios_build), registering the currently attached device and running with the standard command:

flutter driver test_driver/main.dart

Other paths forward do not seem that straightforward:

  1. Extend the Device Farm API to allow starting an app with arguments.
    This would involve uploading the .ipa (or possibly .app) and related start-up arguments.
    flutter tools would then need to be modified to somehow find the observatory and connect directly. Finding the observatory would involve reviewing the history of the logs from the time the app was started.

  2. Extend the Device Farm API to allow downloading the re-signed app.
    The app is uploaded, resigned with the enterprise cert. Then, while on the macOS an API call can be made to download the resigned app, install it on the device with the start-up args and run the test.
    The API call could be restricted to Device Farm macOS's as a security precaution if necessary. flutter tools would need to be modified to install the app without attempting to rebuild (there is a new '--no-build' option, but may not be sufficient in current form).

  3. Do a design review of both Device Farm API and flutter tools .
    Establish the requirements and make the necessary changes to both Device Farm API and flutter tools.

  4. Other paths I'm not aware of?

For now I will continue down the register_devices path which should not require any changes to the Device Farm API or flutter tools. This path assumes that there are no unexpected restrictions on the macOS and the currently attached device (I'm assuming a macOS environment similar to the one provided by Travis-CI and standard access to the attached device -- no port restrictions, etc...).

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 8, 2019

Was able to download developer signing cert and provisioning profile using fastlane's match on a device farm mac, but am having problems managing the keychain (though keychain management is working locally and on travis).

I also did a quick test of fastlane's support for auto-registering devices and it seems to be working (on a local mac). I expect this should work on the device farm mac using the attached iOS device.

So it looks like getting flutter tests to run on device farm is pretty close (at least this way).

If I can resolve the keychain issue on device farm mac, and some similar minor blockers related to logging in to apple developer account, I expect to be able to run

flutter driver test_driver/main.dart

which should install the .app on the device and run the test (barring any possible currently unknown device farm mac issues).

BTW: credentials are auto-extracted from the local environment and reproduced in the device farm mac (similarly to travis).

The signing certificate and provisioning profiles are installed correctly. The problem is adding the new keychain to the keychain search path so that

security find-identity -p codesigning -v

can find it. flutter tools expects to find the signing cert in the keychain path.

The command I am using to add the keychain to the keychain path is:

security list-keychains -s `security list-keychains | xargs` ~/Library/Keychains/fastlane_tmp_keychain-db

This works locally, but not on a device farm mac (may be a permissions problem that may require the device farm team to modify the device farm mac permissions for keychains).

The following log shows the current problem with keychain (logging into apple developer account was not tested in this run). Any suggestions would be appreciated.

device farm log
[DEVICEFARM] Setting up your device. This usually takes 2-3 minutes.
[DEVICEFARM] ########### Start executing testspec ###########
 
 
[DEVICEFARM] ########### Entering phase install ###########
 
 
[DEVICEFARM] ########### Entering phase pre_test ###########
 
[DeviceFarm] SECURE_ENV="script/secure.env"
[DeviceFarm] cd flutter_app
[DeviceFarm] ls -la
total 104
drwxrwxrwx  19 rwx  wheel   646 Jun  7 23:42 .
drwxrwxrwx  13 rwx  wheel   442 Jun  7 23:42 ..
-rwxrwxrwx   1 rwx  wheel  6148 Jun  7 23:42 .DS_Store
-rwxrwxrwx   1 rwx  wheel  1288 Jun  7 23:42 .gitignore
drwxrwxrwx   6 rwx  wheel   204 Jun  7 23:42 .idea
-rwxrwxrwx   1 rwx  wheel   305 Jun  7 23:42 .metadata
-rwxrwxrwx   1 rwx  wheel  5474 Jun  7 23:42 .packages
-rwxrwxrwx   1 rwx  wheel   536 Jun  7 23:42 README.md
drwxrwxrwx  12 rwx  wheel   408 Jun  7 23:42 android
drwxrwxrwx   4 rwx  wheel   136 Jun  7 23:42 dummy_ssh_keys
-rwxrwxrwx   1 rwx  wheel   896 Jun  7 23:42 example.iml
drwxrwxrwx  12 rwx  wheel   408 Jun  7 23:42 ios
drwxrwxrwx   3 rwx  wheel   102 Jun  7 23:42 lib
-rwxrwxrwx   1 rwx  wheel  9525 Jun  7 23:42 pubspec.lock
-rwxrwxrwx   1 rwx  wheel  2714 Jun  7 23:42 pubspec.yaml
drwxrwxrwx   5 rwx  wheel   170 Jun  7 23:42 script
-rwxrwxrwx   1 rwx  wheel   932 Jun  7 23:42 sylph.yaml
drwxrwxrwx   3 rwx  wheel   102 Jun  7 23:42 test
drwxrwxrwx   5 rwx  wheel   170 Jun  7 23:42 test_driver
[DeviceFarm] source $SECURE_ENV

[DeviceFarm] ls -la ~/Library/Keychains
total 0
drwx--x--x  17 device-farm  staff  578 Jun  5 14:32 .
drwxrwxrwx+ 29 device-farm  staff  986 Oct 16  2018 ..
drwx------   2 device-farm  staff   68 Aug  9  2018 182E179C-7274-43C6-BE9F-1575325CF328
drwx------   2 device-farm  staff   68 Aug 21  2018 2134DFDC-D687-4D85-BA0C-7796AB4E014F
drwx------   6 device-farm  staff  204 Oct 16  2018 21805156-1120-4BF1-BEEC-09C6F8814903
drwx------   2 device-farm  staff   68 Oct 19  2018 27027A77-4643-4E01-9C23-23CB7C31459B
drwx------   5 device-farm  staff  170 Jul 20  2017 6E4FC44F-E0C5-4E66-BC09-05D74846745B
drwx------   2 device-farm  staff   68 May 31 22:16 7AD71B74-E3FD-48CD-85E8-89F4B35A54A0
drwx------   2 device-farm  staff   68 Oct 30  2018 89213970-AE85-4AC2-8B04-1D57789EBC10
drwx------   2 device-farm  staff   68 Aug 28  2018 909C63AE-34BB-4B83-8BD7-4D83C14D13EB
drwx------   2 device-farm  staff   68 Apr 17  2018 A8F2C975-0A84-49B8-BE0D-9F836F10654C
drwx------   2 device-farm  staff   68 Jun  4 14:53 A997712B-F2E3-47D3-B9F2-16B651D8123F
drwx------   2 device-farm  staff   68 Apr 13  2018 AE1BD4A7-0C74-4158-8D5D-C130C24735E6
drwx------   2 device-farm  staff   68 Jun  5 14:32 BCED9C0B-6163-4A77-9401-B774BFA85C3B
drwx------   5 device-farm  staff  170 Dec 12  2017 D5AA7805-3D79-460A-9D9B-0999DC2B455C
drwx------   2 device-farm  staff   68 Aug 29  2018 D8819C8C-F899-4B99-8FDD-97562C9CE927
drwx------   5 device-farm  staff  170 Dec 13  2017 DEF5B270-6DE6-48C2-9820-2CAF7F16AE2C
[DeviceFarm] ./script/test_ios.sh --certs
[DeviceFarm] ls -la ~/Library/Keychains
total 40
drwx--x--x  20 device-farm  staff    680 Jun  7 23:43 .
drwxrwxrwx+ 29 device-farm  staff    986 Oct 16  2018 ..
-r--r--r--   1 device-farm  staff      0 Jun  7 23:43 .fl34AC2A0A
drwx------   2 device-farm  staff     68 Aug  9  2018 182E179C-7274-43C6-BE9F-1575325CF328
drwx------   2 device-farm  staff     68 Aug 21  2018 2134DFDC-D687-4D85-BA0C-7796AB4E014F
drwx------   6 device-farm  staff    204 Oct 16  2018 21805156-1120-4BF1-BEEC-09C6F8814903
drwx------   2 device-farm  staff     68 Oct 19  2018 27027A77-4643-4E01-9C23-23CB7C31459B
drwx------   5 device-farm  staff    170 Jul 20  2017 6E4FC44F-E0C5-4E66-BC09-05D74846745B
drwx------   2 device-farm  staff     68 May 31 22:16 7AD71B74-E3FD-48CD-85E8-89F4B35A54A0
drwx------   2 device-farm  staff     68 Oct 30  2018 89213970-AE85-4AC2-8B04-1D57789EBC10
drwx------   2 device-farm  staff     68 Aug 28  2018 909C63AE-34BB-4B83-8BD7-4D83C14D13EB
drwx------   2 device-farm  staff     68 Apr 17  2018 A8F2C975-0A84-49B8-BE0D-9F836F10654C
drwx------   2 device-farm  staff     68 Jun  4 14:53 A997712B-F2E3-47D3-B9F2-16B651D8123F
drwx------   2 device-farm  staff     68 Apr 13  2018 AE1BD4A7-0C74-4158-8D5D-C130C24735E6
drwx------   2 device-farm  staff     68 Jun  5 14:32 BCED9C0B-6163-4A77-9401-B774BFA85C3B
drwx------   3 device-farm  staff    102 Jun  7 23:43 C827BE81-69E2-4DFD-804A-E3E3D55AA37C
drwx------   5 device-farm  staff    170 Dec 12  2017 D5AA7805-3D79-460A-9D9B-0999DC2B455C
drwx------   2 device-farm  staff     68 Aug 29  2018 D8819C8C-F899-4B99-8FDD-97562C9CE927
drwx------   5 device-farm  staff    170 Dec 13  2017 DEF5B270-6DE6-48C2-9820-2CAF7F16AE2C
-rw-r--r--   1 device-farm  staff  20460 Jun  7 23:43 login.keychain-db
[DeviceFarm] ls -la ~/.ssh
total 16
drwxr-xr-x   5 device-farm  staff   170 Jun  7 23:43 .
drwxr-xr-x+ 32 device-farm  staff  1088 Dec 12 13:01 ..
-rw-r--r--   1 device-farm  staff     0 Dec 13  2017 authorized_keys
-rw-r--r--   1 device-farm  staff   146 Jun  7 23:43 config
-rw-r--r--   1 device-farm  staff   179 Jun  7 23:43 known_hosts
[DeviceFarm] cat ~/.ssh/config
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/dummy_ssh_keys/key
[DeviceFarm] cat ~/.ssh/known_hosts
[**********]:**** ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBfCNXyNwpyyTxkMNywzBY6MGj+2qGKeoRqnHOGP9glNOiaqhnrS/7N5HMnL6i9Vw8sA7CHhV2p/NzMI+Cuv7IE=
[DeviceFarm] ruby -version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)
[DeviceFarm] gem --version
2.7.7
[DeviceFarm] export LC_ALL=en_US.UTF-8
[DeviceFarm] export LANG=en_US.UTF-8
[DeviceFarm] gem install bundler:2.0.1
/Users/device-farm/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/gem-wrappers-1.4.0/lib/gem-wrappers/installer.rb:56: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Installing ri documentation for bundler-2.0.1
Done installing documentation for bundler after 18 seconds
1 gem installed
[DeviceFarm] cd ios
[DeviceFarm] bundle install
No entry for terminal type "unknown";
using dumb terminal settings.
Fetching gem metadata from https://rubygems.org/..........
Fetching CFPropertyList 3.0.0
Installing CFPropertyList 3.0.0
Fetching public_suffix 2.0.5
Installing public_suffix 2.0.5
Fetching addressable 2.6.0
Installing addressable 2.6.0
Fetching atomos 0.1.3
Installing atomos 0.1.3
Fetching babosa 1.0.2
Installing babosa 1.0.2
Using bundler 2.0.1
Fetching claide 1.0.2
Installing claide 1.0.2
Fetching colored 1.2
Installing colored 1.2
Fetching colored2 3.1.2
Installing colored2 3.1.2
Fetching highline 1.7.10
Installing highline 1.7.10
Fetching commander-fastlane 4.4.6
Installing commander-fastlane 4.4.6
Fetching declarative 0.0.10
Installing declarative 0.0.10
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching digest-crc 0.4.1
Installing digest-crc 0.4.1
Fetching unf_ext 0.0.7.6
Installing unf_ext 0.0.7.6 with native extensions
Fetching unf 0.1.4
Installing unf 0.1.4
Fetching domain_name 0.5.20180417
Installing domain_name 0.5.20180417
Fetching dotenv 2.7.2
Installing dotenv 2.7.2
Fetching emoji_regex 1.0.1
Installing emoji_regex 1.0.1
Fetching excon 0.64.0
Installing excon 0.64.0
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching faraday 0.15.4
Installing faraday 0.15.4
Fetching http-cookie 1.0.3
Installing http-cookie 1.0.3
Fetching faraday-cookie_jar 0.0.6
Installing faraday-cookie_jar 0.0.6
Fetching faraday_middleware 0.13.1
Installing faraday_middleware 0.13.1
Fetching fastimage 2.1.5
Installing fastimage 2.1.5
Fetching gh_inspector 1.1.3
Installing gh_inspector 1.1.3
Fetching jwt 2.1.0
Installing jwt 2.1.0
Fetching memoist 0.16.0
Installing memoist 0.16.0
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching os 1.0.1
Installing os 1.0.1
Fetching signet 0.11.0
Installing signet 0.11.0
Fetching googleauth 0.6.7
Installing googleauth 0.6.7
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mime-types-data 3.2019.0331
Installing mime-types-data 3.2019.0331
Fetching mime-types 3.2.2
Installing mime-types 3.2.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching google-api-client 0.23.9
Installing google-api-client 0.23.9
Fetching google-cloud-env 1.0.5
Installing google-cloud-env 1.0.5
Fetching google-cloud-core 1.3.0
Installing google-cloud-core 1.3.0
Fetching google-cloud-storage 1.16.0
Installing google-cloud-storage 1.16.0
Fetching json 2.2.0
Installing json 2.2.0 with native extensions
Fetching mini_magick 4.5.1
Installing mini_magick 4.5.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching plist 3.5.0
Installing plist 3.5.0
Fetching rubyzip 1.2.3
Installing rubyzip 1.2.3
Fetching security 0.1.3
Installing security 0.1.3
Fetching naturally 2.2.0
Installing naturally 2.2.0
Fetching simctl 1.6.5
Installing simctl 1.6.5
Fetching slack-notifier 2.3.2
Installing slack-notifier 2.3.2
Fetching terminal-notifier 2.0.0
Installing terminal-notifier 2.0.0
Fetching unicode-display_width 1.6.0
Installing unicode-display_width 1.6.0
Fetching terminal-table 1.8.0
Installing terminal-table 1.8.0
Fetching tty-screen 0.7.0
Installing tty-screen 0.7.0
Fetching tty-cursor 0.7.0
Installing tty-cursor 0.7.0
Fetching tty-spinner 0.9.1
Installing tty-spinner 0.9.1
Fetching word_wrap 1.0.0
Installing word_wrap 1.0.0
Fetching nanaimo 0.2.6
Installing nanaimo 0.2.6
Fetching xcodeproj 1.9.0
Installing xcodeproj 1.9.0
Fetching rouge 2.0.7
Installing rouge 2.0.7
Fetching xcpretty 0.3.0
Installing xcpretty 0.3.0
Fetching xcpretty-travis-formatter 1.0.0
Installing xcpretty-travis-formatter 1.0.0
Fetching fastlane 2.125.2
Installing fastlane 2.125.2
Bundle complete! 1 Gemfile dependency, 65 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
[DeviceFarm] fastlane --verbose run setup_travis force:true
DEBUG [2019-06-07 23:45:02.41]: Checking if there are any plugins that should be loaded...
�[33mSuccessfully loaded Appfile at path '/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/fastlane/Appfile'�[0m
- �[36mapp_identifier�[0m: '�[32mcom.orbsoft.counter�[0m'
- �[36mapple_id�[0m: '�[32mmmcc007@gmail.com�[0m'
- �[36mitc_team_id�[0m: '�[32m118607454�[0m'
- �[36mteam_id�[0m: '�[32mET2VMHJPVM�[0m'
-------
INFO [2019-06-07 23:45:02.69]: Sending anonymous analytics information
INFO [2019-06-07 23:45:02.69]: Learn more at https://docs.fastlane.tools/#metrics
INFO [2019-06-07 23:45:02.69]: No personal or sensitive data is sent.
INFO [2019-06-07 23:45:02.69]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
DEBUG [2019-06-07 23:45:02.71]: Using force: true
INFO [2019-06-07 23:45:02.72]: �[32m--------------------------�[0m
INFO [2019-06-07 23:45:02.72]: �[32m--- Step: setup_travis ---�[0m
INFO [2019-06-07 23:45:02.72]: �[32m--------------------------�[0m
INFO [2019-06-07 23:45:02.72]: Creating temporary keychain: "fastlane_tmp_keychain".
INFO [2019-06-07 23:45:02.96]: Enabling match readonly mode.
INFO [2019-06-07 23:45:02.96]: �[32mResult: true�[0m
[DeviceFarm] ls -la ~/Library/Keychains
total 80
drwx--x--x  22 device-farm  staff    748 Jun  7 23:45 .
drwxrwxrwx+ 29 device-farm  staff    986 Oct 16  2018 ..
-r--r--r--   1 device-farm  staff      0 Jun  7 23:43 .fl34AC2A0A
-r--r--r--   1 device-farm  staff      0 Jun  7 23:45 .flD723CBD3
drwx------   2 device-farm  staff     68 Aug  9  2018 182E179C-7274-43C6-BE9F-1575325CF328
drwx------   2 device-farm  staff     68 Aug 21  2018 2134DFDC-D687-4D85-BA0C-7796AB4E014F
drwx------   6 device-farm  staff    204 Oct 16  2018 21805156-1120-4BF1-BEEC-09C6F8814903
drwx------   2 device-farm  staff     68 Oct 19  2018 27027A77-4643-4E01-9C23-23CB7C31459B
drwx------   5 device-farm  staff    170 Jul 20  2017 6E4FC44F-E0C5-4E66-BC09-05D74846745B
drwx------   2 device-farm  staff     68 May 31 22:16 7AD71B74-E3FD-48CD-85E8-89F4B35A54A0
drwx------   2 device-farm  staff     68 Oct 30  2018 89213970-AE85-4AC2-8B04-1D57789EBC10
drwx------   2 device-farm  staff     68 Aug 28  2018 909C63AE-34BB-4B83-8BD7-4D83C14D13EB
drwx------   2 device-farm  staff     68 Apr 17  2018 A8F2C975-0A84-49B8-BE0D-9F836F10654C
drwx------   2 device-farm  staff     68 Jun  4 14:53 A997712B-F2E3-47D3-B9F2-16B651D8123F
drwx------   2 device-farm  staff     68 Apr 13  2018 AE1BD4A7-0C74-4158-8D5D-C130C24735E6
drwx------   2 device-farm  staff     68 Jun  5 14:32 BCED9C0B-6163-4A77-9401-B774BFA85C3B
drwx------   3 device-farm  staff    102 Jun  7 23:43 C827BE81-69E2-4DFD-804A-E3E3D55AA37C
drwx------   5 device-farm  staff    170 Dec 12  2017 D5AA7805-3D79-460A-9D9B-0999DC2B455C
drwx------   2 device-farm  staff     68 Aug 29  2018 D8819C8C-F899-4B99-8FDD-97562C9CE927
drwx------   5 device-farm  staff    170 Dec 13  2017 DEF5B270-6DE6-48C2-9820-2CAF7F16AE2C
-rw-r--r--   1 device-farm  staff  20460 Jun  7 23:45 fastlane_tmp_keychain-db
-rw-r--r--   1 device-farm  staff  20460 Jun  7 23:43 login.keychain-db
[DeviceFarm] fastlane --verbose enable_match_code_signing
DEBUG [2019-06-07 23:45:07.07]: Checking if there are any plugins that should be loaded...
�[33mSuccessfully loaded Appfile at path '/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/fastlane/Appfile'�[0m
- �[36mapp_identifier�[0m: '�[32mcom.orbsoft.counter�[0m'
- �[36mapple_id�[0m: '�[32mmmcc007@gmail.com�[0m'
- �[36mitc_team_id�[0m: '�[32m118607454�[0m'
- �[36mteam_id�[0m: '�[32mET2VMHJPVM�[0m'
-------
INFO [2019-06-07 23:45:07.36]: �[32m---------------------------�[0m
INFO [2019-06-07 23:45:07.36]: �[32m--- Step: opt_out_usage ---�[0m
INFO [2019-06-07 23:45:07.36]: �[32m---------------------------�[0m
INFO [2019-06-07 23:45:07.36]: Disabled upload of used actions
INFO [2019-06-07 23:45:07.36]: �[32m------------------------------�[0m
INFO [2019-06-07 23:45:07.36]: �[32m--- Step: default_platform ---�[0m
INFO [2019-06-07 23:45:07.36]: �[32m------------------------------�[0m
INFO [2019-06-07 23:45:07.36]: �[32m--------------------------�[0m
INFO [2019-06-07 23:45:07.36]: �[32m--- Step: setup_travis ---�[0m
INFO [2019-06-07 23:45:07.36]: �[32m--------------------------�[0m
INFO [2019-06-07 23:45:07.36]: Not running on CI, skipping CI setup
INFO [2019-06-07 23:45:07.36]: �[32mDriving the lane 'ios enable_match_code_signing' 🚀�[0m
INFO [2019-06-07 23:45:07.36]: Retrieving signing certificates and profiles...
INFO [2019-06-07 23:45:07.37]: �[32m-------------------------------�[0m
INFO [2019-06-07 23:45:07.37]: �[32m--- Step: sync_code_signing ---�[0m
INFO [2019-06-07 23:45:07.37]: �[32m-------------------------------�[0m

+-----------------------+--------------------------------------+
|                  �[32mSummary for match 2.125.2�[0m                   |
+-----------------------+--------------------------------------+
| git_url               | ssh://git@***:***/***/c  |
|                       | ertificates.git                      |
| type                  | development                          |
| keychain_name         | fastlane_tmp_keychain                |
| readonly              | true                                 |
| app_identifier        | ["com.orbsoft.counter"]              |
| username              | mmcc007@gmail.com                    |
| team_id               | ET2VMHJPVM                           |
| storage_mode          | git                                  |
| git_branch            | master                               |
| shallow_clone         | false                                |
| clone_branch_directly | false                                |
| force                 | false                                |
| force_for_new_devices | false                                |
| skip_confirmation     | false                                |
| skip_docs             | false                                |
| platform              | ios                                  |
| verbose               | false                                |
+-----------------------+--------------------------------------+

INFO [2019-06-07 23:45:07.98]: Cloning remote git repo...
INFO [2019-06-07 23:45:07.98]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
INFO [2019-06-07 23:45:07.98]: �[36m$ git clone ssh://git@***:***/***/certificates.git /var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/T/d20190607-800-1ls22nx�[0m
INFO [2019-06-07 23:45:09.61]: ▸ �[35mCloning into '/var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/T/d20190607-800-1ls22nx'...�[0m
INFO [2019-06-07 23:45:10.83]: ▸ �[35mremote: Counting objects: 518, done.�[K�[0m
INFO [2019-06-07 23:45:10.86]: ▸ �[35mremote: Compressing objects: 100% (80/80), done.�[K�[0m
INFO [2019-06-07 23:45:11.08]: ▸ �[35mremote: Total 518 (delta 11), reused 77 (delta 10)�[K�[0m
INFO [2019-06-07 23:45:11.08]: ▸ �[35mReceiving objects: 100% (518/518), 779.88 KiB | 3.36 MiB/s, done.�[0m
INFO [2019-06-07 23:45:11.08]: ▸ �[35mResolving deltas: 100% (63/63), done.�[0m
INFO [2019-06-07 23:45:11.20]: �[32m🔓  Decrypted 'DHQL5N9336.cer'�[0m
INFO [2019-06-07 23:45:11.20]: �[32m🔓  Decrypted 'LX725C4C6R.cer'�[0m
INFO [2019-06-07 23:45:11.21]: �[32m🔓  Decrypted 'DHQL5N9336.p12'�[0m
INFO [2019-06-07 23:45:11.21]: �[32m🔓  Decrypted 'LX725C4C6R.p12'�[0m
INFO [2019-06-07 23:45:11.21]: �[32m🔓  Decrypted 'AppStore_com.orbsoft.counter.mobileprovision'�[0m
INFO [2019-06-07 23:45:11.21]: �[32m🔓  Decrypted 'Development_com.orbsoft.counter.mobileprovision'�[0m
INFO [2019-06-07 23:45:11.21]: �[32m🔓  Successfully decrypted certificates repo�[0m
DEBUG [2019-06-07 23:45:11.21]: Your certificate 'DHQL5N9336.cer' is valid
INFO [2019-06-07 23:45:11.21]: Installing certificate...
INFO [2019-06-07 23:45:11.21]: �[36m$ security list-keychains -d user�[0m
INFO [2019-06-07 23:45:11.24]: ▸ �[35m    "/Library/Keychains/System.keychain"�[0m
INFO [2019-06-07 23:45:11.24]: �[36m$ security find-certificate -c 'Apple Worldwide Developer Relations Certification Authority' /Library/Keychains/System.keychain�[0m
INFO [2019-06-07 23:45:11.29]: ▸ �[35mkeychain: "/Library/Keychains/System.keychain"�[0m
INFO [2019-06-07 23:45:11.29]: ▸ �[35mversion: 256�[0m
INFO [2019-06-07 23:45:11.29]: ▸ �[35mclass: 0x80001000 �[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35mattributes:�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "alis"<blob>="Apple Worldwide Developer Relations Certification Authority"�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "cenc"<uint32>=0x00000003 �[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "ctyp"<uint32>=0x00000001 �[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "hpky"<blob>=0x88271709A9B618608BECEBBAF64759C55254A3B7  "\210'\027\011\251\266\030`\213\354\353\272\366GY\305RT\243\267"�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "issu"<blob>=0x3062310B300906035504061302555331133011060355040A130A4150504C4520494E432E31263024060355040B131D4150504C452043455254494649434154494F4E20415554484F52495459311630140603550403130D4150504C4520524F4F54204341  "0b1\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\012\023\012APPLE INC.1&0$\006\003U\004\013\023\035APPLE CERTIFICATION AUTHORITY1\0260\024\006\003U\004\003\023\015APPLE ROOT CA"�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "labl"<blob>="Apple Worldwide Developer Relations Certification Authority"�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "skid"<blob>=0x88271709A9B618608BECEBBAF64759C55254A3B7  "\210'\027\011\251\266\030`\213\354\353\272\366GY\305RT\243\267"�[0m
INFO [2019-06-07 23:45:11.31]: ▸ �[35m    "snbr"<blob>=0x01DEBCC4396DA010  "\001\336\274\3049m\240\020"�[0m
INFO [2019-06-07 23:45:11.32]: ▸ �[35m    "subj"<blob>=0x308196310B300906035504061302555331133011060355040A0C0A4170706C6520496E632E312C302A060355040B0C234170706C6520576F726C647769646520446576656C6F7065722052656C6174696F6E733144304206035504030C3B4170706C6520576F726C647769646520446576656C6F7065722052656C6174696F6E732043657274696669636174696F6E20417574686F72697479  "0\201\2261\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\012\014\012Apple Inc.1,0*\006\003U\004\013\014#Apple Worldwide Developer Relations1D0B\006\003U\004\003\014;Apple Worldwide Developer Relations Certification Authority"�[0m
ERROR [2019-06-07 23:45:11.36]: �[31mThere are no local code signing identities found.
You can run `security find-identity -v -p codesigning fastlane_tmp_keychain` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)�[0m
INFO [2019-06-07 23:45:11.36]: �[36m$ security import /var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/T/d20190607-800-1ls22nx/certs/development/DHQL5N9336.cer -k '/Users/device-farm/Library/Keychains/fastlane_tmp_keychain-db' -P '' -T /usr/bin/codesign -T /usr/bin/security�[0m
INFO [2019-06-07 23:45:11.45]: ▸ �[35m1 certificate imported.�[0m
INFO [2019-06-07 23:45:11.48]: �[36m$ security set-key-partition-list -S apple-tool:,apple: -k '' /Users/device-farm/Library/Keychains/fastlane_tmp_keychain-db 1> /dev/null�[0m
ERROR [2019-06-07 23:45:11.58]: �[31msecurity: SecItemCopyMatching: The specified item could not be found in the keychain.�[0m
INFO [2019-06-07 23:45:11.58]: �[36m$ security import /var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/T/d20190607-800-1ls22nx/certs/development/DHQL5N9336.p12 -k '/Users/device-farm/Library/Keychains/fastlane_tmp_keychain-db' -P '' -T /usr/bin/codesign -T /usr/bin/security�[0m
INFO [2019-06-07 23:45:11.93]: ▸ �[35m1 key imported.�[0m
INFO [2019-06-07 23:45:11.95]: �[36m$ security set-key-partition-list -S apple-tool:,apple: -k '' /Users/device-farm/Library/Keychains/fastlane_tmp_keychain-db 1> /dev/null�[0m

+-------------------+-----------------------------------------------+
|                       �[32mInstalled Certificate�[0m                       |
+-------------------+-----------------------------------------------+
| User ID           | **********                                    |
| Common Name       | iPhone Developer: Maurice McCabe (5UG6C3962Q) |
| Organisation Unit | ET2VMHJPVM                                    |
| Organisation      | Maurice McCabe                                |
| Country           | US                                            |
| Start Datetime    | 2018-12-29 04:35:40 UTC                       |
| End Datetime      | 2019-12-29 04:35:40 UTC                       |
+-------------------+-----------------------------------------------+

INFO [2019-06-07 23:45:12.01]: Installing provisioning profile...
WARN [2019-06-07 23:45:12.26]: �[33mSetting environment variable 'sigh_com.orbsoft.counter_development' to '408fa202-3212-469d-916c-c7f2ae4d083a'�[0m
WARN [2019-06-07 23:45:12.26]: �[33mSetting environment variable 'sigh_com.orbsoft.counter_development_team-id' to 'ET2VMHJPVM'�[0m
WARN [2019-06-07 23:45:12.26]: �[33mSetting environment variable 'sigh_com.orbsoft.counter_development_profile-name' to 'match Development com.orbsoft.counter'�[0m
WARN [2019-06-07 23:45:12.26]: �[33mSetting environment variable 'sigh_com.orbsoft.counter_development_profile-path' to '/Users/device-farm/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'�[0m

+---------------------+------------------------+------------------------+
|                    �[32mInstalled Provisioning Profile�[0m                     |
+---------------------+------------------------+------------------------+
| Parameter           | Environment Variable   | Value                  |
+---------------------+------------------------+------------------------+
| App Identifier      |                        | com.orbsoft.counter    |
| Type                |                        | development            |
| Platform            |                        | ios                    |
| Profile UUID        | sigh_com.orbsoft.coun  | 408fa202-3212-469d-91  |
|                     | ter_development        | 6c-c7f2ae4d083a        |
| Profile Name        | sigh_com.orbsoft.coun  | match Development      |
|                     | ter_development_profi  | com.orbsoft.counter    |
|                     | le-name                |                        |
| Profile Path        | sigh_com.orbsoft.coun  | /Users/device-farm/Li  |
|                     | ter_development_profi  | brary/MobileDevice/Pr  |
|                     | le-path                | ovisioning             |
|                     |                        | Profiles/408fa202-321  |
|                     |                        | 2-469d-916c-c7f2ae4d0  |
|                     |                        | 83a.mobileprovision    |
| Development Team ID | sigh_com.orbsoft.coun  | ET2VMHJPVM             |
|                     | ter_development_team-  |                        |
|                     | id                     |                        |
+---------------------+------------------------+------------------------+

INFO [2019-06-07 23:45:12.27]: �[32m�[32mAll required keys, certificates and provisioning profiles are installed 🙌�[0m
INFO [2019-06-07 23:45:12.28]: Setting Provisioning Profile type to 'development'
INFO [2019-06-07 23:45:12.28]: Certificates and profiles installed
INFO [2019-06-07 23:45:12.28]: app_identifier: com.orbsoft.counter
INFO [2019-06-07 23:45:12.28]: �[32m-----------------------------------------�[0m
INFO [2019-06-07 23:45:12.28]: �[32m--- Step: update_project_provisioning ---�[0m
INFO [2019-06-07 23:45:12.28]: �[32m-----------------------------------------�[0m
INFO [2019-06-07 23:45:12.29]: You’re updating provisioning profiles directly in your project, but have you considered easier ways to do code signing?
INFO [2019-06-07 23:45:12.29]: https://docs.fastlane.tools/codesigning/GettingStarted/
INFO [2019-06-07 23:45:12.29]: Downloading root certificate from (https://www.apple.com/appleca/AppleIncRootCertificate.cer) to path '/tmp/AppleIncRootCertificate.cer'
INFO [2019-06-07 23:45:12.47]: Parsing mobile provisioning profile from '/Users/device-farm/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'
INFO [2019-06-07 23:45:12.47]: �[32mGoing to update project 'Runner.xcodeproj' with UUID�[0m
INFO [2019-06-07 23:45:12.57]: �[32mUpdating target Runner...�[0m
INFO [2019-06-07 23:45:12.57]: �[32mUpdating configuration Debug...�[0m
WARN [2019-06-07 23:45:12.57]: �[33mSkipping configuration Release as it doesn't match the filter 'Debug'�[0m
WARN [2019-06-07 23:45:12.57]: �[33mSkipping configuration Profile as it doesn't match the filter 'Debug'�[0m
INFO [2019-06-07 23:45:12.60]: �[32mSuccessfully updated project settings in 'Runner.xcodeproj'�[0m
INFO [2019-06-07 23:45:12.60]: �[32mSuccessfully generated documentation at path '/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/fastlane/README.md'�[0m

+------+------------------------+-------------+
|              �[32mfastlane summary�[0m               |
+------+------------------------+-------------+
| Step | Action                 | Time (in s) |
+------+------------------------+-------------+
| 1    | opt_out_usage          | 0           |
| 2    | default_platform       | 0           |
| 3    | setup_travis           | 0           |
| 4    | sync_code_signing      | 4           |
| 5    | update_project_provis  | 0           |
|      | ioning                 |             |
+------+------------------------+-------------+

INFO [2019-06-07 23:45:12.61]: �[32mfastlane.tools finished successfully 🎉�[0m
[DeviceFarm] ls -la ~/Library/MobileDevice/Provisioning\ Profiles
total 16
drwxr-xr-x  3 device-farm  staff   102 Jun  7 23:45 .
drwxr-xr-x  3 device-farm  staff   102 Jun  7 23:45 ..
-rw-r--r--  1 device-farm  staff  7674 Jun  7 23:45 408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
[DeviceFarm] security list-keychains -d user
    "/Library/Keychains/System.keychain"
[DeviceFarm] security list-keychains -s `security list-keychains | xargs` ~/Library/Keychains/fastlane_tmp_keychain-db
[DeviceFarm] security default-keychain -s fastlane_tmp_keychain
[DeviceFarm] security list-keychains -d user
    "/Library/Keychains/System.keychain"
[DeviceFarm] security find-identity -v -p codesigning
     0 valid identities found
[DeviceFarm] security find-identity -v -p codesigning login.keychain
     0 valid identities found
[DeviceFarm] security find-identity -v -p codesigning fastlane_tmp_keychain
  1) 2162B67C3108B757367A42245FB6B4A4246ECBEF "iPhone Developer: Maurice McCabe (5UG6C3962Q)"
     1 valid identities found
[DeviceFarm] cd ../..
[DeviceFarm] echo "Install flutter"
Install flutter
[DeviceFarm] FLUTTER_VERSION=v1.5.4-hotfix.2-stable
[DeviceFarm] if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = "Android" ]; then
    # Run EC2 setup code here
    curl https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_$FLUTTER_VERSION.tar.xz -o flutter_linux.tar.xz
    tar xf flutter_linux.tar.xz
fi
if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = "iOS" ]; then
    # Run Mac setup code here
    # Install Flutter dependencies
    # brew upgrade ios-deploy
    # brew install cocoapods
    # pod setup
    # Install Flutter
    curl https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_$FLUTTER_VERSION.zip -o flutter_macos.zip
    unzip -qq flutter_macos.zip
fi
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0  575M    0 3582k    0     0  2816k      0  0:03:29  0:00:01  0:03:28 2903k
  2  575M    2 12.2M    0     0  5519k      0  0:01:46  0:00:02  0:01:44 5611k
  4  575M    4 24.2M    0     0  7684k      0  0:01:16  0:00:03  0:01:13 7774k
  5  575M    5 34.1M    0     0  8232k      0  0:01:11  0:00:04  0:01:07 8305k
  7  575M    7 42.9M    0     0  8170k      0  0:01:12  0:00:05  0:01:07 8746k
  9  575M    9 52.0M    0     0  8547k      0  0:01:09  0:00:06  0:01:03  9.7M
 10  575M   10 59.6M    0     0  8444k      0  0:01:09  0:00:07  0:01:02 9783k
 11  575M   11 66.7M    0     0  8298k      0  0:01:11  0:00:08  0:01:03 8694k
 13  575M   13 75.5M    0     0  8380k      0  0:01:10  0:00:09  0:01:01 8505k
 14  575M   14 84.9M    0     0  8410k      0  0:01:10  0:00:10  0:01:00 8670k
 16  575M   16 93.9M    0     0  8561k      0  0:01:08  0:00:11  0:00:57 8579k
 18  575M   18  104M    0     0  8705k      0  0:01:07  0:00:12  0:00:55 9082k
 19  575M   19  109M    0     0  8469k      0  0:01:09  0:00:13  0:00:56 8749k
 21  575M   21  122M    0     0  8785k      0  0:01:07  0:00:14  0:00:53 9532k
 22  575M   22  131M    0     0  8803k      0  0:01:06  0:00:15  0:00:51 9621k
 24  575M   24  138M    0     0  8758k      0  0:01:07  0:00:16  0:00:51 9200k
 25  575M   25  145M    0     0  8645k      0  0:01:08  0:00:17  0:00:51 8499k
 26  575M   26  154M    0     0  8661k      0  0:01:08  0:00:18  0:00:50 9173k
 27  575M   27  159M    0     0  8515k      0  0:01:09  0:00:19  0:00:50 7747k
 29  575M   29  168M    0     0  8547k      0  0:01:09  0:00:20  0:00:49 7753k
 29  575M   29  172M    0     0  8325k      0  0:01:10  0:00:21  0:00:49 6920k
 31  575M   31  180M    0     0  8324k      0  0:01:10  0:00:22  0:00:48 7220k
 32  575M   32  188M    0     0  8319k      0  0:01:10  0:00:23  0:00:47 7071k
 33  575M   33  195M    0     0  8249k      0  0:01:11  0:00:24  0:00:47 7225k
 35  575M   35  203M    0     0  8259k      0  0:01:11  0:00:25  0:00:46 7091k
 37  575M   37  213M    0     0  8321k      0  0:01:10  0:00:26  0:00:44 8304k
 38  575M   38  219M    0     0  8238k      0  0:01:11  0:00:27  0:00:44 7856k
 39  575M   39  228M    0     0  8297k      0  0:01:11  0:00:28  0:00:43 8194k
 40  575M   40  234M    0     0  8182k      0  0:01:12  0:00:29  0:00:43 7870k
 41  575M   41  241M    0     0  8182k      0  0:01:12  0:00:30  0:00:42 7792k
 43  575M   43  249M    0     0  8179k      0  0:01:12  0:00:31  0:00:41 7436k
 44  575M   44  258M    0     0  8211k      0  0:01:11  0:00:32  0:00:39 8065k
 46  575M   46  267M    0     0  8250k      0  0:01:11  0:00:33  0:00:38 7987k
 47  575M   47  276M    0     0  8256k      0  0:01:11  0:00:34  0:00:37 8699k
 49  575M   49  284M    0     0  8254k      0  0:01:11  0:00:35  0:00:36 8689k
 50  575M   50  293M    0     0  8282k      0  0:01:11  0:00:36  0:00:35 8916k
 52  575M   52  302M    0     0  8311k      0  0:01:10  0:00:37  0:00:33 8963k
 54  575M   54  311M    0     0  8340k      0  0:01:10  0:00:38  0:00:32 8937k
 55  575M   55  316M    0     0  8269k      0  0:01:11  0:00:39  0:00:32 8355k
 56  575M   56  327M    0     0  8314k      0  0:01:10  0:00:40  0:00:30 8734k
 58  575M   58  335M    0     0  8325k      0  0:01:10  0:00:41  0:00:29 8638k
 59  575M   59  343M    0     0  8331k      0  0:01:10  0:00:42  0:00:28 8484k
 60  575M   60  350M    0     0  8285k      0  0:01:11  0:00:43  0:00:28 7876k
 61  575M   61  356M    0     0  8248k      0  0:01:11  0:00:44  0:00:27 8090k
 63  575M   63  364M    0     0  8223k      0  0:01:11  0:00:45  0:00:26 7489k
 64  575M   64  373M    0     0  8272k      0  0:01:11  0:00:46  0:00:25 7834k
 65  575M   65  379M    0     0  8233k      0  0:01:11  0:00:47  0:00:24 7407k
 68  575M   68  392M    0     0  8318k      0  0:01:10  0:00:48  0:00:22 8606k
 69  575M   69  400M    0     0  8329k      0  0:01:10  0:00:49  0:00:21 9045k
 71  575M   71  409M    0     0  8343k      0  0:01:10  0:00:50  0:00:20 9458k
 72  575M   72  416M    0     0  8330k      0  0:01:10  0:00:51  0:00:19 8870k
 73  575M   73  425M    0     0  8345k      0  0:01:10  0:00:52  0:00:18 9403k
 74  575M   74  430M    0     0  8284k      0  0:01:11  0:00:53  0:00:18 7954k
 76  575M   76  440M    0     0  8321k      0  0:01:10  0:00:54  0:00:16 8236k
 77  575M   77  449M    0     0  8320k      0  0:01:10  0:00:55  0:00:15 8087k
 79  575M   79  458M    0     0  8327k      0  0:01:10  0:00:56  0:00:14 8295k
 80  575M   80  465M    0     0  8325k      0  0:01:10  0:00:57  0:00:13 8115k
 82  575M   82  473M    0     0  8316k      0  0:01:10  0:00:58  0:00:12 8658k
 83  575M   83  478M    0     0  8270k      0  0:01:11  0:00:59  0:00:12 7724k
 84  575M   84  488M    0     0  8302k      0  0:01:11  0:01:00  0:00:11 8094k
 85  575M   85  493M    0     0  8259k      0  0:01:11  0:01:01  0:00:10 7471k
 87  575M   87  503M    0     0  8282k      0  0:01:11  0:01:02  0:00:09 7787k
 88  575M   88  511M    0     0  8267k      0  0:01:11  0:01:03  0:00:08 7694k
 90  575M   90  518M    0     0  8268k      0  0:01:11  0:01:04  0:00:07 8244k
 91  575M   91  525M    0     0  8245k      0  0:01:11  0:01:05  0:00:06 7571k
 92  575M   92  532M    0     0  8231k      0  0:01:11  0:01:06  0:00:05 7889k
 94  575M   94  544M    0     0  8288k      0  0:01:11  0:01:07  0:00:04 8364k
 95  575M   95  551M    0     0  8277k      0  0:01:11  0:01:08  0:00:03 8408k
 97  575M   97  563M    0     0  8329k      0  0:01:10  0:01:09  0:00:01 9118k
 98  575M   98  567M    0     0  8275k      0  0:01:11  0:01:10  0:00:01 8658k
100  575M  100  575M    0     0  8291k      0  0:01:11  0:01:11 --:--:-- 9105k
[DeviceFarm] export PATH="$PATH":"$HOME/.pub-cache/bin"
[DeviceFarm] export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
[DeviceFarm] flutter doctor -v

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool anonymously reports feature usage statistics and crash    ║
  ║ reports to Google in order to help Google contribute improvements to       ║
  ║ Flutter over time.                                                         ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://github.com/flutter/flutter/wiki/Flutter-CLI-crash-reporting        ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://www.google.com/intl/en/policies/privacy/                           ║
  ║                                                                            ║
  ║ Use "flutter config --no-analytics" to disable analytics and crash         ║
  ║ reporting.                                                                 ║
  ╚════════════════════════════════════════════════════════════════════════════╝

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.13.6 17G65, locale en)
    • Flutter version 1.5.4-hotfix.2 at /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter
    • Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.


[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode_10.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.2
    ✗ ios-deploy out of date (1.9.4 is required). To upgrade with Brew:
        brew upgrade ios-deploy
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • 9905944752 • 82f521c87aa1022e6303ecc4377676b627d529a9 • ios • iOS 12.0

! Doctor found issues in 3 categories.
 
[DEVICEFARM] ########### Entering phase test ###########
 
[DeviceFarm] echo "Navigate to test package directory"
Navigate to test package directory
[DeviceFarm] cd $DEVICEFARM_TEST_PACKAGE_PATH
[DeviceFarm] echo "Start Flutter integration test"
Start Flutter integration test
[DeviceFarm] APP_ID=com.orbsoft.counter
[DeviceFarm] MAIN=test_driver/main.dart
[DeviceFarm] cd flutter_app
[DeviceFarm] if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = "Android" ]; then
  ./script/test_android.sh $APP_ID $TEST
fi
if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = "iOS" ]; then
  echo flutter --verbose drive $MAIN
  flutter --verbose drive $MAIN
fi
flutter --verbose drive test_driver/main.dart
[ +104 ms] Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.
             running Flutter tool: /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter
             previous reference  : /Users/jenkins/Library/flutter
           This can happen if you deleted or moved your copy of the Flutter repository, or if it was on a volume that is no longer mounted or has been mounted at a different location. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).

[  +33 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/] git log -n 1 --pretty=format:%H
[  +74 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
[        ] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +29 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.5.4-hotfix.2-0-g7a4c33425
[  +50 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +24 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/] git ls-remote --get-url origin
[  +29 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +253 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/] git rev-parse --abbrev-ref HEAD
[ +135 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[ +402 ms] Unable to locate an Android SDK.
[  +36 ms] Unable to locate an Android SDK.
[  +20 ms] executing: idevice_id -h
[+1059 ms] executing: which ideviceinstaller
[  +19 ms] Exit code 0 from: which ideviceinstaller
[        ] /usr/local/bin/ideviceinstaller
[        ] executing: which iproxy
[   +9 ms] Exit code 0 from: which iproxy
[        ] /usr/local/bin/iproxy
[ +195 ms] /usr/bin/xcrun simctl list --json devices
[ +506 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[  +15 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +7 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FuchsiaCacheArtifacts' is not required, skipping update.
[  +35 ms] Running "flutter packages get" in flutter_app...
[   +2 ms] Using /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/.pub-cache for the pub cache.
[   +1 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/] /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/bin/cache/dart-sdk/bin/pub --verbosity=warning --verbose get --no-precompile
[+13196 ms] Running "flutter packages get" in flutter_app... (completed in 13.2s)
[ +730 ms] Using device 9905944752.
[  +20 ms] Starting application: test_driver/main.dart
[  +14 ms] Stopping previously running application, if any.
[        ] Stopping application.
[  +28 ms] executing: /usr/bin/defaults read /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner/Info CFBundleIdentifier
[ +191 ms] Exit code 0 from: /usr/bin/defaults read /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner/Info CFBundleIdentifier
[        ] $(PRODUCT_BUNDLE_IDENTIFIER)
[ +133 ms] Installing application package.
[   +1 ms] executing: /usr/local/bin/ideviceinstaller --list-apps
[+2108 ms] CFBundleIdentifier, CFBundleVersion, CFBundleDisplayName
           com.bytearc.SafariLauncher, "2.0", "SafariLauncher"
           com.example.example, "1", "example"
[   +4 ms] Could not find application bundle at build/ios/iphoneos/Runner.app; have you run "flutter build ios"?
[        ] Starting application.
[  +50 ms] executing: idevicesyslog -u 82f521c87aa1022e6303ecc4377676b627d529a9
[   +9 ms] Building Runner.app for 82f521c87aa1022e6303ecc4377676b627d529a9
[+2181 ms] Using legacy Xcode build system.
[ +100 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/] /usr/bin/xcodebuild -list
[+7055 ms] Information about project "Runner":
               Targets:
                   Runner

               Build Configurations:
                   Debug
                   Release
                   Profile

               If no build configuration is specified and -scheme is not passed then "Release" is used.

               Schemes:
                   Runner
[   +5 ms] executing: [/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner.xcodeproj/] /usr/bin/xcodebuild -project /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner.xcodeproj -target Runner -showBuildSettings
[+4976 ms] Exit code 0 from: /usr/bin/xcodebuild -project /private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner.xcodeproj -target Runner -showBuildSettings
[        ] Build settings for action build and target Runner:
               ACTION = build
               AD_HOC_CODE_SIGNING_ALLOWED = NO
               ALTERNATE_GROUP = staff
               ALTERNATE_MODE = u+w,go-w,a+rX
               ALTERNATE_OWNER = device-farm
               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
               ALWAYS_SEARCH_USER_PATHS = NO
               ALWAYS_USE_SEPARATE_HEADERMAPS = NO
               APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
               APPLE_INTERNAL_DIR = /AppleInternal
               APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
               APPLE_INTERNAL_LIBRARY_DIR = /AppleInternal/Library
               APPLE_INTERNAL_TOOLS = /AppleInternal/Developer/Tools
               APPLICATION_EXTENSION_API_ONLY = NO
               APPLY_RULES_IN_COPY_FILES = NO
               ARCHS = armv7 arm64
               ARCHS_STANDARD = armv7 arm64
               ARCHS_STANDARD_32_64_BIT = armv7 arm64
               ARCHS_STANDARD_32_BIT = armv7
               ARCHS_STANDARD_64_BIT = arm64
               ARCHS_STANDARD_INCLUDING_64_BIT = armv7 arm64
               ARCHS_UNIVERSAL_IPHONE_OS = armv7 arm64
               ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
               AVAILABLE_PLATFORMS = appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator
               BITCODE_GENERATION_MODE = marker
               BUILD_ACTIVE_RESOURCES_ONLY = NO
               BUILD_COMPONENTS = headers build
               BUILD_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               BUILD_ROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               BUILD_STYLE = 
               BUILD_VARIANTS = normal
               BUILT_PRODUCTS_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos
               CACHE_ROOT = /var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/C/com.apple.DeveloperTools/10.1-10B61/Xcode
               CCHROOT = /var/folders/wl/3pv7tsn91h79ctlxxn9kyl1h0000gr/C/com.apple.DeveloperTools/10.1-10B61/Xcode
               CHMOD = /bin/chmod
               CHOWN = /usr/sbin/chown
               CLANG_ANALYZER_NONNULL = YES
               CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
               CLANG_CXX_LIBRARY = libc++
               CLANG_ENABLE_MODULES = YES
               CLANG_ENABLE_OBJC_ARC = YES
               CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
               CLANG_WARN_BOOL_CONVERSION = YES
               CLANG_WARN_COMMA = YES
               CLANG_WARN_CONSTANT_CONVERSION = YES
               CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
               CLANG_WARN_EMPTY_BODY = YES
               CLANG_WARN_ENUM_CONVERSION = YES
               CLANG_WARN_INFINITE_RECURSION = YES
               CLANG_WARN_INT_CONVERSION = YES
               CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
               CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
               CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
               CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
               CLANG_WARN_STRICT_PROTOTYPES = YES
               CLANG_WARN_SUSPICIOUS_MOVE = YES
               CLANG_WARN_UNREACHABLE_CODE = YES
               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
               CLASS_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/JavaClasses
               CLEAN_PRECOMPS = YES
               CLONE_HEADERS = NO
               CODESIGNING_FOLDER_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos/Runner.app
               CODE_SIGNING_ALLOWED = YES
               CODE_SIGNING_REQUIRED = YES
               CODE_SIGN_CONTEXT_CLASS = XCiPhoneOSCodeSignContext
               CODE_SIGN_IDENTITY = iPhone Developer
               CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES
               CODE_SIGN_STYLE = Manual
               COLOR_DIAGNOSTICS = NO
               COMBINE_HIDPI_IMAGES = NO
               COMPILER_INDEX_STORE_ENABLE = Default
               COMPOSITE_SDK_DIRS = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/CompositeSDKs
               COMPRESS_PNG_FILES = YES
               CONFIGURATION = Release
               CONFIGURATION_BUILD_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos
               CONFIGURATION_TEMP_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos
               CONTENTS_FOLDER_PATH = Runner.app
               COPYING_PRESERVES_HFS_DATA = NO
               COPY_HEADERS_RUN_UNIFDEF = NO
               COPY_PHASE_STRIP = NO
               COPY_RESOURCES_FROM_STATIC_FRAMEWORKS = YES
               CORRESPONDING_SIMULATOR_PLATFORM_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneSimulator.platform
               CORRESPONDING_SIMULATOR_PLATFORM_NAME = iphonesimulator
               CORRESPONDING_SIMULATOR_SDK_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk
               CORRESPONDING_SIMULATOR_SDK_NAME = iphonesimulator12.1
               CP = /bin/cp
               CREATE_INFOPLIST_SECTION_IN_BINARY = NO
               CURRENT_ARCH = arm64
               CURRENT_PROJECT_VERSION = 1
               CURRENT_VARIANT = normal
               DEAD_CODE_STRIPPING = YES
               DEBUGGING_SYMBOLS = YES
               DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
               DEFAULT_COMPILER = com.apple.compilers.llvm.clang.1_0
               DEFAULT_KEXT_INSTALL_PATH = /System/Library/Extensions
               DEFINES_MODULE = NO
               DEPLOYMENT_LOCATION = NO
               DEPLOYMENT_POSTPROCESSING = NO
               DEPLOYMENT_TARGET_CLANG_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
               DEPLOYMENT_TARGET_CLANG_FLAG_NAME = miphoneos-version-min
               DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX = -miphoneos-version-min=
               DEPLOYMENT_TARGET_LD_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
               DEPLOYMENT_TARGET_LD_FLAG_NAME = ios_version_min
               DEPLOYMENT_TARGET_SETTING_NAME = IPHONEOS_DEPLOYMENT_TARGET
               DEPLOYMENT_TARGET_SUGGESTED_VALUES = 8.0 8.1 8.2 8.3 8.4 9.0 9.1 9.2 9.3 10.0 10.1 10.2 10.3 11.0 11.1 11.2 11.3 11.4 12.0 12.1
               DERIVED_FILES_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/DerivedSources
               DERIVED_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/DerivedSources
               DERIVED_SOURCES_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/DerivedSources
               DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications
               DEVELOPER_BIN_DIR = /Applications/Xcode_10.app/Contents/Developer/usr/bin
               DEVELOPER_DIR = /Applications/Xcode_10.app/Contents/Developer
               DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode_10.app/Contents/Developer/Library/Frameworks
               DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode_10.app/Contents/Developer/Library/Frameworks
               DEVELOPER_LIBRARY_DIR = /Applications/Xcode_10.app/Contents/Developer/Library
               DEVELOPER_SDK_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
               DEVELOPER_TOOLS_DIR = /Applications/Xcode_10.app/Contents/Developer/Tools
               DEVELOPER_USR_DIR = /Applications/Xcode_10.app/Contents/Developer/usr
               DEVELOPMENT_LANGUAGE = English
               DOCUMENTATION_FOLDER_PATH = Runner.app/English.lproj/Documentation
               DO_HEADER_SCANNING_IN_JAM = NO
               DSTROOT = /tmp/Runner.dst
               DT_TOOLCHAIN_DIR = /Applications/Xcode_10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
               DWARF_DSYM_FILE_NAME = Runner.app.dSYM
               DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = NO
               DWARF_DSYM_FOLDER_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos
               EFFECTIVE_PLATFORM_NAME = -iphoneos
               EMBEDDED_CONTENT_CONTAINS_SWIFT = NO
               EMBEDDED_PROFILE_NAME = embedded.mobileprovision
               EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = NO
               ENABLE_BITCODE = NO
               ENABLE_DEFAULT_HEADER_SEARCH_PATHS = YES
               ENABLE_HEADER_DEPENDENCIES = YES
               ENABLE_NS_ASSERTIONS = NO
               ENABLE_ON_DEMAND_RESOURCES = YES
               ENABLE_STRICT_OBJC_MSGSEND = YES
               ENABLE_TESTABILITY = NO
               ENTITLEMENTS_ALLOWED = YES
               ENTITLEMENTS_DESTINATION = Signature
               ENTITLEMENTS_REQUIRED = YES
               EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = .DS_Store .svn .git .hg CVS
               EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = *.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj
               EXECUTABLES_FOLDER_PATH = Runner.app/Executables
               EXECUTABLE_FOLDER_PATH = Runner.app
               EXECUTABLE_NAME = Runner
               EXECUTABLE_PATH = Runner.app/Runner
               EXPANDED_CODE_SIGN_IDENTITY = 
               EXPANDED_CODE_SIGN_IDENTITY_NAME = 
               EXPANDED_PROVISIONING_PROFILE = 
               FILE_LIST = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects/LinkFileList
               FIXED_FILES_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/FixedFiles
               FLUTTER_APPLICATION_PATH = /Users/jenkins/dev/github.com/mmcc007/sylph/example
               FLUTTER_BUILD_DIR = build
               FLUTTER_BUILD_MODE = debug
               FLUTTER_BUILD_NAME = 1.0.0
               FLUTTER_BUILD_NUMBER = 1
               FLUTTER_FRAMEWORK_DIR = /Users/jenkins/Library/flutter/bin/cache/artifacts/engine/ios
               FLUTTER_ROOT = /Users/jenkins/Library/flutter
               FLUTTER_TARGET = /Users/jenkins/dev/github.com/mmcc007/sylph/example/test_driver/main.dart
               FRAMEWORKS_FOLDER_PATH = Runner.app/Frameworks
               FRAMEWORK_FLAG_PREFIX = -framework
               FRAMEWORK_SEARCH_PATHS =  /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Flutter
               FRAMEWORK_VERSION = A
               FULL_PRODUCT_NAME = Runner.app
               GCC3_VERSION = 3.3
               GCC_C_LANGUAGE_STANDARD = gnu99
               GCC_INLINES_ARE_PRIVATE_EXTERN = YES
               GCC_NO_COMMON_BLOCKS = YES
               GCC_PFE_FILE_C_DIALECTS = c objective-c c++ objective-c++
               GCC_SYMBOLS_PRIVATE_EXTERN = YES
               GCC_THUMB_SUPPORT = YES
               GCC_TREAT_WARNINGS_AS_ERRORS = NO
               GCC_VERSION = com.apple.compilers.llvm.clang.1_0
               GCC_VERSION_IDENTIFIER = com_apple_compilers_llvm_clang_1_0
               GCC_WARN_64_TO_32_BIT_CONVERSION = YES
               GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
               GCC_WARN_UNDECLARED_SELECTOR = YES
               GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
               GCC_WARN_UNUSED_FUNCTION = YES
               GCC_WARN_UNUSED_VARIABLE = YES
               GENERATE_MASTER_OBJECT_FILE = NO
               GENERATE_PKGINFO_FILE = YES
               GENERATE_PROFILING_CODE = NO
               GENERATE_TEXT_BASED_STUBS = NO
               GID = 20
               GROUP = staff
               HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT = YES
               HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES = YES
               HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS = YES
               HEADERMAP_INCLUDES_PROJECT_HEADERS = YES
               HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES = YES
               HEADERMAP_USES_VFS = NO
               HIDE_BITCODE_SYMBOLS = YES
               HOME = /Users/device-farm
               ICONV = /usr/bin/iconv
               INFOPLIST_EXPAND_BUILD_SETTINGS = YES
               INFOPLIST_FILE = Runner/Info.plist
               INFOPLIST_OUTPUT_FORMAT = binary
               INFOPLIST_PATH = Runner.app/Info.plist
               INFOPLIST_PREPROCESS = NO
               INFOSTRINGS_PATH = Runner.app/English.lproj/InfoPlist.strings
               INLINE_PRIVATE_FRAMEWORKS = NO
               INSTALLHDRS_COPY_PHASE = NO
               INSTALLHDRS_SCRIPT_PHASE = NO
               INSTALL_DIR = /tmp/Runner.dst/Applications
               INSTALL_GROUP = staff
               INSTALL_MODE_FLAG = u+w,go-w,a+rX
               INSTALL_OWNER = device-farm
               INSTALL_PATH = /Applications
               INSTALL_ROOT = /tmp/Runner.dst
               IPHONEOS_DEPLOYMENT_TARGET = 8.0
               JAVAC_DEFAULT_FLAGS = -J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8
               JAVA_APP_STUB = /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
               JAVA_ARCHIVE_CLASSES = YES
               JAVA_ARCHIVE_TYPE = JAR
               JAVA_COMPILER = /usr/bin/javac
               JAVA_FOLDER_PATH = Runner.app/Java
               JAVA_FRAMEWORK_RESOURCES_DIRS = Resources
               JAVA_JAR_FLAGS = cv
               JAVA_SOURCE_SUBDIR = .
               JAVA_USE_DEPENDENCIES = YES
               JAVA_ZIP_FLAGS = -urg
               JIKES_DEFAULT_FLAGS = +E +OLDCSO
               KASAN_DEFAULT_CFLAGS = -DKASAN=1 -fsanitize=address -mllvm -asan-globals-live-support -mllvm -asan-force-dynamic-shadow
               KEEP_PRIVATE_EXTERNS = NO
               LD_DEPENDENCY_INFO_FILE = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner_dependency_info.dat
               LD_GENERATE_MAP_FILE = NO
               LD_MAP_FILE_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/Runner-LinkMap-normal-arm64.txt
               LD_NO_PIE = NO
               LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER = YES
               LD_RUNPATH_SEARCH_PATHS =  @executable_path/Frameworks
               LEGACY_DEVELOPER_DIR = /Applications/Xcode_10.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
               LEX = lex
               LIBRARY_FLAG_NOSPACE = YES
               LIBRARY_FLAG_PREFIX = -l
               LIBRARY_KEXT_INSTALL_PATH = /Library/Extensions
               LIBRARY_SEARCH_PATHS =  /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Flutter
               LINKER_DISPLAYS_MANGLED_NAMES = NO
               LINK_FILE_LIST_normal_arm64 = 
               LINK_FILE_LIST_normal_armv7 = 
               LINK_WITH_STANDARD_LIBRARIES = YES
               LOCALIZABLE_CONTENT_DIR = 
               LOCALIZED_RESOURCES_FOLDER_PATH = Runner.app/English.lproj
               LOCALIZED_STRING_MACRO_NAMES = NSLocalizedString CFLocalizedString
               LOCAL_ADMIN_APPS_DIR = /Applications/Utilities
               LOCAL_APPS_DIR = /Applications
               LOCAL_DEVELOPER_DIR = /Library/Developer
               LOCAL_LIBRARY_DIR = /Library
               LOCROOT = 
               LOCSYMROOT = 
               MACH_O_TYPE = mh_execute
               MAC_OS_X_PRODUCT_BUILD_VERSION = 17G65
               MAC_OS_X_VERSION_ACTUAL = 101306
               MAC_OS_X_VERSION_MAJOR = 101300
               MAC_OS_X_VERSION_MINOR = 1306
               METAL_LIBRARY_FILE_BASE = default
               METAL_LIBRARY_OUTPUT_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos/Runner.app
               MODULE_CACHE_DIR = /Users/device-farm/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
               MTL_ENABLE_DEBUG_INFO = NO
               NATIVE_ARCH = armv7
               NATIVE_ARCH_32_BIT = i386
               NATIVE_ARCH_64_BIT = x86_64
               NATIVE_ARCH_ACTUAL = x86_64
               NO_COMMON = YES
               OBJECT_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects
               OBJECT_FILE_DIR_normal = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal
               OBJROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               ONLY_ACTIVE_ARCH = NO
               OS = MACOS
               OSAC = /usr/bin/osacompile
               PACKAGE_TYPE = com.apple.package-type.wrapper.application
               PASCAL_STRINGS = YES
               PATH = /Applications/Xcode_10.app/Contents/Developer/usr/bin:/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/bin:/private/tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter/bin/cache/dart-sdk/bin:/Users/device-farm/.rvm/gems/ruby-2.5.1/bin:/Users/device-farm/.rvm/gems/ruby-2.5.1@global/bin:/Users/device-farm/.rvm/rubies/ruby-2.5.1/bin:/opt/local/bin:/opt/local/sbin:/usr/local/opt/python/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/adf_admin/.npm-packages/bin:/Users/device-farm/.rvm/bin:/Users/device-farm/.rvm/bin:/Users/device-farm/.pub-cache/bin
               PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode_10.app/Contents/Developer/Headers /Applications/Xcode_10.app/Contents/Developer/SDKs /Applications/Xcode_10.app/Contents/Developer/Platforms
               PBDEVELOPMENTPLIST_PATH = Runner.app/pbdevelopment.plist
               PFE_FILE_C_DIALECTS = objective-c
               PKGINFO_FILE_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/PkgInfo
               PKGINFO_PATH = Runner.app/PkgInfo
               PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications
               PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
               PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode_10.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library
               PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
               PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools
               PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr
               PLATFORM_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform
               PLATFORM_DISPLAY_NAME = iOS
               PLATFORM_NAME = iphoneos
               PLATFORM_PREFERRED_ARCH = arm64
               PLATFORM_PRODUCT_BUILD_VERSION = 16B91
               PLIST_FILE_OUTPUT_FORMAT = binary
               PLUGINS_FOLDER_PATH = Runner.app/PlugIns
               PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES
               PRECOMP_DESTINATION_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/PrefixHeaders
               PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO
               PRIVATE_HEADERS_FOLDER_PATH = Runner.app/PrivateHeaders
               PRODUCT_BUNDLE_IDENTIFIER = com.orbsoft.counter
               PRODUCT_MODULE_NAME = Runner
               PRODUCT_NAME = Runner
               PRODUCT_SETTINGS_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner/Info.plist
               PRODUCT_TYPE = com.apple.product-type.application
               PROFILING_CODE = NO
               PROJECT = Runner
               PROJECT_DERIVED_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/DerivedSources
               PROJECT_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios
               PROJECT_FILE_PATH = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios/Runner.xcodeproj
               PROJECT_NAME = Runner
               PROJECT_TEMP_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build
               PROJECT_TEMP_ROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               PROVISIONING_PROFILE_REQUIRED = YES
               PUBLIC_HEADERS_FOLDER_PATH = Runner.app/Headers
               RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS = YES
               REMOVE_CVS_FROM_RESOURCES = YES
               REMOVE_GIT_FROM_RESOURCES = YES
               REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES = YES
               REMOVE_HG_FROM_RESOURCES = YES
               REMOVE_SVN_FROM_RESOURCES = YES
               RESOURCE_RULES_REQUIRED = YES
               REZ_COLLECTOR_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/ResourceManagerResources
               REZ_OBJECTS_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build/ResourceManagerResources/Objects
               SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO
               SCRIPTS_FOLDER_PATH = Runner.app/Scripts
               SDKROOT = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
               SDK_DIR = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
               SDK_DIR_iphoneos12_1 = /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
               SDK_NAME = iphoneos12.1
               SDK_NAMES = iphoneos12.1
               SDK_PRODUCT_BUILD_VERSION = 16B91
               SDK_VERSION = 12.1
               SDK_VERSION_ACTUAL = 120100
               SDK_VERSION_MAJOR = 120000
               SDK_VERSION_MINOR = 100
               SED = /usr/bin/sed
               SEPARATE_STRIP = NO
               SEPARATE_SYMBOL_EDIT = NO
               SET_DIR_MODE_OWNER_GROUP = YES
               SET_FILE_MODE_OWNER_GROUP = NO
               SHALLOW_BUNDLE = YES
               SHARED_DERIVED_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos/DerivedSources
               SHARED_FRAMEWORKS_FOLDER_PATH = Runner.app/SharedFrameworks
               SHARED_PRECOMPS_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/SharedPrecompiledHeaders
               SHARED_SUPPORT_FOLDER_PATH = Runner.app/SharedSupport
               SKIP_INSTALL = NO
               SOURCE_ROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios
               SRCROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/ios
               STRINGS_FILE_OUTPUT_ENCODING = binary
               STRIP_BITCODE_FROM_COPIED_FILES = YES
               STRIP_INSTALLED_PRODUCT = YES
               STRIP_STYLE = all
               STRIP_SWIFT_SYMBOLS = YES
               SUPPORTED_DEVICE_FAMILIES = 1,2
               SUPPORTED_PLATFORMS = iphonesimulator iphoneos
               SUPPORTS_TEXT_BASED_API = NO
               SWIFT_PLATFORM_TARGET_PREFIX = ios
               SYMROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               SYSTEM_ADMIN_APPS_DIR = /Applications/Utilities
               SYSTEM_APPS_DIR = /Applications
               SYSTEM_CORE_SERVICES_DIR = /System/Library/CoreServices
               SYSTEM_DEMOS_DIR = /Applications/Extras
               SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications
               SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode_10.app/Contents/Developer/usr/bin
               SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications/Utilities/Built Examples
               SYSTEM_DEVELOPER_DIR = /Applications/Xcode_10.app/Contents/Developer
               SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode_10.app/Contents/Developer/ADC Reference Library
               SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications/Graphics Tools
               SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications/Java Tools
               SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications/Performance Tools
               SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode_10.app/Contents/Developer/ADC Reference Library/releasenotes
               SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode_10.app/Contents/Developer/Tools
               SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode_10.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools
               SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode_10.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools
               SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode_10.app/Contents/Developer/usr
               SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode_10.app/Contents/Developer/Applications/Utilities
               SYSTEM_DOCUMENTATION_DIR = /Library/Documentation
               SYSTEM_KEXT_INSTALL_PATH = /System/Library/Extensions
               SYSTEM_LIBRARY_DIR = /System/Library
               TAPI_VERIFY_MODE = ErrorsOnly
               TARGETED_DEVICE_FAMILY = 1,2
               TARGETNAME = Runner
               TARGET_BUILD_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Release-iphoneos
               TARGET_NAME = Runner
               TARGET_TEMP_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build
               TEMP_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build
               TEMP_FILES_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build
               TEMP_FILE_DIR = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios/Runner.build/Release-iphoneos/Runner.build
               TEMP_ROOT = /tmp/scratchS6AMea.scratch/test-packageLK6h3L/flutter_app/build/ios
               TOOLCHAIN_DIR = /Applications/Xcode_10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
               TREAT_MISSING_BASELINES_AS_TEST_FAILURES = NO
               UID = 504
               UNLOCALIZED_RESOURCES_FOLDER_PATH = Runner.app
               UNSTRIPPED_PRODUCT = NO
               USER = device-farm
               USER_APPS_DIR = /Users/device-farm/Applications
               USER_LIBRARY_DIR = /Users/device-farm/Library
               USE_DYNAMIC_NO_PIC = YES
               USE_HEADERMAP = YES
               USE_HEADER_SYMLINKS = NO
               VALIDATE_PRODUCT = YES
               VALID_ARCHS = arm64 arm64e armv7 armv7s
               VERBOSE_PBXCP = NO
               VERSIONING_SYSTEM = apple-generic
               VERSIONPLIST_PATH = Runner.app/version.plist
               VERSION_INFO_BUILDER = device-farm
               VERSION_INFO_FILE = Runner_vers.c
               VERSION_INFO_STRING = "@(#)PROGRAM:Runner  PROJECT:Runner-1"
               WRAPPER_EXTENSION = app
               WRAPPER_NAME = Runner.app
               WRAPPER_SUFFIX = .app
               WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES = NO
               XCODE_APP_SUPPORT_DIR = /Applications/Xcode_10.app/Contents/Developer/Library/Xcode
               XCODE_PRODUCT_BUILD_VERSION = 10B61
               XCODE_VERSION_ACTUAL = 1010
               XCODE_VERSION_MAJOR = 1000
               XCODE_VERSION_MINOR = 1010
               XPCSERVICES_FOLDER_PATH = Runner.app/XPCServices
               YACC = yacc
               arch = arm64
               variant = normal
[  +63 ms] executing: which security
[  +10 ms] executing: which openssl
[  +34 ms] executing: security find-identity -p codesigning -v
[ +203 ms] Exit code 0 from: security find-identity -p codesigning -v
[        ] 0 valid identities found
[  +33 ms] ════════════════════════════════════════════════════════════════════════════════
           No valid code signing certificates were found
           You can connect to your Apple Developer account by signing in with your Apple ID
           in Xcode and create an iOS Development Certificate as well as a Provisioning 
           Profile for your project by:
             1- Open the Flutter project's Xcode target with
                  open ios/Runner.xcworkspace
             2- Select the 'Runner' project in the navigator then the 'Runner' target
                in the project settings
             3- In the 'General' tab, make sure a 'Development Team' is selected. 
                You may need to:
                    - Log in with your Apple ID in Xcode first
                    - Ensure you have a valid unique Bundle ID
                    - Register your device with your Apple Developer Account
                    - Let Xcode automatically provision a profile for your app
             4- Build or run your project again
             5- Trust your newly created Development Certificate on your iOS device
                via Settings > General > Device Management > [your new certificate] > Trust

           For more information, please visit:
             https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
             AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

           Or run on an iOS simulator without code signing
           ════════════════════════════════════════════════════════════════════════════════
[  +15 ms] "flutter drive" took 33,638ms.
[        ] "flutter drive" took 33,638ms.
No development certificates available to code sign app for device deployment

#0      throwToolExit (package:flutter_tools/src/base/common.dart:24:3)
#1      _chooseSigningIdentity (package:flutter_tools/src/ios/code_signing.dart:177:5)
<asynchronous suspension>
#2      getCodeSigningIdentityDevelopmentTeam (package:flutter_tools/src/ios/code_signing.dart:134:40)
<asynchronous suspension>
#3      buildXcodeProject (package:flutter_tools/src/ios/mac.dart:362:32)
<asynchronous suspension>
#4      IOSDevice.startApp (package:flutter_tools/src/ios/devices.dart:249:50)
<asynchronous suspension>
#5      _startApp (package:flutter_tools/src/commands/drive.dart:265:52)
<asynchronous suspension>
#6      DriveCommand.runCommand (package:flutter_tools/src/commands/drive.dart:118:51)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)
#8      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#9      _rootRunUnary (dart:async/zone.dart:1132:38)
#10     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#11     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#13     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#14     Future._complete (dart:async/future_impl.dart:473:7)
#15     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#16     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#17     _rootRun (dart:async/zone.dart:1124:13)
#18     _CustomZone.run (dart:async/zone.dart:1021:19)
#19     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#20     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#22     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#23     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)


 
[DEVICEFARM] ########### Entering phase post_test ###########
 
 
[DEVICEFARM] ########### Finish executing testspec ###########
 
[DEVICEFARM] ########### Setting upload permissions ###########
 
chmod: /tmp/customer_log_directoryfOgRqD/*: No such file or directory
 
[DEVICEFARM] Tearing down your device. Your tests report will come shortly.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 9, 2019

According to:

5- Trust your newly created Development Certificate on your iOS device
                via Settings > General > Device Management > [your new certificate] > Trust

... it looks like might have to put the kibosh on the 'run test like a developer' approach.

This probably bring us back to the drawing board.

I've since learned a little more about the device farm mac env.
According to:

[DeviceFarm] env
[DeviceFarm] env
DEVICEFARM_DEVICE_PLATFORM_NAME=iOS
rvm_bin_path=/Users/device-farm/.rvm/bin
GEM_HOME=/Users/device-farm/.rvm/gems/ruby-2.5.1
TERM=unknown
SHELL=/bin/bash
IRBRC=/Users/device-farm/.rvm/rubies/ruby-2.5.1/.irbrc
DEVICEFARM_WDA_DERIVED_DATA_PATH_V1=/tmp/scratchtnt_vx.scratch/DerivedDataL990p2
OLDPWD=/private/tmp/scratchtnt_vx.scratch/test-package8dyNxp
DEVICEFARM_WDA_DERIVED_DATA_PATH_V0=/tmp/scratchtnt_vx.scratch/DerivedDatafW9vY4
MY_RUBY_HOME=/Users/device-farm/.rvm/rubies/ruby-2.5.1
USER=device-farm
DEVICEFARM_DEVICE_NAME=bb66dc1943570628375e82055b7770b33883dc73
_system_type=Darwin
SUDO_USER=rwx
DEVICEFARM_APP_PATH=/tmp/scratchtnt_vx.scratch/share-BbbgaB.scratch/app-mPEIn2.ipa
SUDO_UID=502
WORKING_DIRECTORY=/tmp/customer_artifacts_working_directorykjcuyn
rvm_path=/Users/device-farm/.rvm
SSH_AUTH_SOCK=/tmp/ssh-Lse1R5Op70/agent.19008
__CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0
USERNAME=device-farm
rvm_prefix=/Users/device-farm
MAIL=/var/mail/device-farm
PATH=/Users/device-farm/.rvm/gems/ruby-2.5.1/bin:/Users/device-farm/.rvm/gems/ruby-2.5.1@global/bin:/Users/device-farm/.rvm/rubies/ruby-2.5.1/bin:/opt/local/bin:/opt/local/sbin:/usr/local/opt/python/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/adf_admin/.npm-packages/bin:/Users/device-farm/.rvm/bin:/Users/device-farm/.rvm/bin
PWD=/private/tmp/scratchtnt_vx.scratch/test-package8dyNxp/flutter_app
DEVICEFARM_TEST_PACKAGE_PATH=/tmp/scratchtnt_vx.scratch/test-package8dyNxp
_system_arch=x86_64
DEVICEFARM_LOG_DIR=/tmp/customer_log_directoryt8mMeV
_system_version=10.13
rvm_version=1.29.4 (latest)
SHLVL=2
SUDO_COMMAND=/bin/sh /tmp/scratchtnt_vx.scratch/shell-script-K3WTFy/shell_script.sh
HOME=/Users/device-farm
DEVICEFARM_WORKING_DIR=/tmp/working_dirmUWv9C
LOGNAME=device-farm
DEVICEFARM_WDA_DERIVED_DATA_PATH=/tmp/scratchtnt_vx.scratch/DerivedDataL990p2
GEM_PATH=/Users/device-farm/.rvm/gems/ruby-2.5.1:/Users/device-farm/.rvm/gems/ruby-2.5.1@global
DEVICEFARM_DEVICE_UDID=bb66dc1943570628375e82055b7770b33883dc73
SUDO_GID=20
DEVICEFARM_SCREENSHOT_PATH=/tmp/scratchtnt_vx.scratch/custom_screenshotKC5REx
RUBY_VERSION=ruby-2.5.1
SCREENSHOT_PATH=/tmp/scratchtnt_vx.scratch/custom_screenshotKC5REx
_system_name=OSX
_=/usr/bin/env

... the enterprise-resigned .ipa is available in on the mac.

DEVICEFARM_APP_PATH=/tmp/scratchtnt_vx.scratch/share-BbbgaB.scratch/app-mPEIn2.ipa

So if I can package a testable .app as a .ipa, I can retrieve the enterprise-resigned .ipa, unpackage it to a testable .app, and install it with ios-deploy. Then

flutter drive -no-build test_driver/main.dart

should start the .app for testing (with the start-for-testing args) and run the test.

I think this is worth trying.

Edit: So far, I'm not able to upload a testable .app packaged as a .ipa.
When attempting to archive I get:

========================================================================
ERROR: Flutter archive builds must be run in Release mode.

To correct, ensure FLUTTER_BUILD_MODE is set to release or run:
flutter build ios --release

then re-run Archive from Xcode.
========================================================================

Creating a testable .ipa is currently disabled in flutter tools. I believe this is because of issue on App Store with shipping an interpreter. There may be a way around this for device farm purposes. But for now can only use the .app.

Even if I were able to upload a testable .app via device farm api, it looks like resigning uses the resigners related provisioning profile (which is private). ios-deploy, which flutter tools uses to install the testable .app, looks for this provisioning profile during validation (see original comment above)

One possible way around this is to package the testable .app in the Appium bundle and for device farm to provide a private call from the device farm mac to resign and install the testable .app onto the device (no change to the device farm api). Then

flutter drive -no-build test_driver/main.dart

should have everything it needs to run the test.

This is a blocker on this path.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 9, 2019

At this point the paths described in comment above have been examined except:

3. Do a design review of both Device Farm API and flutter tools .
Establish the requirements and make the necessary changes to both Device Farm API and flutter tools.

4. Other paths I'm not aware of?

And have each resulted in a potential blocker (as described), with no discovered workarounds so far.

The most viable path at the moment is to add a feature to device farm to take the testable .app (uploaded via Appium bundle), resign it, and install it on the device (no need to start it). ios-deploy seems like the most likely way to install a .app. This should be a reasonably straightforward feature to implement. flutter tools should then be able to start the .app and run a test using

flutter drive -no-build test_driver/main.dart

The new feature would callable from the device farm mac (exclusively).
Since activity on the mac is already authenticated, this probably doesn't need credentials.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 10, 2019

Fixed a problem with:

flutter drive -no-build

in flutter tools that showed-up during local testing on an attached device. This means running tests on iOS devices on device farm will no longer require a custom script.

I created flutter/flutter#34148 with the flutter team and may submit a pull request.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 11, 2019

Added building and publishing of non-testable .ipa, signed using my Apple Developer Account, to https://github.com/mmcc007/flutter_ios_build. This can be used with device farm api (though is not used in testing). It is what ultimately get's delivered to the app store for beta testing and release.

The https://github.com/mmcc007/flutter_ios_build project is a demo of one way a flutter build can be automated. It can be cloned and used with another developer account locally or on travis by setting-up the secure envs to produce the same artifacts with different signatures (expects a fastlane match repo).

Modified the script here to download this .ipa, together with the other artifacts, and run a test on an attached iOS device. The test runs if the matching developer accounts's cert and prov profile are installed locally. For example, the test will run on my local setup, with these artifacts, because I have the matching cert and prov profile for the testable .app installed locally.

BTW: the project and script are only intended as a convenience for experimentation with device farm to provide support for developing a solution for dealing with the testable .app.

Per the path I am currently pursuing, an installation service implemented by device farm would be called from the device farm mac. The testable .app would be sent to the installation service, re-signed, installed and started on the device (using ios-deploy). The installation service would return the observatory string found in the system log. A modification to flutter tools would then accept the observatory string, forward the port and run the test. No change to the public-facing API.

Alternatively, the installation service could be exposed by extending the public facing API and optionally skipping the upload of the non-testable .ipa completely.

@aristeia
Copy link

Hi Maurice,
Thanks for the work on this. Your progress using register_devices from fastlane is a fascinating approach to solving the iOS resigning problem that AWS Device Farm attempts to solve using its resigning system. It's really interesting, and has the potential to help us reshape how we accept and deploy more general customer apps (beyond Flutter) in the future.

For now though, the path of least resistance seems, to my naive eyes, to be to add a parameter to flutter tools to “use a preinstalled driver” (such as flutter --verbose drive --no-build --use-preinstalled-driver test_driver/main.dart) so that users can just pass the Flutter driver into Device Farm, have it installed as a usual app (either the main test app or the auxillary app), and run their Flutter tests as usual. This is the path of least friction for a Device Farm integration from my perspective.

Adding an on-the-fly resigning option in Device Farm such that, from the macOS custom environment test spec file, you could call a command resign_my_app AppName.ipa/app/etc and retrieve a signed app and observatory string would be too much of a one-off feature for us to consider. Could you elaborate on the "observatory string" as a concept? I'm not familiar with this an an output of codesigning.

Thanks!

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 12, 2019

@aristeia sure, it's interesting stuff, thnx!

Registering devices using developer account
I think there may be a blocker on the 'run test like a developer' approach (which uses register_devices). The developer cert has to be trusted manually on the device. I don't know of any workaround for this. But if there is, it could be a useful feature in the future.
Edit: maybe you can use your remote screen controller to acknowledge the cert as trusted.

Packaging a testable app for delivery to device farm
The current path I am following assumes that there is no .ipa used in testing. This is because flutter tools runs a script during archiving that checks if a .ipa is being created for a testable .app. Archiving fails with:

========================================================================
ERROR: Flutter archive builds must be run in Release mode.

To correct, ensure FLUTTER_BUILD_MODE is set to release or run:
flutter build ios --release

then re-run Archive from Xcode.
========================================================================

I have not yet looked into this restriction to see if there is a workaround. I believe it is because of AppStore rules on embedding an interpreter.

So given that we cannot use a testable .ipa, we are using a testable .app.

flutter observatory
The observatory is basically a flutter debug service that runs when you start a testable .app on a device. It attaches itself to a port on the device and declares the port number in the device log. It receives commands to move thru the app and send back results.

In theory if you know the port number you can connect to this service from the host using any program in any language. Flutter provides a test package written in dart that supports sending and receiving these commands. Developers can then write integration tests to test the behavior of the app (see example).

re-signing a testable .app
Given that the testable .app is required to be running on the device, it has to be re-signed for a device farm device with the device farm enterprise cert/prov.

For the sake of experimentation, I looked around for examples of how to automate the re-signing of a .app (instead of a .ipa).

Found a script on fastlane that has a feature to re-sign a .app. Fastlane doesn't expose this feature (see
fastlane/fastlane#14023) so am using the re-signing script directly. It's not clear why they don't expose this feature. Could be because there may be a problem with resigning a .app.

Nevertheless, I updated the script to break-out commands to download, re-sign, and test a testable .app.

Don't have another developer (or enterprise) cert and prov to test with. There is a problem with the resigning when I try to re-sign the testable .app with my own cert/prov (see output below), but at least it is some way down the path of re-signing a testable .app. @aristeia, this may be useful in experimenting with re-signing a .app with enterprise cert/prov.

Here is the output from the following commands:

./script/ios_device_test.sh --download untagged-5ee732e53620ed9e3e25
./script/ios_device_test.sh --resign "iPhone Distribution: Maurice McCabe (ET2VMHJPVM)" --provisioning /Users/jenkins/Library/MobileDevice/Provisioning\ Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
./script/ios_device_test.sh --test
output
$ ./script/ios_device_test.sh --download untagged-5ee732e53620ed9e3e25
+ project_artifacts_base=https://github.com/mmcc007
+ app_name=flutter_ios_build
+ test_dir=tmp
+ base_dir=/Users/jenkins/dev/github.com/mmcc007/flutter_ios_build
+ debug_build_dir=build/ios/Debug-iphoneos
+ build_dir=build/ios/iphoneos
+ testable_app=Runner.app
+ main --download untagged-5ee732e53620ed9e3e25
+ [[ 2 -eq 0 ]]
+ case $1 in
+ [[ 2 -ne 2 ]]
+ download_test_artifacts untagged-5ee732e53620ed9e3e25
+ local release_tag=untagged-5ee732e53620ed9e3e25
+ local non_testable_ipa=Runner.ipa
+ local app_src_url=https://github.com/mmcc007/flutter_ios_build/archive/untagged-5ee732e53620ed9e3e25.zip
+ local testable_app_url=https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.app.zip
+ local non_testable_ipa_url=https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.ipa
+ rm -rf tmp
+ mkdir tmp
+ cd tmp
+ wget https://github.com/mmcc007/flutter_ios_build/archive/untagged-5ee732e53620ed9e3e25.zip
--2019-06-12 00:34:47--  https://github.com/mmcc007/flutter_ios_build/archive/untagged-5ee732e53620ed9e3e25.zip
Resolving github.com (github.com)... 192.30.255.112
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/mmcc007/flutter_ios_build/zip/untagged-5ee732e53620ed9e3e25 [following]
--2019-06-12 00:34:48--  https://codeload.github.com/mmcc007/flutter_ios_build/zip/untagged-5ee732e53620ed9e3e25
Resolving codeload.github.com (codeload.github.com)... 192.30.255.120
Connecting to codeload.github.com (codeload.github.com)|192.30.255.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘untagged-5ee732e53620ed9e3e25.zip’

untagged-5ee732e53620ed9e3e25.zip              [  <=>                                                                                  ] 102.27K   349KB/s    in 0.3s

2019-06-12 00:34:49 (349 KB/s) - ‘untagged-5ee732e53620ed9e3e25.zip’ saved [104729]

+ unzip untagged-5ee732e53620ed9e3e25.zip
Archive:  untagged-5ee732e53620ed9e3e25.zip
e4230ef11c23786e627e633a824a7037c25c0336
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/.gitignore
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/.metadata
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/.travis.yml
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/LICENSE
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/README.md
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/build.gradle
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/debug/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/debug/AndroidManifest.xml
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/AndroidManifest.xml
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/java/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/java/com/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/java/com/example/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/java/com/example/flutter_ios_build/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/java/com/example/flutter_ios_build/MainActivity.java
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/drawable/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/drawable/launch_background.xml
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-hdpi/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-mdpi/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xhdpi/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xxhdpi/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xxxhdpi/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/values/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/main/res/values/styles.xml
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/profile/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/app/src/profile/AndroidManifest.xml
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/build.gradle
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/gradle.properties
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/gradle/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/gradle/wrapper/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/gradle/wrapper/gradle-wrapper.properties
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/android/settings.gradle
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/dummy-ssh-keys/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/dummy-ssh-keys/key
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/dummy-ssh-keys/key.pub
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Flutter/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Flutter/AppFrameworkInfo.plist
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Flutter/Debug.xcconfig
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Flutter/Release.xcconfig
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Gemfile
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Gemfile.lock
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/project.pbxproj
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/project.xcworkspace/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/xcshareddata/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/xcshareddata/xcschemes/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcworkspace/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner.xcworkspace/contents.xcworkspacedata
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/AppDelegate.h
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/AppDelegate.m
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
 extracting: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Base.lproj/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Base.lproj/LaunchScreen.storyboard
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Base.lproj/Main.storyboard
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Info.plist
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/main.m
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/fastlane/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/fastlane/Appfile
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/fastlane/Fastfile
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/lib/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/lib/main.dart
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/pubspec.lock
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/pubspec.yaml
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/script/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/script/ios_device_test.sh
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/script/resign.sh
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/test/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/test/widget_test.dart
   creating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/test_driver/
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/test_driver/main.dart
  inflating: flutter_ios_build-untagged-5ee732e53620ed9e3e25/test_driver/main_test.dart
+ cd flutter_ios_build-untagged-5ee732e53620ed9e3e25
+ wget https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.app.zip
--2019-06-12 00:34:49--  https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.app.zip
Resolving github.com (github.com)... 192.30.255.112
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/190128721/7c0b7c80-8ca9-11e9-8f0d-31d2143f5d34?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190612%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190612T073450Z&X-Amz-Expires=300&X-Amz-Signature=23cd2fcc049ac11d47a76e1ce18a5c24dec5d915185417fc3046f6d3b80657ee&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRunner.app.zip&response-content-type=application%2Foctet-stream [following]
--2019-06-12 00:34:49--  https://github-production-release-asset-2e65be.s3.amazonaws.com/190128721/7c0b7c80-8ca9-11e9-8f0d-31d2143f5d34?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190612%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190612T073450Z&X-Amz-Expires=300&X-Amz-Signature=23cd2fcc049ac11d47a76e1ce18a5c24dec5d915185417fc3046f6d3b80657ee&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRunner.app.zip&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.168.3
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.168.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26958470 (26M) [application/octet-stream]
Saving to: ‘Runner.app.zip’

Runner.app.zip                             100%[======================================================================================>]  25.71M   986KB/s    in 15s

2019-06-12 00:35:05 (1.67 MB/s) - ‘Runner.app.zip’ saved [26958470/26958470]

+ unzip Runner.app.zip
Archive:  Runner.app.zip
   creating: build/ios/Debug-iphoneos/Runner.app/
   creating: build/ios/Debug-iphoneos/Runner.app/_CodeSignature/
  inflating: build/ios/Debug-iphoneos/Runner.app/_CodeSignature/CodeResources
  inflating: build/ios/Debug-iphoneos/Runner.app/AppFrameworkInfo.plist
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x~ipad.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@3x.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon20x20~ipad.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon29x29.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@3x.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon29x29~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@3x.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon40x40~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@2x.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@3x.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon76x76@2x~ipad.png
 extracting: build/ios/Debug-iphoneos/Runner.app/AppIcon76x76~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/AppIcon83.5x83.5@2x~ipad.png
  inflating: build/ios/Debug-iphoneos/Runner.app/Assets.car
   creating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/
   creating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/Info.plist
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
   creating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/Info.plist
  inflating: build/ios/Debug-iphoneos/Runner.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
 extracting: build/ios/Debug-iphoneos/Runner.app/Debug.xcconfig
  inflating: build/ios/Debug-iphoneos/Runner.app/embedded.mobileprovision
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/_CodeSignature/
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/_CodeSignature/CodeResources
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/App
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/AssetManifest.json
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/FontManifest.json
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/fonts/
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/fonts/MaterialIcons-Regular.ttf
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/isolate_snapshot_data
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/LICENSE
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/flutter_assets/vm_snapshot_data
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/Info.plist
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/
   creating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/_CodeSignature/
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/_CodeSignature/CodeResources
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/Flutter
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/icudtl.dat
  inflating: build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework/Info.plist
  inflating: build/ios/Debug-iphoneos/Runner.app/Info.plist
 extracting: build/ios/Debug-iphoneos/Runner.app/PkgInfo
  inflating: build/ios/Debug-iphoneos/Runner.app/Runner
+ mkdir build/ios/iphoneos
+ cp -r build/ios/Debug-iphoneos/Runner.app build/ios/iphoneos
+ wget https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.ipa
--2019-06-12 00:35:09--  https://github.com/mmcc007/flutter_ios_build/releases/download/untagged-5ee732e53620ed9e3e25/Runner.ipa
Resolving github.com (github.com)... 192.30.255.112
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/190128721/7ca41300-8ca9-11e9-91b6-c3bed5119622?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190612%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190612T073510Z&X-Amz-Expires=300&X-Amz-Signature=87f4f25b9fc0319d60ff77334842f70f60ab158308c8c3ba96c0cb1c5e5c23da&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRunner.ipa&response-content-type=application%2Foctet-stream [following]
--2019-06-12 00:35:10--  https://github-production-release-asset-2e65be.s3.amazonaws.com/190128721/7ca41300-8ca9-11e9-91b6-c3bed5119622?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190612%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190612T073510Z&X-Amz-Expires=300&X-Amz-Signature=87f4f25b9fc0319d60ff77334842f70f60ab158308c8c3ba96c0cb1c5e5c23da&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRunner.ipa&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.162.67
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.162.67|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10439606 (10.0M) [application/octet-stream]
Saving to: ‘Runner.ipa’

Runner.ipa                                 100%[======================================================================================>]   9.96M  5.40MB/s    in 1.8s

2019-06-12 00:35:12 (5.40 MB/s) - ‘Runner.ipa’ saved [10439606/10439606]



$ ./script/ios_device_test.sh --resign "iPhone Distribution: Maurice McCabe (ET2VMHJPVM)" --provisioning /Users/jenkins/Library/MobileDevice/Provisioning\ Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
+ project_artifacts_base=https://github.com/mmcc007
+ app_name=flutter_ios_build
+ test_dir=tmp
+ base_dir=/Users/jenkins/dev/github.com/mmcc007/flutter_ios_build
+ debug_build_dir=build/ios/Debug-iphoneos
+ build_dir=build/ios/iphoneos
+ testable_app=Runner.app
+ main --resign 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)' --provisioning '/Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'
+ [[ 4 -eq 0 ]]
+ case $1 in
+ [[ 4 -ne 4 ]]
+ re-sign 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)' '/Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'
+ local 'cert_name=iPhone Distribution: Maurice McCabe (ET2VMHJPVM)'
+ local 'provisioning_profile_path=/Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'
+ local resigned_app_dir=/tmp/resigned
++ find_app_dir
+++ find tmp -type d -maxdepth 1 -mindepth 1
++ local app_dir=tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
++ echo tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
+ cd tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
+ rm -rf /tmp/resigned
+ mkdir /tmp/resigned
+ ./script/resign.sh build/ios/Debug-iphoneos/Runner.app 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)' --provisioning '/Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision' --verbose /tmp/resigned/Runner.app
Specified provisioning profile: '/Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision'
Original file: 'build/ios/Debug-iphoneos/Runner.app'
Certificate: 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)'
Output file name: '/tmp/resigned/Runner.app'
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Print: Entry, ":CFBundleDisplayName", Does Not Exist
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Current bundle identifier is: 'com.orbsoft.counter'
New bundle identifier will be: 'com.orbsoft.counter'
Validating the new provisioning profile: /Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Profile app identifier prefix is 'ET2VMHJPVM'
Profile team identifier is 'ET2VMHJPVM'
Resigning embedded frameworks using certificate: 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)'
Resigning '_floatsignTemp/Payload/Runner.app/Frameworks/App.framework'
_floatsignTemp/Payload/Runner.app/Frameworks/App.framework: replacing existing signature
_floatsignTemp/Payload/Runner.app/Frameworks/App.framework: signed bundle with Mach-O universal (armv7 arm64) [io.flutter.flutter.app]
Resigning '_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework'
_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework: replacing existing signature
_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework: signed bundle with Mach-O universal (armv7 arm64) [io.flutter.flutter]
Fixing nested app and extension references
Extracting entitlements from provisioning profile
Resigning application using certificate: 'iPhone Distribution: Maurice McCabe (ET2VMHJPVM)'
and entitlements from provisioning profile: /Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
Creating an archived-expanded-entitlements.xcent file for Xcode 9 builds or earlier
_floatsignTemp/Payload/Runner.app: replacing existing signature
_floatsignTemp/Payload/Runner.app: signed app bundle with Mach-O universal (armv7 arm64) [com.orbsoft.counter]
Repackaging as /tmp/resigned/Runner.app
Process complete
+ rm -rf build/ios/iphoneos/Runner.app
+ unzip /tmp/resigned/Runner.app -d /tmp/resigned
Archive:  /tmp/resigned/Runner.app
   creating: /tmp/resigned/Payload/
   creating: /tmp/resigned/Payload/Runner.app/
   creating: /tmp/resigned/Payload/Runner.app/_CodeSignature/
  inflating: /tmp/resigned/Payload/Runner.app/_CodeSignature/CodeResources
  inflating: /tmp/resigned/Payload/Runner.app/AppFrameworkInfo.plist
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon20x20@2x.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon20x20@2x~ipad.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon20x20@3x.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon20x20~ipad.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon29x29.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon29x29@2x.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon29x29@2x~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon29x29@3x.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon29x29~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon40x40@2x.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon40x40@2x~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon40x40@3x.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon40x40~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon60x60@2x.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon60x60@3x.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon76x76@2x~ipad.png
 extracting: /tmp/resigned/Payload/Runner.app/AppIcon76x76~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/AppIcon83.5x83.5@2x~ipad.png
  inflating: /tmp/resigned/Payload/Runner.app/archived-expanded-entitlements.xcent
  inflating: /tmp/resigned/Payload/Runner.app/Assets.car
   creating: /tmp/resigned/Payload/Runner.app/Base.lproj/
   creating: /tmp/resigned/Payload/Runner.app/Base.lproj/LaunchScreen.storyboardc/
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/LaunchScreen.storyboardc/Info.plist
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
   creating: /tmp/resigned/Payload/Runner.app/Base.lproj/Main.storyboardc/
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/Main.storyboardc/Info.plist
  inflating: /tmp/resigned/Payload/Runner.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
 extracting: /tmp/resigned/Payload/Runner.app/Debug.xcconfig
  inflating: /tmp/resigned/Payload/Runner.app/embedded.mobileprovision
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/_CodeSignature/
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/_CodeSignature/CodeResources
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/App
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/AssetManifest.json
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/FontManifest.json
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/fonts/
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/fonts/MaterialIcons-Regular.ttf
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/isolate_snapshot_data
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/LICENSE
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/packages/
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/flutter_assets/vm_snapshot_data
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/App.framework/Info.plist
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/
   creating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/_CodeSignature/
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/_CodeSignature/CodeResources
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/Flutter
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/icudtl.dat
  inflating: /tmp/resigned/Payload/Runner.app/Frameworks/Flutter.framework/Info.plist
  inflating: /tmp/resigned/Payload/Runner.app/Info.plist
 extracting: /tmp/resigned/Payload/Runner.app/PkgInfo
  inflating: /tmp/resigned/Payload/Runner.app/Runner
+ mv /tmp/resigned/Payload/Runner.app build/ios/iphoneos



$ ./script/ios_device_test.sh --test
+ project_artifacts_base=https://github.com/mmcc007
+ app_name=flutter_ios_build
+ test_dir=tmp
+ base_dir=/Users/jenkins/dev/github.com/mmcc007/flutter_ios_build
+ debug_build_dir=build/ios/Debug-iphoneos
+ build_dir=build/ios/iphoneos
+ testable_app=Runner.app
+ main --test
+ [[ 1 -eq 0 ]]
+ case $1 in
+ run_test_flutter_no_build
++ find_app_dir
+++ find tmp -type d -maxdepth 1 -mindepth 1
++ local app_dir=tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
++ echo tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
+ cd tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25
+ flutter --verbose drive --no-build test_driver/main.dart
[  +20 ms] executing: [/Users/jenkins/Library/flutter/] git log -n 1 --pretty=format:%H
[  +65 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
[        ] executing: [/Users/jenkins/Library/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +71 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.5.4-hotfix.2-0-g7a4c33425
[  +11 ms] executing: [/Users/jenkins/Library/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +11 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] fatal: HEAD does not point to a branch
[  +12 ms] executing: [/Users/jenkins/Library/flutter/] git rev-parse --abbrev-ref HEAD
[  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] HEAD
[  +91 ms] executing: /Users/jenkins/Library/Android/sdk/platform-tools/adb devices -l
[   +7 ms] Exit code 0 from: /Users/jenkins/Library/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
[   +7 ms] executing: idevice_id -h
[ +470 ms] executing: which ideviceinstaller
[   +8 ms] Exit code 0 from: which ideviceinstaller
[        ] /usr/local/bin/ideviceinstaller
[        ] executing: which iproxy
[   +5 ms] Exit code 0 from: which iproxy
[        ] /usr/local/bin/iproxy
[ +360 ms] /usr/bin/xcrun simctl list --json devices
[ +110 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FuchsiaCacheArtifacts' is not required, skipping update.
[   +3 ms] Running "flutter packages get" in flutter_ios_build-untagged-5ee732e53620ed9e3e25...
[   +3 ms] executing: [/Users/jenkins/dev/github.com/mmcc007/flutter_ios_build/tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25/]
/Users/jenkins/Library/flutter/bin/cache/dart-sdk/bin/pub --verbosity=warning --verbose get --no-precompile
[ +708 ms] Running "flutter packages get" in flutter_ios_build-untagged-5ee732e53620ed9e3e25... (completed in 0.7s)
[ +258 ms] Using device Maurice’s iPhone.
[   +2 ms] Starting application: test_driver/main.dart
[   +3 ms] Stopping previously running application, if any.
[        ] Stopping application.
[   +4 ms] executing: /usr/bin/defaults read /Users/jenkins/dev/github.com/mmcc007/flutter_ios_build/tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Info
CFBundleIdentifier
[  +85 ms] Exit code 0 from: /usr/bin/defaults read
/Users/jenkins/dev/github.com/mmcc007/flutter_ios_build/tmp/flutter_ios_build-untagged-5ee732e53620ed9e3e25/ios/Runner/Info CFBundleIdentifier
[        ] $(PRODUCT_BUNDLE_IDENTIFIER)
[   +8 ms] Starting application.
[   +4 ms] executing: idevicesyslog -u 3b3455019e329e007e67239d9b897148244b5053
[   +7 ms] executing: /usr/local/bin/ideviceinstaller -i build/ios/iphoneos/Runner.app
[+9369 ms] Uploading Runner.app package contents... DONE.
                    Installing '(null)'
                     - CreatingStagingDirectory (5%)
 - ExtractingPackage (15%)
 - InspectingPackage (20%)
 - TakingInstallLock (20%)
 - PreflightingApplication (30%)
 - InstallingEmbeddedProfile (30%)
 - VerifyingApplication (40%)
                     - Error occurred: ApplicationVerificationFailed
[   +8 ms] "flutter drive" took 11,548ms.
[        ] "flutter drive" took 11,548ms.
Application failed to start. Will not run test. Quitting.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:24:3)
#1      DriveCommand.runCommand (package:flutter_tools/src/commands/drive.dart:120:9)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:495:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#5      _rootRun (dart:async/zone.dart:1124:13)
#6      _CustomZone.run (dart:async/zone.dart:1021:19)
#7      _runZoned (dart:async/zone.dart:1516:10)
#8      runZoned (dart:async/zone.dart:1463:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:486:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:196:27)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1124:13)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _runZoned (dart:async/zone.dart:1516:10)
#17     runZoned (dart:async/zone.dart:1463:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:111:29)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:111:11)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#24     run.<anonymous closure> (package:flutter_tools/runner.dart:60:20)
<asynchronous suspension>
#25     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#26     _rootRun (dart:async/zone.dart:1124:13)
#27     _CustomZone.run (dart:async/zone.dart:1021:19)
#28     _runZoned (dart:async/zone.dart:1516:10)
#29     runZoned (dart:async/zone.dart:1463:12)
#30     AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#31     runInContext (package:flutter_tools/src/context_runner.dart:50:24)
<asynchronous suspension>
#32     run (package:flutter_tools/runner.dart:51:10)
#33     main (package:flutter_tools/executable.dart:60:9)
<asynchronous suspension>
#34     main (file:///Users/jenkins/Library/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#35     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:298:32)
#36     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)



$

starting a testable .app
Assuming the testable .app re-signing is working, the .app then has to be installed and started on the device.

This is a straightforward process in a developer environment. However, in the device farm mac environment we are assuming there is no access to the device farm's enterprise cert and provision profile.

Therefore the app has to be installed and started by device farm and the observatory port made available to the device farm mac.

Startup can be done using a modified flutter tools or can be done with a custom script (see prototype startup for an example of how to startup a testable .app and find the observatory port). The startup process is unlikely to change for the long foreseeable future so should be very stable.

The observatory port can be made available on the device farm mac as the environment variable (for example, FLUTTER_OBSERVATORY_PORT).

flutter tools can then attach to the .app and run the test or can be run directly using something like:

host_port=1024
iproxy $host_port $FLUTTER_OBSERVATORY_PORT
export VM_SERVICE_URL=http://127.0.0.1:$host_port
dart test_driver/main_test.dart

overall process

  1. build testable .app locally
  2. upload .app to device farm .
    device farm resigns .app, installs and starts .app
  3. test is run on device farm mac

This requires a modification to the device farm api to accept a .app instead of a .ipa and the addition of the observatory port as an environment variable on the device farm mac.

Sylph can be modified to automate this process.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 14, 2019

I looked into the restriction on creating a testable .ipa and found a workaround! See details below.

This means that the overall process can be further streamlined as follows:

  1. Build testable .app locally
  2. Package as a testable .ipa
  3. Upload testable .ipa to device farm .
    device farm resigns .ipa (as normal)
  4. Upload tests to device farm (optional enhancement) .
    device farm allows uploading of directory of tests as a zip file in a standardized validatable format
    (no need to bundle in Appium package as is currently being done, plus no need for a test_spec.yaml)
  5. specify iOS pool .
    (as normal)
  6. Submit job .
    1. device farm provisions mac/device pairs for iOS pool .
      (as normal)
      plus
      1. auto-detects a flutter testable .ipa, unpackages .app, installs and starts .app and gets observatory port
        (see script for example of how to do this)
      2. makes observatory port available on mac as an env variable.
      3. runs tests (part of optional enhancement)

Tests are then started in normal manner (for example, as currently works in Sylph for android)

This process requires no change to the device farm api (other than optional enhancement) and can be automated by Sylph.

minimum impact

  1. device farm .
    auto-detect a flutter ipa, unpack the .app from the .ipa, install on device and start it, and make the observatory port available as an env variable.
  2. flutter .
    merge version of changes in fork (plus optional enhancement to start test on a running app with a known observatory port)

workaround details
I added the fix to the build on travis
https://travis-ci.com/mmcc007/flutter_ios_build/builds/115493500
and published the testable .ipa here.

The fix involved creating a fork of flutter and making some changes:
https://github.com/mmcc007/flutter
This forked version of flutter is used in the travis build. Some version of this fix should probably be merged into the flutter project.

test of workaround
I tested the workaround by downloading the published .ipa and tests and running them locally on an attached device. To carry out the same test, fork
https://github.com/mmcc007/flutter_ios_build
, publish the same artifacts via travis and run the same tests locally with an attached device.

The download of the artifacts and running of the test are automated with this script:
https://github.com/mmcc007/flutter_ios_build/blob/master/script/ios_device_test.sh
Test procedure:

./script/ios_device_test.sh --download <latest tag>
./script/ios_device_test.sh --install_ipa
./script/ios_device_test.sh --test

Test should succeed. No re-signing is required if using artifacts built on your fork with your developer cert/prov.

test logs

./script/ios_device_test.sh --download untagged-8ce77308e0d6a2165adb
./script/ios_device_test.sh --download untagged-8ce77308e0d6a2165adb
untagged-8ce77308e0d6a2165adb.zip          100%[======================================================================================>] 105.22K   342KB/s    in 0.3s
Debug_Runner.app.zip                       100%[======================================================================================>]  26.93M   799KB/s    in 41s
Debug_Runner.ipa                           100%[======================================================================================>]  26.89M   412KB/s    in 49s
Release_Runner.ipa                         100%[======================================================================================>]  10.54M  1.76MB/s    in 5.2s
./script/ios_device_test.sh --install_ipa
./script/ios_device_test.sh --install_ipa
tmp/Debug_Runner.ipa unpacked to tmp/flutter_ios_build-untagged-8ce77308e0d6a2165adb/build/ios/iphoneos
./script/ios_device_test.sh --test
./script/ios_device_test.sh --test
Running "flutter pub get" in flutter_ios_build-untagged-8ce77308e0d6a2165adb...         0.6s
Using device Maurice’s iPhone.
Starting application: test_driver/main.dart
flutter: Observatory listening on http://127.0.0.1:58329/_3bNbSy_HP8=/
Installing and launching...                                        23.2s
00:00 +0: end-to-end test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:1036/_3bNbSy_HP8=/
[trace] FlutterDriver: Isolate found with number: 813863371
[trace] FlutterDriver: Isolate is paused at start.
[trace] FlutterDriver: Attempting to resume isolate
[trace] FlutterDriver: Waiting for service extension
[info ] FlutterDriver: Connected to Flutter application.
00:04 +0: end-to-end test tap on the floating action button; verify counter
00:05 +1: end-to-end test (tearDownAll)
00:05 +1: All tests passed!
Stopping application instance.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 16, 2019

Notes about running flutter in device farm:

flutter testing
The testing philosophy is somewhat different from many approaches out there. Counter-intuitively, the deliverable .ipa artifact cannot be tested, using traditional or any other method. This is because there are no native widgets in Flutter (most test tools expect access to native widgets). Plus there is no external access to the flutter widgets because everything unnecessary is stripped from the .ipa during the build in the interests of size and performance, and possibly security.

The solution is to build a testable .ipa that does have access to the flutter widgets using commands sent via a port (the observatory). Tests can then be written, in a somewhat traditional way, that results in generating these commands. The tests run on the a host and talk to the testable .ipa via a local port that is forwarded to the observatory port. Incidentally, the same test will run on an iOS or android device (a nice plus).

The closest counterpart I can think of to a testable .ipa is perhaps Selenium WebDriver with the mobile extensions, except that the WebDriver is contained in the testable .ipa. Plus there is no need for Appium-like wrappers around vendor provided automation frameworks(XCUITest, UIAutomation, etc...) since you are already talking to the 'native' flutter widgets.

flutter driver
Flutter Driver is a tool that can take care of the build, connect to the running app and run the test. It is a tool that can run in multiple steps, some of which can be controlled by flags.

When running a test, Flutter Driver normally takes care of everything. Basically, it will run the build of the testable .ipa (really a .app) including signing using local developer (or enterprise, etc...) account, install the testable .app on the iOS device, start the app, which opens a random port on the device to receive commands (the observatory), finds the port, and finally forwards a port on the host to the observatory. Then it will start the test on the host and tell the test which local port to use.

Note: the test is a standalone dart program that simply talks to a remote service (the observatory). In theory, once it knowns how to access the remote service, the test could be running anywhere on any host (macOS, linux, windows), even in any language. In practice, for iOS, it is normally running on a mac with a local device attached. Further, the test has no dependency on flutter or the device type (iOS, android, etc...) or the app it is talking to (other than the wire protocol, the commands).

device farm integration
The challenge when integrating with Device Farm, other than creating the testable .ipa, is to deal with the re-signing, installing and starting on a 'random' device, and establishing the observatory port number. This involves breaking up the steps that Flutter Driver supports between Device Farms in-house, and the Device Farm mac. Hence the experiments.

Note: this testable .ipa is not intended to ever be delivered. It is intended exclusively for testing only. Which is why flutter tools disables creating a testable .ipa and only builds a testable .app (hence the fix to workaround this in my experiments. BTW: it may be possible to apply this fix on the fly, locally, without having to change flutter, which would probably be preferable).

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 17, 2019

@aristeia Looks like there is a problem with installing the testable .ipa on a Device Farm device. The device farm test harness is trying to take a screenshot and erroring-out before starting the run on the mac. This means I cannot currently do test runs on the mac using the testable .ipa.

Using testable .ipa:
Screen Shot 2019-06-16 at 11 27 13 AM
link to job
Using a non-testable .ipa does not have this problem:
Screen Shot 2019-06-16 at 11 28 19 AM
link to job

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 17, 2019

@aristeia I streamlined the testing of the testable .ipa artifact (from above). Instead of cloning the project and building the artifacts on travis etc..., it should now be possible to download and resign the testable .ipa artifact using your local certificate and provisioning profile (developer, enterprise, ad-hoc etc..) and run the test.

This can perhaps facilitate further in-house testing at Device Farm. In particular, experimenting with unbundling the testable .ipa, installing the testable .app on the device, and getting the observatory port (per the overall process described above).

Flutter Driver could be modified to install and start the testable .app and return the observatory port with something like:

flutter drive --no-build --startup-only test_driver/main.dart

This would be run by Device Farm and the returned observatory port exported as an env var to the mac.

Then to run a test on the mac, Flutter Driver could be modified to use the observatory to run a test with something like:

flutter drive --observatory_port=$FLUTTER_OBSERVATORY_PORT test_driver/main_test.dart

simplified testing of testable .ipa
Download the updated script from:
https://github.com/mmcc007/flutter_ios_build/blob/master/script/ios_device_test.sh
and the dependent script:
https://github.com/mmcc007/flutter_ios_build/blob/master/script/resign.sh
The commands are as follows:

/script/ios_device_test.sh --download untagged-8ce77308e0d6a2165adb
./script/ios_device_test.sh --resign ipa "iPhone Developer: Maurice McCabe (5UG6C3962Q)" --provisioning /Users/jenkins/Library/MobileDevice/Provisioning\ Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
(after re-signing, it unbundles the re-signed testable .ipa and places is the directory expected by Flutter Driver)
(should be able to replace with enterprise cert and provisioning profile)
./script/ios_device_test.sh --test
(Flutter Driver will install the testable .app on the device, get the observatory port, forward the port and call the test)

test logs

./script/ios_device_test.sh --download untagged-8ce77308e0d6a2165adb
untagged-8ce77308e0d6a2165adb.zip              [ <=>                                                                                   ] 105.22K   695KB/s    in 0.2s
Debug_Runner.app.zip                       100%[======================================================================================>]  26.93M  5.37MB/s    in 5.4s
Debug_Runner.ipa                           100%[======================================================================================>]  26.89M  5.56MB/s    in 5.8s
Release_Runner.ipa                         100%[======================================================================================>]  10.54M  3.62MB/s    in 2.9s
unpacking project src to /tmp/flutter_test/test_app/flutter_ios_build-untagged-8ce77308e0d6a2165adb
./script/ios_device_test.sh --resign ipa "iPhone Developer: Maurice McCabe (5UG6C3962Q)" --provisioning /Users/jenkins/Library/MobileDevice/Provisioning\ Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovisiont
Original file: '/tmp/flutter_test/artifacts/Debug_Runner.ipa'
Certificate: 'iPhone Developer: Maurice McCabe (5UG6C3962Q)'
Output file name: '/tmp/flutter_test/resign_testable_app_or_ipa/Debug_Runner.ipa'
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Print: Entry, ":CFBundleDisplayName", Does Not Exist
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Current bundle identifier is: 'com.orbsoft.counter'
New bundle identifier will be: 'com.orbsoft.counter'
Validating the new provisioning profile: /Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
security: SecPolicySetValue: One or more parameters passed to a function were not valid.
Profile app identifier prefix is 'ET2VMHJPVM'
Profile team identifier is 'ET2VMHJPVM'
Resigning embedded frameworks using certificate: 'iPhone Developer: Maurice McCabe (5UG6C3962Q)'
Resigning '_floatsignTemp/Payload/Runner.app/Frameworks/App.framework'
_floatsignTemp/Payload/Runner.app/Frameworks/App.framework: replacing existing signature
_floatsignTemp/Payload/Runner.app/Frameworks/App.framework: signed bundle with Mach-O universal (armv7 arm64) [io.flutter.flutter.app]
Resigning '_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework'
_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework: replacing existing signature
_floatsignTemp/Payload/Runner.app/Frameworks/Flutter.framework: signed bundle with Mach-O universal (armv7 arm64) [io.flutter.flutter]
Fixing nested app and extension references
Extracting entitlements from provisioning profile
Resigning application using certificate: 'iPhone Developer: Maurice McCabe (5UG6C3962Q)'
and entitlements from provisioning profile: /Users/jenkins/Library/MobileDevice/Provisioning Profiles/408fa202-3212-469d-916c-c7f2ae4d083a.mobileprovision
Creating an archived-expanded-entitlements.xcent file for Xcode 9 builds or earlier
_floatsignTemp/Payload/Runner.app: replacing existing signature
_floatsignTemp/Payload/Runner.app: signed app bundle with Mach-O universal (armv7 arm64) [com.orbsoft.counter]
Repackaging as /tmp/flutter_test/resign_testable_app_or_ipa/Debug_Runner.ipa
Process complete
/tmp/flutter_test/resign_testable_app_or_ipa/Debug_Runner.ipa unpacked to /tmp/flutter_test/test_app/flutter_ios_build-untagged-8ce77308e0d6a2165adb/build/ios/iphoneos
./script/ios_device_test.sh --test
running flutter drive --no-build test_driver/main.dart in /tmp/flutter_test/test_app/flutter_ios_build-untagged-8ce77308e0d6a2165adb
Running "flutter packages get" in flutter_ios_build-untagged-8ce77308e0d6a2165adb...         1.9s
Using device Maurice’s iPhone.
Starting application: test_driver/main.dart
flutter: Observatory listening on http://127.0.0.1:52143/HGvTRoKYxRU=/
Installing and launching...                                        25.6s
00:00 +0: end-to-end test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:1030/HGvTRoKYxRU=/
[trace] FlutterDriver: Isolate found with number: 931248227
[trace] FlutterDriver: Isolate is paused at start.
[trace] FlutterDriver: Attempting to resume isolate
[trace] FlutterDriver: Waiting for service extension
[info ] FlutterDriver: Connected to Flutter application.
00:04 +0: end-to-end test tap on the floating action button; verify counter
00:06 +1: end-to-end test (tearDownAll)
00:06 +1: All tests passed!
Stopping application instance.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 17, 2019

Added a feature to test if uploaded .ipa is a Flutter testable .ipa. This can be used to start the process for handling Flutter tests in Device Farms (per overall process above). See updated:
https://github.com/mmcc007/flutter_ios_build/blob/master/script/ios_device_test.sh

Usage:

$ script/ios_device_test.sh --detect_testable_ipa
Flutter testable .ipa found
$

@aristeia
Copy link

@aristeia Looks like there is a problem with installing the testable .ipa on a Device Farm device. The device farm test harness is trying to take a screenshot and erroring-out before starting the run on the mac. This means I cannot currently do test runs on the mac using the testable .ipa.

Using testable .ipa:
Screen Shot 2019-06-16 at 11 27 13 AM
link to job
Using a non-testable .ipa does not have this problem:
Screen Shot 2019-06-16 at 11 28 19 AM
link to job

Hi Maurice,
This "Screenshot" error detected doesn't have to do with your IPA choice at all, but rather has to do with the device itself. Device farm simply detected that there was an error taking screenshots on that device, which usually indicates that the device needs to be re-trusted to the harness or factory reset. If you give it another try, it could work.

Thanks,
Jon

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 18, 2019

@aristeia It worked on a re-try (this was the first time I had tried with the testable .ipa).

Surprisingly ios-deploy of the unpacked $DEVICEFARM_APP_PATH (testable .ipa) get's passed the verification stage and installs. This is good news, as it may make it simpler to run a flutter test.

However, I'm running into several configuration and permissions related issues.

In general, the configuration of the Device Farm mac is not standard for development and building (especially when compared to a mac on Travis-CI or a local mac):

  1. I cannot upgrade ios-deploy using the installed brew due to permissions.
    To get around this I installed a local brew.

  2. ios-deploy is reporting an error .

    [100%] Installed package build/ios/iphoneos/Runner.app
    ------ Debug phase ------
    Starting debug of 0eaf7884daeb1fbaa0d711b212d01c461cc88124 (D22AP, D22AP, uknownos, unkarch) a.k.a. '9905944756' connected through USB...
    [  0%] Looking up developer disk image
    [ 95%] Developer disk image mounted successfully
    2019-06-18 01:05:20.852 ios-deploy[1787:6925] [ !! ] Unable to locate DeviceSupport directory with suffix 'Symbols'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
    

    This error may be due to missing entries in /Applications/Xcode_10.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport. There may be a workaround for this but cannot be applied due to permissions on the directory.

     drwxrwxr-x  22 root  wheel  748 Oct 19  2018 .
     drwxr-xr-x  10 root  wheel  340 Oct 19  2018 ..
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 10.0
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 10.1
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 10.2
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 10.3
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 11.0
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 11.1
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 11.2
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 11.3
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 11.4
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 12.0
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 12.1 (16B91)
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 8.0
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 8.1
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 8.2
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 8.3
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 8.4
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 9.0
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 9.1
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 9.2
     drwxrwxr-x   4 root  wheel  136 Oct 19  2018 9.3
    

You can see some of the issues I ran into at run
If mac configurations can be resolved, it may be possible to run a flutter test without adding functionality to Device Farm (as described in overall process above)

Edit: I tried with a different device (11.4), with more verbose output from ios-deploy with same result. It's having a hard time handling the DeveloperDiskImage.dmg.

[100%] Installed package build/ios/iphoneos/Runner.app
Hardware Model: D22AP
Device Name: 9902852975
Model Name: D22AP
SDK Name: uknownos
Architecture Name: unkarch
------ Debug phase ------
Starting debug of 22698ea307b124fdbe1b790154455a8b6e8a2795 (D22AP, D22AP, uknownos, unkarch) a.k.a. '9902852975' connected through USB...
Device Class: iPhone
build: 15F79
version: 11.4
DeviceSupport directory '/Applications/Xcode_9_4.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.4 (15F79)/DeveloperDiskImage.dmg' was located. It took 0.00 seconds
Developer disk image: /Applications/Xcode_9_4.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.4 (15F79)/DeveloperDiskImage.dmg
[  0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
Device Class: iPhone
build: 15F79
version: 11.4
version: 11
2019-06-18 12:07:59.805 ios-deploy[1840:7157] [ !! ] Unable to locate DeviceSupport directory with suffix 'Symbols'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!

See related run.
Any idea what this is?

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 19, 2019

@aristeia Great news! I fixed the problem with not finding the symbols by going thru the ios-deploy source and identifying a device-specific hack.

After that ios-deploy was able to start the testable .ipa! I was then able to run a flutter test as normal.

The first Flutter test to run on an iOS device on Device Farm looks like:
ezgif com-gif-maker (1)
Related run.

This confirms that Flutter integration tests can run on Device Farm for both iOS and Android devices. This can be integrated to Sylph using the Device Farm API and can be used in a variety of CI/CD scenarios.

There is much to add to make this ready for production. But the proof of concept is there.

@aristeia
Copy link

This is really cool Maurice, nice job! I can't wait to get a look at this!

This was referenced Jun 20, 2019
@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 20, 2019

@aristeia Implemented the fix for iOS and added support for running Sylph in a CI environment by automatically managing the developer certificate and provisioning profile on the fly (see merges #9 and #10 for details).

The resulting CI build can be seem here:
https://travis-ci.com/mmcc007/sylph/builds/116272945
This build published the resulting Device Farm artifacts here:
https://github.com/mmcc007/sylph/releases/tag/0.0.8
(which includes the video)

Remains to do a Flutter integration test run which includes both iOS and android pools in the same run. Then start making improvements for production quality, like speed, usability, more support for developers, etc...

Please let me know if you have any questions, suggestions, etc...

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 22, 2019

Ran a Flutter integration test on both an iOS and Android pool of devices in a single Sylph run from a local mac and downloaded the respective artifacts for each device.

Also fired off the same Sylph run on travis to demonstrate how running Flutter integration tests performs on Device Farm:
https://travis-ci.com/mmcc007/sylph/builds/116507297
Artifacts:
https://github.com/mmcc007/sylph/releases/tag/0.0.9
Performance can be improved by running the test in parallel on iOS and Android pools.
Further performance enhancements would require more direct support for Flutter on Device Farm (similar to how Appium, etc.. is supported) and perhaps general Device Farm performance improvements.

@mmcc007
Copy link
Owner Author

mmcc007 commented Jun 22, 2019

@aristeia I notice fairly frequent failures in what appears to be the test harness and related areas on Device Farm.

For example, had to run an identical sylph on an iOS and android device three times before getting a successful run:
First run failed on the android device:
Screen Shot 2019-06-22 at 1 12 07 AM
first sylph run: android device
Second run failed on ios device:

Running flutter drive --no-build test_driver/main.dart
No devices found.

second sylph run: ios device

Third sylph run succeeded.

Is this rate of failure expected? If more devices are added to each device pool, should the rate of failure be expected to increase? Or is there some way to manage these failures?

This was referenced Jun 22, 2019
Closed
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimentation experiments with flutter and devices
Projects
None yet
Development

No branches or pull requests

2 participants