Ionic CLI and livreload problems since upgrade to MacOS Sierra and latest CLI versions


#1

Since performing a clean install of MacOS Sierra and installing the latest versions of node, ionic, cordova etc live reload doesn’t work on device for me. I’m seeing a variety of problems depending on the command used / whether or not a device is connected. First, here’s my configuration

Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

Installed platforms:
ios 4.3.0
Available platforms:
amazon-fireos ~3.6.3 (deprecated)
android ~6.0.0
blackberry10 ~3.8.0
browser ~4.1.0
firefoxos ~3.6.3
osx ~4.0.1
webos ~3.7.0

And here are the various test scenarios and expected results;

With iPhone 6S 10.1.1 connected

1. Command: ionic run ios -l -c -s
Build: SUCCEEDED
Logged Error(s):
Can’t access app path ‘/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app’ : No such file or directory.
Error: Error code 253 for command: ios-deploy with args: --justlaunch,–no-wifi,-d,-b,/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app
Comments: The build/device directory is indeed not created during the build process. I presume as the --device flag is missing from the run command

2. Command: ionic run ios --device -l -c -s
Build: HANGS
Logged Error(s): None
Comments: With the --device flag set the build locks up part way through. The specific command that it locks up on is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang (with a whole load of parameters that I’ve removed from here for legibility)

3. Command: ionic run ios --device -c -s
Build: CRASHES WITHOUT ERROR
Logged Error(s): None
Comments: Without the live reload command, the build phase quits out on the same command as in (2). No error is logged out and the shell returns to the prompt, sometimes even clipping the output part way through a word

4. Command: ionic run ios
Build: SUCCEEDED
Logged Error(s): None
Comments: As with (1), two errors are thrown when the build completes and an attempt is made to install the app on the device.
Can’t access app path ‘/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app’ : No such file or directory.
Error: Error code 253 for command: ios-deploy with args: --justlaunch,–no-wifi,-d,-b,/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app
Comments: The build/device directory is indeed not created during the build process. I presume as the --device flag is missing from the run command

5. Command: cordova run ios --device
Build: SUCCEEDED
Logged Error(s): None
Comments: The app builds correctly and is loaded on the device. Everything functions as expected, with no livereload functionality.

Without a device connected

6. Command: ionic run ios -l -c -s
Build: SUCCEEDED
Logged Error(s): None
Comments: The build succeeds, the simulator is launched and LiveReload works as expected

7. Command: ionic run ios --device -l -c -s
Build: HANGS
Logged Error(s): None
Comments: Same behaviour as (2). The build hangs on the same command and never completes. No error is logged.

8. Command: ionic run ios
Build: SUCCEEDED
Logged Error(s): None
Comments: The app builds correctly and is loaded in the simulator. Everything functions as expected, with no live reload functionality.

9. Command: cordova run ios
Build: SUCCEEDED
Logged Error(s): None
Comments: The app builds correctly and is loaded in the simulator. Everything functions as expected, with no live reload functionality.

And finally …

To add further confusion, the following test scenario works with a device connected …

10. Command: ionic run ios -l -c -s
Build: SUCCEEDED
Logged Error(s):
2016-11-22 10:13:18.913 ios-deploy[29758:1899141] [ !! ] Can’t access app path ‘/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app’ : No such file or directory
Error: Error code 253 for command: ios-deploy with args: --justlaunch,–no-wifi,-d,-b,/Users/MyUsername/Development/TestApp/platforms/ios/build/device/TestApp.app
Comments: If I now open the platforms/ios folder in Xcode and build to the connected device, the build completes and installs to device, and livereload functionality works as intended.

Can anyone shine any light on this? Although (10) offers a workaround for now I’d really like to understand why so many of the CLI commands are failing and hanging.

Any help appreciated.


#2

Did you ever figure this out… i am having the exact same issue