ERROR: CAddonInstallJob failed to download (for a repository upgrade)
#1
Hi,

Kodi 17.4 (Win).

I can successfully install a custom repository from a LAN based webserver.

But, if I update the repo version in the .xml files + recreate the md5 files, to trigger a *repo* update, Kodi attempts to download the update from "special:" instead of downloading from a url set in the datadir=xxxx entry of /addons.xml and /repository.myaddon/addon.xml.

If I Uninstall the existing repo, and then "install from zip file" the newly modified repo version, then this works fine.

Kodi log reports, "ERROR: CAddonInstallJob[repository.mytest]: failed to download special://home/addons/packages/repository.mytest-1.0.2.zip" as generated here... Kodi code that intentionally generates the log error This is the issue for this post - that is, to find why Kodi is using special: as the source here.

File: /repository.myaddon/addon.xml

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.myaddon" name="myaddon Add-on repository" version="1.0.1" provider-name="myaddon">
    <extension point="xbmc.addon.repository" name="myaddon Add-on Repository">
        <info compressed="true">http://127.0.0.1:9876/kodi/addons.xml</info>
        <checksum>http://127.0.0.1:9876/kodi/addons.xml.md5</checksum>
        <datadir zip="true">http://127.0.0.1:9876/kodi</datadir>
        <hashes>false</hashes>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>Install Add-ons for myaddon</summary>
        <description>Download and install add-ons from a repository</description>
        <disclaimer></disclaimer>
        <platform>all</platform>
        <website>https://github.com/myaddon/myaddon</website>
        <nofanart>true</nofanart>
    </extension>
</addon>

* The above addon.xml file is imported into /addons.xml (the <addon/> section)
* The above addon.xml file is also zipped into /repository.myaddon/repository.myaddon-1.0.1.zip
* All relevant md5 files are created

Step - Install repo, Kodi Log....
Code:
14:25:42.985 T:5352   DEBUG: ------ Window Init (Pointer.xml) ------
14:25:44.120 T:5352   DEBUG: CWinEventsWin32::WndProcWindow is active
14:25:46.351 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
14:25:46.354 T:3792   DEBUG: Thread JobWorker start, auto delete: true
14:25:46.354 T:3792   DEBUG: CurlFile::Open(022EE3DC) http://127.0.0.1:9876/kodi/
14:25:46.354 T:3792    INFO: XCURL::DllLibCurlGlobal::easy_aquire - Created session to http://127.0.0.1
14:25:47.884 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
14:25:47.884 T:3792   DEBUG: CurlFile::Open(022EE3DC) http://127.0.0.1:9876/kodi/repository.myaddon/
14:25:49.283 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
14:25:49.526 T:5352   DEBUG: ------ Window Deinit (FileBrowser.xml) ------
14:25:49.535 T:5352   DEBUG: CAddonInstaller: installing from zip 'http://127.0.0.1:9876/kodi/repository.myaddon/repository.myaddon-1.0.1.zip'
14:25:49.537 T:5352   DEBUG: CurlFile::Open(0BC47138) http://127.0.0.1:9876/kodi/repository.myaddon/repository.myaddon-1.0.1.zip
14:25:49.623 T:3792   DEBUG: Unpacking zip://http%3a%2f%2f127.0.0.1%3a9876%2fkodi%2frepository.myaddon%2frepository.myaddon-1.0.1.zip/repository.myaddon/ to C:\Users\MyUser\AppData\Roaming\Kodi\addons\temp\56719b9c-fa55-484c-bf5e-eda7f5858237
14:25:49.624 T:3792   DEBUG: CurlFile::Open(0BC47138) http://127.0.0.1:9876/kodi/repository.myaddon/repository.myaddon-1.0.1.zip
14:25:49.786 T:3792   DEBUG: Previous line repeats 1 times.
14:25:49.786 T:3792   DEBUG: ADDON: cpluff: 'Plug-in repository.myaddon has been uninstalled.'
14:25:49.791 T:3792    INFO: ADDON: cpluff: 'Could not read plug-in directory C:\Users\MyUser\AppData\Roaming\Kodi\addons: No such file or directory'
14:25:49.803 T:3792   DEBUG: ADDON: cpluff: 'Plug-in repository.myaddon has been installed.'
14:25:49.804 T:3792   DEBUG: ADDON: cpluff: 'Not all directories were successfully scanned.'
14:25:49.829 T:844   DEBUG: Thread JobWorker start, auto delete: true
14:25:49.836 T:844   DEBUG: ContextMenuManager: addon menus reloaded.
14:25:49.836 T:4384   DEBUG: Thread Timer 4384 terminating
14:25:49.847 T:3792   DEBUG: CRepositoryUpdater: previous update at 10/09/2017 4:34:58 AM, next at 10/10/2017 4:34:58 AM
14:25:49.848 T:8472   DEBUG: Thread Timer start, auto delete: false
14:25:49.968 T:5352   DEBUG: CGUIMediaWindow::GetDirectory (addons://)
14:25:49.968 T:5352   DEBUG:   ParentPath = [addons://]
14:25:50.002 T:3792   DEBUG: CAddonMgr::GetAvailableUpdates took 32 ms
14:25:50.015 T:5352   DEBUG: ------ Window Init (DialogNotification.xml) ------


C:\Users\MyUser\AppData\Roaming\Kodi\addons exists.

Step - Check updates (after xml files are changed from version 1.0.1 to 1.0.2)
Code:
14:28:08.773 T:5352   DEBUG: ------ Window Init (Pointer.xml) ------
14:28:11.970 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
14:28:11.971 T:5352   DEBUG: CGUIMediaWindow::GetDirectory (addons://repos/)
14:28:11.971 T:5352   DEBUG:   ParentPath = [addons://]
14:28:11.971 T:6992   DEBUG: Thread JobWorker start, auto delete: true
14:28:11.977 T:7728   DEBUG: Thread BackgroundLoader start, auto delete: false
14:28:11.978 T:8808   DEBUG: Thread JobWorker start, auto delete: true
14:28:11.980 T:7728   DEBUG: Thread BackgroundLoader 7728 terminating
14:28:15.669 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action rightclick
14:28:15.674 T:5352   DEBUG: CFavourites::Load - no system favourites found, skipping
14:28:15.674 T:5352   DEBUG: CFavourites::Load - no userdata favourites found, skipping
14:28:15.674 T:5352   DEBUG: ------ Window Init (DialogContextMenu.xml) ------
14:28:17.852 T:5352   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
14:28:18.088 T:5352   DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
14:28:18.102 T:5352   DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------
14:28:18.103 T:8808   DEBUG: CRepositoryUpdateJob[repository.myaddon] checking for updates.
14:28:18.106 T:8808   DEBUG: CFileCache::Open - opening <kodi/addons.xml.md5> using cache
14:28:18.108 T:8808   DEBUG: CurlFile::Open(09172130) http://127.0.0.1:9876/kodi/addons.xml.md5
14:28:18.108 T:8808    INFO: XCURL::DllLibCurlGlobal::easy_aquire - Created session to http://127.0.0.1
14:28:18.312 T:8868   DEBUG: Thread FileCache start, auto delete: false
14:28:18.312 T:8868    INFO: CFileCache::Process - Source read didn't return any data! Hit eof(?)
14:28:18.362 T:8868   DEBUG: Thread FileCache 8868 terminating
14:28:18.398 T:8808   DEBUG: CRepositoryUpdateJob[repository.myaddon] checksum not changed.
14:28:18.412 T:8808   DEBUG: CRepositoryUpdater: done.
14:28:18.422 T:8808   DEBUG: CAddonMgr::GetAvailableUpdates took 10 ms
14:28:18.431 T:8808   DEBUG: CAddonMgr::GetAvailableUpdates took 9 ms
14:28:18.431 T:8472   DEBUG: Thread Timer 8472 terminating
14:28:18.442 T:8808   DEBUG: CRepositoryUpdater: previous update at 10/09/2017 4:34:58 AM, next at 10/10/2017 4:34:58 AM
14:28:18.442 T:8416   DEBUG: Thread Timer start, auto delete: false
14:28:18.444 T:3924   DEBUG: Thread JobWorker start, auto delete: true
14:28:18.455 T:5352   DEBUG: CGUIMediaWindow::GetDirectory (addons://repos/)
14:28:18.455 T:5352   DEBUG:   ParentPath = [addons://repos/]
14:28:18.461 T:8916   DEBUG: Thread BackgroundLoader start, auto delete: false
14:28:18.463 T:8916   DEBUG: Thread BackgroundLoader 8916 terminating
14:28:18.513 T:6992   ERROR: CAddonInstallJob[repository.myaddon]: failed to download special://home/addons/packages/repository.myaddon-1.0.2.zip
14:28:18.524 T:5352   DEBUG: CGUIMediaWindow::GetDirectory (addons://repos/)
14:28:18.524 T:5352   DEBUG:   ParentPath = [addons://repos/]
14:28:18.529 T:5352   DEBUG: ------ Window Init (DialogNotification.xml) ------
14:28:18.529 T:8740   DEBUG: Thread BackgroundLoader start, auto delete: false
14:28:18.531 T:8740   DEBUG: Thread BackgroundLoader 8740 terminating
14:28:18.703 T:5352   DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------
14:28:22.850 T:5352   DEBUG: ------ Window Deinit (Pointer.xml) ------
14:28:23.435 T:5352   DEBUG: ------ Window Init (Pointer.xml) ------
14:28:24.253 T:5352   DEBUG: ------ Window Deinit (DialogNotification.xml) ------

Does anyone know how to make CAddonInstallJob use an entry in the .xml file for a repo update source instead of "special:..." ?

Thanks in advance.

Dougey
Reply
#2
Thread moved to add-on development
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
Update. I isolated this "feature", here are my findings.

When a repo is first-time installed, Kodi app *must* be restarted if that repo is to be able to receive any repo updates, otherwise, updates will fail (triggered by context menu "Check for updates").

However, once Kodi is restarted, the same repo can be updated 1.0.1 -> 1.0.2 -> 1.0.x -> 1.0.y without any issues and without restarting Kodi in between an update.

This indicates that "something" is occurring during Kodi startup that applies to existing installed repos, where that "something" is not applied when a repo is installed for the first time in an already running Kodi.
Reply

Logout Mark Read Team Forum Stats Members Help
ERROR: CAddonInstallJob failed to download (for a repository upgrade)0