After CE upgrade, addons' update fails due to a stale metadata


#1

I encountered the following problematic scenario, and would like to make a suggestion for a solution:

  1. Upgrade CE to version 9.0.1
  2. Make sure that directory /storage/.kodi/addons/repository.coreelec doesn’t exist and directory /storage/.kodi/addons/packages is empty
  3. Make sure that coreelect repository addon is up to date (version 9.0.2)
  4. Try to update some of the addons - for example, pvr.iptvarchive, which in 9.0.1 was updated to 3.5.7.2

Result: even though an update to the plugin is detected by CE, when I try to update the addon manually I get the following error message in the log, and the update fails:

2019-03-07 13:37:49.696 T:3928982384 ERROR: Requested path https://addons.coreelec.org/9.0/Amlogic/arm/pvr.iptvarchive/pvr.iptvarchive-3.5.7.2.zip not found in known repository directories
2019-03-07 13:37:49.696 T:3928982384 ERROR: AddonInstallJob[pvr.iptvarchive]: failed to resolve addon install source path

Looking at coreelec configuration I saw that the path to the download location was correct:

# grep addons.coreelec.org /usr/share/kodi/addons/repository.coreelec/addon.xml                                          
                <info>https://addons.coreelec.org/9.0.1/Amlogic/arm/addons.xml.gz</info>
                <checksum verify="sha256">https://addons.coreelec.org/9.0.1/Amlogic/arm/addons.xml.gz?sha256</checksum>
                <datadir zip="true">https://addons.coreelec.org/9.0.1/Amlogic/arm</datadir>

Eventually, I traced the problem to a file /storage/.kodi/userdata/Database/Addons27.db: a ‘path’ attribute in a ‘metadata’ column of a table ‘addons’ contained wrong address (with ‘9.0’ in the path instead of ‘9.0.1’). After I manually removed the file (and then it was automatically rebuilt properly), the update began to work.

It seems upon update CE should remove/rebuild this database automatically.


#3

After you removed the file, how it was automatically rebuilt? I delete file Addons27.db and reboot and CE enter in safe mode, reboot again and same results

Before that I try this because I can not install anything from CE add-ons repo , always installation failed


#4

@dmdfpv: I suppose that the rebuild was caused either by reboot or by choosing ‘check for updates’ - I did both those things after removing the files.

P.S.: at the same times I removed Addons27.db, I also removed a file Textures13.db from the same directory, since it also contained links to old locations. I didn’t mention it previously since the main problem seemed to be related to Addons27.db, but maybe it is necessary to remove both of them.


#5

is there any way to patch my CE instalation to replace CE addons repo to the correct version ? Im usin 9.0.2 but all instalation of anything from this repo fails. If I want to upgrade anything I have to download from nightly repository , I think my install of CE is using a wrong target to acces repository, I have no acces to 9.0.1, I think it was 9.0.0 instead. Need to fix this


#6

Ignore the 9.0.2 it’s totally irrelevant and doesn’t mean anything, it’s been at this version since our 8.95.x versions.

Delete any user installed copy of the repository because this is where the problems start to happen, once you have done this restart Kodi and then you should be okay.


#7

yes, but I dont have any user installed copy of the repository, I dont have this folder and I restart kodi but problem persist:

/storage/.kodi/addons/repository.coreelec

Also I found this folder but is read only and I cant change permision

/usr/share/kodi/addons/repository.coreelec

After update to 9.0.1 my kodi is trying to get addons from 9.0.0 I think… and I dont know how to change this , when I need an addon, I get via website of nightly repo


#8

This is normal as this is the copy that we provide with our images, it is not supposed to be modified.

Well that’s impossible as we removed the 9.0.0 addons and changed the folder to mirror the 9.0.1 addons.


#9

Post Kodi debug log where more informations will be visible. And try to install one addon so we can see from where it is installed.


#10

try these steps

oh, CE team deleted my the only confirmed fix without a notice, why???

  1. ssh
    rm -rf /storage/.kodi/addons/packages
    rm -rf /storage/.kodi/addons/repository.coreelec

  2. install nightly update

  3. install again stable update

for me problem solved

try asap till CE team deletes this again… don’t know why


#11

@mader I undeleted your original post you link to. I don’t know why it was deleted because your solution is correct.


#12

thank you!


#13

THANKS !!

I solved, doing 2 and 3. And Uninstalling thoradia add-ons service , that was the guilty of my problem


#14

@mader just to make clear you only need point 1). No need to install nightly.


#15

no, without nightly nothing worked for me :slight_smile:


#16

This I don’t understand but if it works for you I’m happy anyway.


#17

Do you have installed thoradia service ? Uninstall it , then do it again, update to nightly version and after that , downgrade to 9.0.1 stable


#18

dont know what is it :slight_smile: but installing the updates was very easy for me