djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
60 stars 9 forks source link

OSMC install error #39

Closed jlippold closed 6 years ago

jlippold commented 6 years ago

Hi there,

This my first time trying this addon on my RPI3 running OSMC. On install, the kodi log shows the following errors

19:39:45.725 T:1457255168  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create: zuki.pvr.hdhomerundvr v1.3.4 loading
19:39:45.759 T:1457255168   ERROR: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create failed due to an exception: database disk image is malformed (11): database disk image is malformed
19:39:45.760 T:1457255168   ERROR: ADDON: Dll HDHomeRun DVR PVR Client - Client returned bad status (6) from Create and is not usable
19:39:47.832 T:1457255168   ERROR: UpdateAddons - failed to create add-on HDHomeRun DVR PVR Client, status = 6

I searched around and found no clues as to what this error means. I'm running OSMC Kodi 17.6 and I'm trying to install the zuki.pvr.hdhomerundvr-linux-armhf-krypton-1.3.4.6838.zip file when the error occurs. Thanks in advance for any help

djp952 commented 6 years ago

That is an internal SQLite error message, the cause of which appears to be a corrupt database file. I've never seen this error before myself, but I have an RPI3 and can install OSMC on it from scratch and run through the steps to see if it's a code related issue. I keep SQLite up to date as often as possible, there is always a chance that something changed in a recent release. I don't see any bugs out there from recent SQLite versions that would match this, though.

It looks like the most recent OSMC is 2018.07-1, is this the version you are using?

For now, though, what we can try is to delete the database file and see if it can rebuild itself successfully. This should work even if the addon is loaded (which it isn't for you). You will need to be able to SSH to the Pi. (https://osmc.tv/wiki/general/accessing-the-command-line/)

Once in SSH, at the osmc@osmc:~$ prompt:

cd .kodi/userdata/addon_data/pvr.hdhomerundvr
rm -f *
shutdown -r now

This will nuke the PVR database files and reboot OSMC. In a normally functioning environment, the database will be automatically recreated. I would expect to hit the same error, but maybe it was a transient condition that can be recovered from. You might have to try to re-enable the addon at this point to see if we were successful or not.

My main worry is that there may be something up with the SD card or even the power supply (I went through 3 power supplies for my Pi 3 before I got a good one), but let me reinstall OSMC from scratch and see what I see here! Hang tight!

djp952 commented 6 years ago

I was able to successfully install OSMC 2018.07-1 from scratch on a clean SD card and install the PVR without error. I don't think at this point it's a code problem, but am always open to that and would like to do what I can to help. Let me know how deleting the database files goes, if that makes any difference or not for you.

I've opened a secondary issue to make an enhancement to the PVR to try and do what I suggested automatically if that error is returned. Since the database is trashed and it honestly doesn't store anything of real value (it's more of a cache) there should be no harm in making an attempt to blow it away and start again.

If you still run into the same problem, I would definitely try a different SD card and/or a different power supply as well, if those are possibilities. I really did have problems getting a "good" power supply for my Pi, and the problems the "bad" ones had were pretty random in nature. Do you ever see a little lightning bolt on your screen? That was my first clue in regard to a power supply issue, the Pi was trying to tell me it wasn't getting enough juice :)

Let me know!!

jlippold commented 6 years ago

Thank you so much for the concise and throughout answer. You are correct, clearing the addon data folder solved the issue. I don't know how it became corrupted and I've been unable to recreate the bug.