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

Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '", executing any command on the iPod Touch 6 #237

Open
maurjiu opened this issue Nov 2, 2018 · 5 comments

Comments

@maurjiu
Copy link

maurjiu commented Nov 2, 2018

An exception occurs when more than one physical device is connected to the mac.

/var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager version -j
{
"VERSION" : "3.2.1",
"GIT_REMOTE_ORIGIN" : "https://github.com/calabash/iOSDeviceManager.git",
"GIT_BRANCH" : "HEAD",
"GIT_SHORT_REVISION" : "59b9562"
}

1. Test-case:

  1. Сonnect one physical device
  2. Perform a check:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager is-installed /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result: true
  3. Сonnect two physical devices
  4. Perform a check:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager is-installed /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    2018-11-02 14:41:03.431 iOSDeviceManager[58422:3555264] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    *** First throw call stack:
    (
    0 CoreFoundation 0x00007fff441f343d __exceptionPreprocess + 256
    1 libobjc.A.dylib 0x00007fff70104720 objc_exception_throw + 48
    2 CoreFoundation 0x00007fff44116da9 -[__NSSingleObjectArrayI dealloc] + 0
    3 FBControlCore 0x000000010ae1c78d -[FBOSVersion number] + 141
    4 FBControlCore 0x000000010ae48260 FBiOSTargetComparison + 384
    5 FBDeviceControl 0x000000010af06377 -[FBDevice compare:] + 55
    6 CoreFoundation 0x00007fff4415bc18 __CFSimpleMergeSort + 77
    7 CoreFoundation 0x00007fff4415bb83 CFSortIndexes + 418
    8 CoreFoundation 0x00007fff44179756 -[NSArray sortedArrayFromRange:options:usingComparator:] + 699
    9 CoreFoundation 0x00007fff441ac682 -[NSArray sortedArrayUsingSelector:] + 151
    10 FBDeviceControl 0x000000010af0385b -[FBDeviceSet allDevices] + 155
    11 FBDeviceControl 0x000000010af035f5 -[FBDeviceSet query:] + 165
    12 FBDeviceControl 0x000000010af0372b -[FBDeviceSet deviceWithUDID:] + 203
    13 iOSDeviceManager 0x000000010ad836a0 +[PhysicalDevice withID:] + 159
    14 iOSDeviceManager 0x000000010ad8c1fb +[Device withID:] + 118
    15 iOSDeviceManager 0x000000010ad8f567 +[Command deviceFromArgs:] + 130
    16 iOSDeviceManager 0x000000010ad8170f +[IsInstalledCommand execute:] + 48
    17 iOSDeviceManager 0x000000010ad9207f +[CLI process:] + 1111
    18 iOSDeviceManager 0x000000010ad7d7d5 main + 121
    19 libdyld.dylib 0x00007fff711d2085 start + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    Abort trap: 6

2. Test-case

  1. Сonnect one physical device
  2. Install app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager install /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    Application com.apple.test.DeviceAgent-Runner is not installed on 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Installed com.apple.test.DeviceAgent-Runner version: 1.3.1 / 1537307478 to 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
  3. Uninstall app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager uninstall "com.apple.test.DeviceAgent-Runner" -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result: without output. DeviceAgent successfully removed from device
  4. Сonnect two physical devices
  5. Install app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager install /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    2018-11-02 14:56:33.123 iOSDeviceManager[58586:3559848] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    *** First throw call stack:
    (
    0 CoreFoundation 0x00007fff441f343d __exceptionPreprocess + 256
    1 libobjc.A.dylib 0x00007fff70104720 objc_exception_throw + 48
    2 CoreFoundation 0x00007fff44116da9 -[__NSSingleObjectArrayI dealloc] + 0
    3 FBControlCore 0x0000000103e6878d -[FBOSVersion number] + 141
    4 FBControlCore 0x0000000103e94260 FBiOSTargetComparison + 384
    5 FBDeviceControl 0x0000000103f55377 -[FBDevice compare:] + 55
    6 CoreFoundation 0x00007fff4415bc18 __CFSimpleMergeSort + 77
    7 CoreFoundation 0x00007fff4415bb83 CFSortIndexes + 418
    8 CoreFoundation 0x00007fff44179756 -[NSArray sortedArrayFromRange:options:usingComparator:] + 699
    9 CoreFoundation 0x00007fff441ac682 -[NSArray sortedArrayUsingSelector:] + 151
    10 FBDeviceControl 0x0000000103f5285b -[FBDeviceSet allDevices] + 155
    11 FBDeviceControl 0x0000000103f525f5 -[FBDeviceSet query:] + 165
    12 FBDeviceControl 0x0000000103f5272b -[FBDeviceSet deviceWithUDID:] + 203
    13 iOSDeviceManager 0x0000000103dd06a0 +[PhysicalDevice withID:] + 159
    14 iOSDeviceManager 0x0000000103dd91fb +[Device withID:] + 118
    15 iOSDeviceManager 0x0000000103ddc567 +[Command deviceFromArgs:] + 130
    16 iOSDeviceManager 0x0000000103dd3cad +[InstallAppCommand execute:] + 321
    17 iOSDeviceManager 0x0000000103ddf07f +[CLI process:] + 1111
    18 iOSDeviceManager 0x0000000103dca7d5 main + 121
    19 libdyld.dylib 0x00007fff711d2085 start + 1
    20 ??? 0x0000000000000005 0x0 + 5
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    Abort trap: 6
@maurjiu maurjiu changed the title Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '" when installed on a physical device Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '", executing any command on the physical device Nov 2, 2018
@jmoody
Copy link
Contributor

jmoody commented Nov 5, 2018

Is one of the devices an iPhone XS, XR, or XS Plus?

@jmoody
Copy link
Contributor

jmoody commented Nov 5, 2018

Cannot reproduce with non-iPhone XS, XR, or XS Plus devices.

@jmoody
Copy link
Contributor

jmoody commented Nov 5, 2018

I cannot reproduce with an iPhone XS attached. (iPhone XS device identifiers are currently not supported)

@maurjiu Can you provide this information:

  • Xcode version
  • macOS version
  • model and iOS version for the devices you are using

@maurjiu
Copy link
Author

maurjiu commented Nov 9, 2018

Xcode - Version 10.0 (10A255)
macOS - Version 10.14 (Mojave)

I tried combinations:

  1. iPhone 6 Plus iOS 10.2.1 and iPad Air 2 iOS 10.3.2 - bug not reproduced
  2. iPhone 6 Plus iOS 10.2.1 and iPhone X iOS 11.4.1 - bug not reproduced
  3. iPhone 6 Plus iOS 10.2.1 and iPod Touch 6 generation iOS 11.0.3 - bug reproduced
  4. iPhone X iOS 11.4.1 and iPod Touch 6 generation iOS 11.0.3 - bug reproduced

Problem in iPod Touch 6 generation iOS 11.0.3

@maurjiu maurjiu changed the title Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '", executing any command on the physical device Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '", executing any command on the iPod Touch 6 Nov 9, 2018
@jmoody
Copy link
Contributor

jmoody commented Nov 9, 2018

Excellent job reproducing. I will see if I can reproduce locally.

💯

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