calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

If the DeviceAgent cannot be uninstalled, Calabash does not reinstall it #1284

Closed TeresaP closed 7 years ago

TeresaP commented 7 years ago

Somehow my app got into a state where the DeviceAgent app did not appear to be installed (by looking at the UI). However, if I do ideviceinstaller -l it was listed as an installed app. Uninstalling it via ideviceinstaller or by manually trying to remove it in iExplorer did not work.

I noticed Calabash determined DeviceAgent did not need to be reinstalled:

CTRunner
2017-03-20 13:25:41.862 INFO ShellResult:127 | EXEC: /usr/bin/xcrun codesign --verbose=4 --verify /var/folders/zm/vy74t2t961l2q5rfbyszhkj00000gn/T/1374FA81-054D-42C4-8959-9234ABD90408-32790-0000F1ABE90C7276/DeviceAgent-Runner.app/XCTRunner
2017-03-20 13:25:41.862 ERROR ConsoleWriter:32 | === STDERR ===
2017-03-20 13:25:41.862 ERROR ConsoleWriter:32 | /var/folders/zm/vy74t2t961l2q5rfbyszhkj00000gn/T/1374FA81-054D-42C4-8959-9234ABD90408-32790-0000F1ABE90C7276/DeviceAgent-Runner.app/XCTRunner: valid on disk
/var/folders/zm/vy74t2t961l2q5rfbyszhkj00000gn/T/1374FA81-054D-42C4-8959-9234ABD90408-32790-0000F1ABE90C7276/DeviceAgent-Runner.app/XCTRunner: satisfies its Designated Requirement
2017-03-20 13:25:42.769 INFO ConsoleWriter:22 | Latest version of com.apple.test.DeviceAgent-Runner is installed, not reinstalling.

Manually overwriting it by using this command solved my problem:

ideviceinstaller -i /var/folders/zm/vy74t2t961l2q5rfbyszhkj00000gn/T/1374FA81-054D-42C4-8959-9234ABD90408-32790-0000F1ABE90C7276/DeviceAgent-Runner.app

I don't know how you would be able to determine the state I was in, but I do know it was difficult to track down so I thought it should be documented.

TeresaP commented 7 years ago

I hope this bug is in the right place. It seemed to be only applicable to iOS but perhaps should be in a different project.

jmoody commented 7 years ago

Thanks for reporting.

Are you still forcing a DeviceAgent uninstall between Scenarios (or periodically)?

If so, you should try without uninstalling. We've resolved the DeviceAgent stalls.

TeresaP commented 7 years ago

Yes I was. I will pass that info along to the new team. Thanks!