ios-control / ios-deploy

Install and debug iPhone apps from the command line, without using Xcode
GNU General Public License v3.0
3.41k stars 468 forks source link

"Unable to find bundle with id" but the bundle_id is listed with "list_bundle_id" argument #494

Open jjcaballero opened 3 years ago

jjcaballero commented 3 years ago

Expected behavior:

Being able to use the bundle_id with "download" and "upload" arguments.

Actual behavior.

The bundle_id is not recognized when using "download" and "upload" arguments. "exists" argument does detect the bundle_id though. Note I find the same behaviour for all applications deployed with ios-deploy. And this stopped working all of a sudden. Also, I can "uninstall_only", check with "exists" that bundle_id does not exist. Then, launch again the application and the "exists" argument indicates that bundle_id is back again. But "download" or "upload" won't work.

Steps to reproduce the problem

$ ios-deploy --id 00008030-XXXX --bundle_id com.company.hello-world --exists
[....] Waiting for iOS device to be connected
[....] Using 00008030-XXXX  (N104AP, iPhone 11, iphoneos, arm64e) a.k.a. 'iPhone'.
true
$ ios-deploy --id 00008030-XXXX --list_bundle_id | grep com.company.hello-world
com.company.hello-world
$ ios-deploy --id 00008030-XXXX --bundle_id com.company.hello-world --download=/Documents
[....] Waiting for iOS device to be connected
[....] Using 00008030-XXXX (N104AP, iPhone 11, iphoneos, arm64e) a.k.a. 'iPhone'.
2020-12-14 04:55:07.119 ios-deploy[10508:12777655] [ !! ] Unable to find bundle with id: com.company.hello-world
$ touch file.txt && ios-deploy --id 00008030-001E64811A3A802E --bundle_id com.company.hello-world-cte --upload=file.txt --to=/Documents/.
[....] Waiting for iOS device to be connected
[....] Using 00008030-XXXX (N104AP, iPhone 11, iphoneos, arm64e) a.k.a. 'iPhone'.
2020-12-14 04:56:56.475 ios-deploy[10514:12777993] [ !! ] Unable to find bundle with id: com.company.hello-world

System Specs

Please run the commands below in your Terminal.app and include it in the issue. Check when done and include results below.

Please, is there anything I can do to fix this and go back to the normal behaviour we were having before? I have seen the following issues which seem to relate to this but without any actual resolution: https://github.com/ios-control/ios-deploy/issues/309 and https://github.com/ios-control/ios-deploy/issues/241 Right now, this is a show-stopper for our current workflow. Any help will be more than welcome. Thanks!

gabebear commented 3 years ago

We didn't intend to change this behavior. Do you know what version of ios-deploy this was changed in?

jjcaballero commented 3 years ago

@gabebear thanks. The version of ios-deploy is the same. I am not aware of any other change. It seems we are facing the same problem described in: https://github.com/ios-control/ios-deploy/issues/241 After rebooting the device, ios-deploy was able to locate the bundle-id again for a while in terms of download/upload tasks. Unfortunately, the error happened again a few days later.

We are connecting to this device remotely and due to the pandemic crisis, we will need to keep doing this. That's why the workaround of rebooting is quite inconvenient for us.

I have added "--verbose" argument, I am afraid there is no additional information which can be helpful:

[....] Waiting for iOS device to be connected
Handling device type: 1
Already found device? 0
Hardware Model: N104AP
Device Name: iPhone
Model Name: iPhone 11
SDK Name: iphoneos
Architecture Name: arm64e
Product Version: 13.3
Build Version: 17C54
[....] Using 00008030-001E64811A3A802E (N104AP, iPhone 11, iphoneos, arm64e) a.k.a. 'iPhone'.
2021-01-12 09:54:37.708 ios-deploy[62010:3147431] [ !! ] Unable to find bundle with id: com.company.hello-world

Please, let me know if I can provide any other relevant information.

Note that "--list" argument is also not able to list all files. All in all, "--download", "--upload" and "--list" arguments can't find the bundle id.

ryanluoo commented 3 years ago

It seems that your app doesn't allow the /Documents access. Can you try if you can use iTunes/Finder to browse your app's /Documents first ?

jjcaballero commented 3 years ago

We are facing this problem again after this weekend. All of a sudden again. I have found something interesting, with XCode if I go to Windows --> Device and Simulators, and try to Download Container... of any installed app, I get the following error: image

Thus, it seems that we can't access the app content from anywhere.

@ryanluoo, when I use Finder and click the iPhone, I don't see anything special, just like a blank screen and a Get Started button for iTunes. How can someone access the /Documents app folder from Finder?

ryanluoo commented 2 years ago

@jjcaballero Hi if the developer enable UIFileSharingEnabled in Xcode, then the app will allow access to its /Documents folder .

For all the apps that been enabled UIFileSharingEnabled, the Finder will list them in the Files tab image