There seems to be another bug in the Calibre/IOSRA interface: start Calibre without any idevice connected, and I get the error "Marvin XD requires the IOS reader application plugin to be installed".
Debug log:
Spoiler:
calibre Debug log
calibre 2.11 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.8
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
DEBUG: 0.0 iOSReaderApp:initialize(v1.4.4)
DEBUG: 0.0 iOSReaderApp:compile_ui()
DEBUG: 0.0 iOSReaderApp:_init_prefs(prefs created under v1.4.4)
DEBUG: 0.0 debug_libimobiledevice: True
DEBUG: 0.0 debug_plugin: True
DEBUG: 0.0 development_mode: False
DEBUG: 0.0 device_booklist_cache_limit: 10
DEBUG: 0.0 device_booklist_caching: False
DEBUG: 0.0 kindle_enabled_formats: [u'MOBI', u'PDF']
DEBUG: 0.0 kindle_supported_formats: [u'MOBI', u'PDF']
DEBUG: 0.0 marvin_edit_collections_cb: True
DEBUG: 0.0 marvin_protect_rb: False
DEBUG: 0.0 marvin_replace_rb: True
DEBUG: 0.0 marvin_update_rb: False
DEBUG: 0.0 plugin_diagnostics: True
DEBUG: 0.0 preferred_reader_app: u'Marvin'
DEBUG: 0.0 libiMobileDevice:__init__()
DEBUG: 0.0 libiMobileDevice:load_library(Windows)
DEBUG: 0.0 libimobiledevice loaded from 'libimobiledevice.dll'
DEBUG: 0.0 libplist loaded from 'libplist.dll'
DEBUG: 0.0 iOSReaderApp:_get_connected_device_info()
DEBUG: 0.0 libiMobileDevice:get_device_list()
DEBUG: 0.0 libiMobileDevice:_idevice_get_device_list()
DEBUG: 0.0 ['2d52bb816168efbae50a1f5aceee3cca041e207d']
DEBUG: 0.0 libiMobileDevice:connect_idevice()
DEBUG: 0.0 libiMobileDevice:_idevice_new()
DEBUG: 0.0 conn_type: CONNECTION_USBMUXD
DEBUG: 0.0 udid: 2d52bb816168efbae50a1f5aceee3cca041e207d
DEBUG: 0.0 libiMobileDevice:_lockdown_client_new_with_handsha ke()
DEBUG: 2.1 libiMobileDevice:_lockdown_get_device_name()
DEBUG: 2.3 device_name: Adrian’s iPad
DEBUG: 2.3 libiMobileDevice:_lockdown_start_service(com.apple .mobile.installation_proxy)
DEBUG: 2.6 libiMobileDevice:get_preferences()
DEBUG: 2.6 libiMobileDevice:_lockdown_get_value()
DEBUG: 2.6 libiMobileDevice:disconnect_idevice(Adrian’s iPad)
DEBUG: 2.6 device already disconnected
DEBUG: 2.6 libiMobileDevice:mount_ios_media_folder()
DEBUG: 2.6 libiMobileDevice:_idevice_new()
DEBUG: 2.6 conn_type: CONNECTION_USBMUXD
DEBUG: 2.6 udid: 2d52bb816168efbae50a1f5aceee3cca041e207d
DEBUG: 2.6 libiMobileDevice:_lockdown_client_new_with_handsha ke()
DEBUG: 3.9 libiMobileDevice:_lockdown_start_service(com.apple .afc)
DEBUG: 4.2 libiMobileDevice:_afc_client_new()
DEBUG: 4.8 libiMobileDevice:_lockdown_client_free()
DEBUG: 5.1 libiMobileDevice:_afc_get_device_info()
DEBUG: 5.2 Model: iPad1,1
DEBUG: 5.2 FSBlockSize: 8192
DEBUG: 5.2 FSFreeBytes: 20351328256
DEBUG: 5.2 FSTotalBytes: 30666899456
DEBUG: 5.2 libiMobileDevice:_afc_client_free()
DEBUG: 5.2 libiMobileDevice:_idevice_free()
DEBUG: 5.2 mounting 'com.appstafarian.MarvinIP'
DEBUG: 5.2 libiMobileDevice:mount_ios_app(com.appstafarian.Ma rvinIP)
DEBUG: 5.2 libiMobileDevice:_idevice_new()
DEBUG: 5.2 conn_type: CONNECTION_USBMUXD
DEBUG: 5.2 udid: 2d52bb816168efbae50a1f5aceee3cca041e207d
DEBUG: 5.2 libiMobileDevice:_lockdown_client_new_with_handsha ke()
DEBUG: 6.5 libiMobileDevice:_lockdown_get_device_name()
DEBUG: 6.7 device_name: Adrian’s iPad
DEBUG: 6.7 libiMobileDevice:_lockdown_start_service(com.apple .mobile.house_arrest)
DEBUG: 7.0 libiMobileDevice:_house_arrest_client_new()
DEBUG: 7.6 libiMobileDevice:_house_arrest_send_command(comman d=u'VendContainer' appid='com.appstafarian.MarvinIP')
DEBUG: 7.6 libiMobileDevice:_house_arrest_get_result()
Traceback (most recent call last):
File "calibre_plugins.ios_reader_apps.__init__", line 1223, in _get_connected_device_info
File "site-packages\calibre\devices\idevice\libimobiledevice. py", line 536, in mount_ios_app
File "site-packages\calibre\devices\idevice\libimobiledevice. py", line 1269, in _house_arrest_get_result
File "site-packages\calibre\devices\idevice\parse_xml.py", line 306, in parse
File "site-packages\calibre\devices\idevice\parse_xml.py", line 276, in _parse_using_etree
PropertyListParseError: no element found: line 1, column 0
DEBUG: 7.6 iOSReaderApp:_get_connected_device_info(ERROR: PropertyListParseError: no element found: line 1, column 0)
Failed to initialize plugin: iOS reader applications (1, 4, 4)
Failed to initialize plugin: u'C:\\Users\\Adrian\\AppData\\Roaming\\calibre\\pl ugins\\iOS reader applications.zip'
Traceback (most recent call last):
File "site-packages\calibre\customize\ui.py", line 590, in initialize_plugins
File "site-packages\calibre\customize\ui.py", line 557, in initialize_plugin
InvalidPlugin: Initialisation of plug-in Traceback (most recent call last):
File "site-packages\calibre\customize\ui.py", line 551, in initialize_plugin
File "calibre_plugins.ios_reader_apps.__init__", line 910, in initialize
File "calibre_plugins.ios_reader_apps.__init__", line 1239, in _get_connected_device_info
InitialConnectionError: Unable to connect to iDevice
failed with traceback:
Traceback (most recent call last):
File "site-packages\calibre\customize\ui.py", line 551, in initialize_plugin
File "calibre_plugins.ios_reader_apps.__init__", line 910, in initialize
File "calibre_plugins.ios_reader_apps.__init__", line 1239, in _get_connected_device_info
InitialConnectionError: Unable to connect to iDevice
Successfully initialized third party plugins: DeDRM && Modify ePub && Marvin XD && Open With
Starting up...
DEBUG: 8.0 MarvinManagerAction:genesis(v1.2.4)
DEBUG: 8.0 MarvinManagerAction:init_options()
DEBUG: 8.0 AnnotationsDB:connect(db_version: 1)
DEBUG: 8.0 MarvinManagerAction:inflate_dialog_resources()
DEBUG: 8.0 MarvinManagerAction:compile_ui()
DEBUG: 8.5 MarvinManagerAction:rebuild_menus()
DEBUG: 14.2 iOSRA plugin not installed
Started up in 8.65 seconds with 400 books
DEBUG: 18.6 MarvinManagerAction:shutting_down()
From the IOSRA code, the libimobiledevice library has reported that one idevice is connected (which it is not), and then IOSRA is falling over when it tries to mount the idevice.
Does anyone else get this error?
This is something I saw before when porting the libimobiledevice library from Linux to Windows--without any idevices connected, it still reported one device, with a product_id == 0. If I connect my IPad, I get two reported, a "dummy" one (product_id == 0) and a real one (product_id is not 0).
I fixed this to ignore all idevices with product_id == 0
unless it is the only detected idevice. This is the code that is currently in the
Windows build of Calibre 2.11.
I am now considering that the code should always ignore any idevice with a product_id == 0, even if it is the only detected idevice. I have just tried this change and the "Marvin XD requires the IOS reader application plugin to be installed" bug has disappeared.
It may be better to fix this bug in the python code, and not the C code, because the python code is shared between Linux and Windows, whereas the C code is not.