Sample Header Ad - 728x90

cfgutil get-icon-layout throws NSInvalidArgumentException in insertObject:atIndex: object cannot be nil

1 vote
0 answers
53 views
I want to retrieve the home screen layout of an iPad attached with USB-C cable to my macOS device. But the command cfgutil get-icon-layout throws an _NSInvalidArgumentException_ in _insertObject:atIndex_ because _object cannot be nil_:
% cfgutil get-icon-layout        
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000019d81f2ec __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019d306788 objc_exception_throw + 60
	2   CoreFoundation                      0x000000019d74a934 -[__NSArrayM insertObject:atIndex:] + 1288
	3   cfgutil                             0x00000001002bc1e0 cfgutil + 49632
	4   cfgutil                             0x00000001002bc0d0 cfgutil + 49360
	5   cfgutil                             0x00000001002bc0d0 cfgutil + 49360
	6   cfgutil                             0x00000001002bc4e0 cfgutil + 50400
	7   cfgutil                             0x00000001002cc6c4 cfgutil + 116420
	8   cfgutil                             0x00000001002c7bd0 cfgutil + 97232
	9   dyld                                0x000000019d3420e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      cfgutil get-icon-layout
Any ideas what causes this or how to circumvent? I also tried with -C and -K params since it's supervised, and the different --format json/text/plist params, to no avail. Other commands work fine, the version is cfgutil 2.17 (906)
% cfgutil list
Type: iPad13,18	ECID: 0xMYECID12345678	UDID: 00001234-56789ABCDEFFFFFF
0010281E02A3A01E Location: 0x100000 Name: Given Sur

% cfgutil version
cfgutil 2.17 (906)
Asked by cachius (301 rep)
Jul 2, 2024, 03:07 PM
Last activity: Jul 2, 2024, 03:22 PM