Solved Installing from own repository doesn't work
#1
Exclamation 
Ok, so before I post this to to "Github Issues" I'd like to collect some second opinions on the matter.

I took over development of a plugin that lets Kodi consume podcasts and live streams from a public media org, otherwise freely available through it's own official portal. So before you ask, no piracy is involved. Neither does the content of the plugins matter. Thy do what they do, doesn't matter. They work per spec - when installed from zip. I wanted to stpe the game up and make them autoupdatable of course na this is where the trouble begins.

I created a "repository" plugin. My first plan was to use Github for storage. After some time spent on unsuccessful trials I began doubting Kodi can handle ssl, so I moved the storage to https://www.freewebhostingarea.com. Same effect. I am now doubting Kodi can handle HTTP, period. What makes me speculate on that.

First of all, the log entries:
23:25:11.144 T:20292   DEBUG: CAddonInstaller: installing 'plugin.rtvslo.live' version '1.0.0' from repository 'plugin.rtvslo.repo'
23:25:11.147 T:20292   DEBUG: CFileCache::Open - opening <repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5> using cache
23:25:11.151 T:20292   DEBUG: CurlFile::Open(1CA50C60) http://dam-pav.eu5.org/repo.rtvslo/plugi....0.zip.md5
23:25:11.435 T:31256   DEBUG: Thread FileCache start, auto delete: false
23:25:11.435 T:31256    INFO: CFileCache:Tonguerocess - Source read didn't return any data! Hit eof(?)
23:25:11.485 T:31256   DEBUG: Thread FileCache 31256 terminating

23:25:41.570 T:20292    INFO: XCURL:Big GrinllLibCurlGlobal::CheckIdle - Closing session to http://dam-pav.eu5.org (easy=1CEB8918, multi=03FFEB88)
I don't think those keyboard events in between are related.

This is the result when I browse into my repo, select a plugin and hit Install. The UI jumps out of the plugin, nothing else. If, for instance, there is no .zip.md5 file, at least Kodi starts showing some info as in "Downloading 0%", then saying "Installation failed". Of course in that case the log entry would say something in the line of "MD5 mismatch after download. Expected <!DOCTYPE" because instead of a checksum the server would return a 404 page. But I digress.

I was curious as of what in the heck was going on during the 30 seconds of idleness. So I started a sniffer. Here is what I get when I do the request with a regular, well basically anything else but Kodi:
   Operation, Status: OK (200), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1

However, when initiated from Kodi, we get:
   Operation, Status: Partial Content (206), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1

Looks like Kodi is issuing a ranged request, then what? Which data is it unable to read? I'd say the md5 data is now read ok because Kodi stopped complaining about the mismatch - HOWEVER, if the md5 file contains garbage Kodi doesn't seem to detect that either.

So, does anyone know what is going on here? Much appreciated!
Reply
#2
i can't offer much help i'm afraid, but your repo is working fine on my end.

Code:
22:20:25.499 T:140538437044992 DEBUG: CAddonInstaller: installing 'plugin.rtvslo.live' version '1.0.0' from repository 'plugin.rtvslo.repo'
22:20:25.501 T:140538437044992 WARNING: Repository has MD5 hashes enabled - this hash function is broken and will only guard against unintentional data corruption
22:20:25.501 T:140538437044992 WARNING: Repository add-on plugin.rtvslo.repo uses plain HTTP for add-on downloads in path http://dam-pav.eu5.org/repo.rtvslo/ - this is insecure and will make your Kodi installation vulnerable to attacks if enabled!
22:20:25.503 T:140537545869056 DEBUG: CurlFile::Open(0x7fd1727fa630) http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip
22:20:25.815 T:140538437044992 DEBUG: ------ Window Deinit (DialogAddonInfo.xml) ------
22:20:25.844 T:140537545869056 DEBUG: CFileCache::Open - opening <repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5> using cache
22:20:25.845 T:140537545869056 DEBUG: CurlFile::Open(0x7fd15c0031c0) http://dam-pav.eu5.org/repo.rtvslo/plugi....0.zip.md5
22:20:25.845 T:140537545869056 INFO: easy_acquire - Created session to http://dam-pav.eu5.org
22:20:26.301 T:140536527648512 DEBUG: Thread FileCache start, auto delete: false
22:20:26.302 T:140536527648512 INFO: CFileCache::Process - Source read didn't return any data! Hit eof(?)
22:20:26.352 T:140536527648512 DEBUG: Thread FileCache 140536527648512 terminating
22:20:26.352 T:140537545869056 DEBUG: Resolved addon path http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip to http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip hash 461CECBEDCD18E151A061A122C7FA799
22:20:26.587 T:140537545869056 DEBUG: CurlFile::Open(0x7fd15c0031c0) http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip
22:20:26.953 T:140537545869056 DEBUG: Unpacking zip://special%3a%2f%2fhome%2faddons%2fpackages%2fplugin.rtvslo.live-1.0.0.zip/plugin.rtvslo.live/ to /home/ronie/.kodi/addons/temp/779955fa-6158-4bfe-8915-963fce1bce38
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2019-02-01, 23:45)ronie Wrote: i can't offer much help i'm afraid, but your repo is working fine on my end.

Code:
22:20:25.499 T:140538437044992 DEBUG: CAddonInstaller: installing 'plugin.rtvslo.live' version '1.0.0' from repository 'plugin.rtvslo.repo'
22:20:25.501 T:140538437044992 WARNING: Repository has MD5 hashes enabled - this hash function is broken and will only guard against unintentional data corruption
22:20:25.501 T:140538437044992 WARNING: Repository add-on plugin.rtvslo.repo uses plain HTTP for add-on downloads in path http://dam-pav.eu5.org/repo.rtvslo/ - this is insecure and will make your Kodi installation vulnerable to attacks if enabled!
22:20:25.503 T:140537545869056 DEBUG: CurlFile::Open(0x7fd1727fa630) http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip
22:20:25.815 T:140538437044992 DEBUG: ------ Window Deinit (DialogAddonInfo.xml) ------
22:20:25.844 T:140537545869056 DEBUG: CFileCache::Open - opening <repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5> using cache
22:20:25.845 T:140537545869056 DEBUG: CurlFile::Open(0x7fd15c0031c0) http://dam-pav.eu5.org/repo.rtvslo/plugi....0.zip.md5
22:20:25.845 T:140537545869056 INFO: easy_acquire - Created session to http://dam-pav.eu5.org
22:20:26.301 T:140536527648512 DEBUG: Thread FileCache start, auto delete: false
22:20:26.302 T:140536527648512 INFO: CFileCache:Tonguerocess - Source read didn't return any data! Hit eof(?)
22:20:26.352 T:140536527648512 DEBUG: Thread FileCache 140536527648512 terminating
22:20:26.352 T:140537545869056 DEBUG: Resolved addon path http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip to http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip hash 461CECBEDCD18E151A061A122C7FA799
22:20:26.587 T:140537545869056 DEBUG: CurlFile::Open(0x7fd15c0031c0) http://dam-pav.eu5.org/repo.rtvslo/plugi...-1.0.0.zip
22:20:26.953 T:140537545869056 DEBUG: Unpacking zip://special%3a%2f%2fhome%2faddons%2fpackages%2fplugin.rtvslo.live-1.0.0.zip/plugin.rtvslo.live/ to /home/ronie/.kodi/addons/temp/779955fa-6158-4bfe-8915-963fce1bce38
Wow. Many, many thanks for this; the log excerpt is most informative. Also I am of course thrilled that the setup works for you, but your log also tells me that none of the messages I get in the log say anything about the causes for my malfunction. Your log has exactly the same entries! And then some more, which mine does not.

Ok so my test environment is a Kodi 17.6 setup on Windows 10. I failed to mention this before because I also have two Libreelec setups around the house that behave in exactly the same way as Kodi on Windows. So it didn't seem to depend on the platform.

Just to be sure about the steps you've taken. Can I assume you surfed up to http://dam-pav.eu5.org, guessed (since it is not English) that the only link published has to be the repo plugin, you installed the repo plugin and then installed the "live" plugin from the repo? If that is what you did, then wow.

Also, what on Earth is wrong with my test environment?
Reply
#4
yup, that's exactly what i did.

perhaps some incorrect data got stuck in your Addons.db during your trail & error testing...

give this a shot:
1 quit kodi
2 rename any AddonsXX.db file in userdata/Database to AddonsXX.db.bak
3 start kodi
4 re-enable your repo plugin
5 try to install your live plugin
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-02-02, 15:28)ronie Wrote: yup, that's exactly what i did.

perhaps some incorrect data got stuck in your Addons.db during your trail & error testing...

give this a shot:
1 quit kodi
2 rename any AddonsXX.db file in userdata/Database to AddonsXX.db.bak
3 start kodi
4 re-enable your repo plugin
5 try to install your live plugin
Worth a shot, I reset the addon db, had no effect. Still refusing to process.

However, Leia is out just today, so out with Krypton, in with Leia, install repo, install plugins, it works.

Whatever it was, I don't care, water under the bridge, milk spilt, pick your saying, I'm happy and resuming work on the plugins.

Big Thanks!
Reply
#6
And to conclude, I moved the repository storage back to github, everything works like a summer breeze.

Again, thanks!
Reply
#7
Thread marked solved.
Reply
#8
(2019-02-03, 22:09)Klojum Wrote: Thread marked solved.
Marked, but not solved, not really.

I suppose our colleague ronie did actually follow the steps and successfully install the repo addons, but. I suspect what he failed to mention and what I failed to ask - since I did not know at the time what made the difference - that he did all this on a beta Leia. Also, I was too quick to be happy with Leia. Turns out video streaming is broken, so plugins not working properly trumps them not being able to install from repository. The repo ability is secondary. So I'm back with being confined to Krypton.

But, no need for despair. After two weeks of tinkering I noticed one little xml element named <hashes>true</hashes>, or rather I noticed how some examples of repos did not specify it. Although those which I based my setup on did. What if I dropped this from my repo plugin too? 

And there you have it ladies and gentlemen. This little xml element has no other purpose than to screw up your repo. Drop it and live happily ever after.

NOW you can mark this thread solved, thank you.
Reply

Logout Mark Read Team Forum Stats Members Help
Installing from own repository doesn't work0