ionic-team / native-run

Utility for running native binaries on iOS and Android devices and simulators/emulators
MIT License
127 stars 21 forks source link

Stuck at running on device when installed before #83

Open Juarrow opened 5 years ago

Juarrow commented 5 years ago

Version:

0.2.9

Description:

While running native-run ios --verbose --app platforms/ios/build/device/Name.ipa --device native-run seems to get stuck and nothing happens.

The iPhone is unlocked. And the app has been installed via ionic cordova run ios --device the day before.

After removing the app, the command works again.

Command Output:

client:lockdownd startService: com.apple.mobile.installation_proxy +2s
  protocol:lockdown socket write: {"Request":"StartService","Service":"com.apple.mobile.installation_proxy"} +2s
  protocol:lockdown Response: {"Port":52399,"Request":"StartService","Service":"com.apple.mobile.installation_proxy"} +6ms
  client:usbmuxd connectUsbmuxdSocket +2s
  client:usbmuxd connect: 1 on port 52399 +0ms
  protocol:usbmux socket write: {"messageType":"Connect","extraFields":{"DeviceID":1,"PortNumber":45004}} +2s
  protocol:usbmux Response: {"MessageType":"Result","Number":0} +1ms
  client:installation_proxy installApp, packagePath: PublicStaging/Name.app, bundleId: de.name-other.Name +0ms
  protocol:lockdown socket write: {"Command":"Install","PackagePath":"PublicStaging/Name.app","ClientOptions":{"CFBundleIdentifier":"de.name-other.Name","ApplicationsType":"Any","PackageType":"Developer"}} +2ms

Environment Info:

Ionic:

   Ionic CLI          : 5.4.4 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.9
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-webview 1.2.1, (and 18 other plugins)

Utility:

   cordova-res : 0.6.0 (update available: 0.8.0)
   native-run  : 0.2.9 

System:

   Android SDK Tools : 26.1.1 (/Users/xxx/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v12.6.0 (/usr/local/Cellar/node/12.6.0/bin/node)
   npm               : 6.10.2
   OS                : macOS Catalina
   Xcode             : Xcode 11.1 Build version 11A1027
Juarrow commented 4 years ago

Additional Info: the iPhone needs to be restarted and then the app can be installed.

Otherwise it will not work.

Juarrow commented 4 years ago
native-run] Error: There was an error installing app
[native-run]     at /usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/installation_proxy.js:59:24
[native-run]     at LockdownProtocolReader.callback (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/protocol.js:91:21)
[native-run]     at LockdownProtocolReader.onData (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/protocol.js:52:26)
[native-run]     at Socket.emit (events.js:203:13)
[native-run]     at addChunk (_stream_readable.js:294:12)
[native-run]     at readableAddChunk (_stream_readable.js:275:11)
[native-run]     at Socket.Readable.push (_stream_readable.js:210:10)
[native-run]     at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
tlancina commented 4 years ago

@Incubbus it seems like there are 2 different problems here: the being stuck, and the install error with the horrifically unhelpful message.

I have encountered the being stuck on install quite a few times when testing iOS 13, and I am not sure what causes it. If you wait long enough it seems to always eventually install (but sometimes takes minutes). Killing the current install and trying again usually seemed to work much more quickly.

If you have steps to reproduce the second error, would you mind submitting a new issue with them? Thank you!

Juarrow commented 4 years ago

@Incubbus it seems like there are 2 different problems here: the being stuck, and the install error with the horrifically unhelpful message.

I have encountered the being stuck on install quite a few times when testing iOS 13, and I am not sure what causes it. If you wait long enough it seems to always eventually install (but sometimes takes minutes). Killing the current install and trying again usually seemed to work much more quickly.

If you have steps to reproduce the second error, would you mind submitting a new issue with them? Thank you!

As soon as i encounter the issue again, i'll be able to recall the steps again, i think. But it could take a while, since i'm working on an Android version at the moment.

skol-pro commented 4 years ago

I encountered the exact same problem, until I tried to open the app while being stuck on native-run, and TADA !

chrux commented 4 years ago

I haven't been able to install the app using native-run on iOS, it stuck in the command and nothing happens

linkito87 commented 4 years ago

I haven't been able to install the app using native-run on iOS, it stuck in the command and nothing happens

I have the same issue... command starts and nothing happens...

tlancina commented 4 years ago

@chrux @linkito87 using latest native-run (0.2.9)?

If anyone has steps to reproduce this, please let us know! I would love to fix it.

michelepatrassi commented 4 years ago

Just updated to iOS 13.2.3 and running this command

ionic cordova run ios -l --device --external -- --iCloudContainerEnvironment=Development

got stuck at

native-run ios --app platforms/ios/build/device/Homerun.ipa --device --forward 8101:8101

with native run 0.2.9. Was not happening yesterday before the minor update (I already have iOS 13).

Quick update: I simply run the same command again and it worked 🤷‍♀️ didn't do any changes except unplugging and plugging my device again and re-running the command.

Quick update 2: got stuck on this again.

I updated native-run, ios-deploy and restarted the device but nothing.

Just for the sake of trying, I opened a new tab and executed (while ionic cordova run ios ... was still running) the last command native-run ios --app platforms/ios/build/device/YOUR_APP_NAME.ipa --device --forward 8100:8100 and it worked 🤷‍♀️🤷‍♀️

iChristosK commented 4 years ago

ARCHIVE SUCCEEDED

Running command: xcodebuild -exportArchive -archivePath adiMarine.xcarchive -exportOptionsPlist /Users/Christos/Gitlab/Ionic/ios_adimarine/adimarine_ios/platforms/ios/exportOptions.plist -exportPath /Users/Christos/Gitlab/Ionic/ios_adimarine/adimarine_ios/platforms/ios/build/device 2020-05-20 13:52:01.692 xcodebuild[29097:358894] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/kh/szxwthsj7s3g02zzzkn9bkb40000gq/T/adiMarine_2020-05-20_13-52-01.689.xcdistributionlogs'. Exported adiMarine to: /Users/Christos/Gitlab/Ionic/ios_adimarine/adimarine_ios/platforms/ios/build/device EXPORT SUCCEEDED

native-run ios --app platforms/ios/build/device/adiMarine.ipa --device

Stuck there for hours.

Please help.