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

To fix "The best match 11.0 is not suitable for 0.0" #839

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

james-3141
Copy link

@james-3141 james-3141 commented Jul 6, 2023

Motivation

We operate an automated test farm of around 40 iOS devices. We have struggled with idb trying to load the Developer Disk Image for iOS V0.0 therefore failing with the error text "The best match /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0/DeveloperDiskImage.dmg: 11.0 is not suitable for 0.0".

This only seemed to occur when a large number of device are connected to the system (Mac mini M1) with some devices working and others not this being largely dependent on the order that the devices were connected to the host.

This seems to be a simple typo causing the value of _productVersion to be overwritten by all calls to cacheValuesFromInfo. The value is correctly set initially, but sometimes a later call to the function is made which overwrites it with 'undefined'. This value is later used to derive the target version to choose the developer disk image.

I have commented on issue #804 to which this may relate.

Test Plan

We have a farm of all currently supported iOS devices. Before the fix ~30-50% of the devices would exhibit this issue. After the fix, none of the devices exhibit this issue. I have attached a picture of a bit of the farm for context.

We have a test script to run through all the devices running our app on each of them and recording any errors. There are none relating to the issue after the fix compared to failures on all test runs prior.

To replicate this:

Connect 16+ different iOS devices to host and loop over all the devices connected running in turn:
idb connect --udid xxxxxxxx-xxxxxxxxxxxxxxx
idb launch my.app.undertest
idb terminate my.app.undertest
idb disconnect

On successful test should be no occurrence of the error :

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

We are running a USB 2.0 hub tree with 48 USB connections hosted by a Mac Mini M1. All devices are different in our test fixture.

The problem starts to occur in our set up occurs if more than ~8 devices are connected but that is not entirely consistent. An individual 16 port hub (internally 5 x 4 port hubs) shows this problem when all ports are used.

IMG_9557

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/idb, and link to your PR here.)

…ge error, added missing invert (!) operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants