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

idb installation of app - best match target version 0.0 error #804

Open
mattadamson opened this issue Nov 6, 2022 · 2 comments
Open

idb installation of app - best match target version 0.0 error #804

mattadamson opened this issue Nov 6, 2022 · 2 comments

Comments

@mattadamson
Copy link

Hi

Has anyone seen this error before or know the root cause please?

The best match /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0/DeveloperDiskImage.dmg: 11.0 is not suitable for 0.0

I'm using an iphone 6s iOS 15.7 device to launch a test application. A few other devices do appear to work though which are nearly identical ie the model and iOS version.

From

https://github.com/facebook/idb/blob/31b6ed0a8c831043601342f0ecbd9ce7b0858594/FBControlCore/Utility/FBDeveloperDiskImage.m

We see this message output

return [[FBControlCoreError
describeFormat:@"The best match %@ is not suitable for %ld.%ld", best, targetVersion.majorVersion, targetVersion.minorVersion]
fail:error];

Because the target version appears to be read as 0.0. I can't see where / how it's reading this as 0.0

Many thanks

@james-3141
Copy link

Yes, we are plagued by this! It is often caused by not having the correct disk image due to not having xCode up to date, but we also see this when we have a large number of physical devices connected. Did you solve your problem?

@james-3141
Copy link

james-3141 commented Jul 5, 2023

I think we may have made progress on this issue, if it is indeed the same one. In FBDevice.m around line 203:

if (!_name || overwrite) {
_name = targetInfo.name;
}
if (!_osVersion || overwrite) {
_osVersion = targetInfo.osVersion;
}
if (_productVersion || overwrite) {
_productVersion = targetInfo.productVersion;
}
if (!_targetType || overwrite) {
_targetType = targetInfo.targetType;
}
if (!_udid || overwrite) {
_udid = targetInfo.udid;
}

Here _productVersion always gets set, getting overwritten with "unknown". A missing '!' ?
Should it be:

if (!_productVersion || overwrite) {
_productVersion = targetInfo.productVersion;
}

This seems to result in the target version being set to 0.0.0 which then results in the wrong disk image being searched for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants