Solved Hanging on Startup - SQL Error
#1
my setup:
18.7 Git:20200528-2c5354e70a Media Center Kodi
Raspbian GNU/Linux 10 (buster)
Linux raspberrypi 5.4.72-v7l+

the problem
Hangs on startup at the splash screen
looking in .kodi/temp/kodi.log:
Code:
 258   │ 2020-11-12 15:36:48.567 T:2769162448  NOTICE: Running database version Addons27
 259   │ 2020-11-12 15:36:48.569 T:2769162448  NOTICE: Running database version ViewModes6
 260   │ 2020-11-12 15:36:48.570 T:2769162448  NOTICE: Running database version Textures13
 261   │ 2020-11-12 15:36:48.576 T:2769162448  NOTICE: Running database version MyMusic72
 262   │ 2020-11-12 15:36:48.584 T:2769162448  NOTICE: Running database version MyVideos116
 263   │ 2020-11-12 15:36:48.586 T:2769162448  NOTICE: Running database version TV32
 264   │ 2020-11-12 15:36:48.588 T:2769162448   ERROR: SQL: [Epg12.db] SQLite error SQLITE_ERROR (no such table: version)
 265   │                                             Query: SELECT idVersion FROM version
 266   │ 2020-11-12 15:36:48.594 T:2769162448   ERROR: Process error processing job

What I have done:
* rm -r .kodi
* Re-installed (via binary, via retropie menus) 
Its a fresh install and there are no add-ons as i am yet to successfully run kodi
Reply
#2
(2020-11-12, 17:56)punkfootball Wrote: no such table: version

Somehow an update malformed the new table or it wasn't created at all.
Try a different SDcard, or better yet, use a SSD connected thru a SATA-USB cable to avoid SDcard corruption.

Next please provide the full unedited/uncut kodi.log file via a pastebin website and not just the part(s) that you find interesting, errors can start at any moment.
Reply
#3
(2020-11-12, 19:14)Klojum Wrote:
(2020-11-12, 17:56)punkfootball Wrote: no such table: version

Somehow an update malformed the new table or it wasn't created at all.
Try a different SDcard, or better yet, use a SSD connected thru a SATA-USB cable to avoid SDcard corruption.

Next please provide the full unedited/uncut kodi.log file via a pastebin website and not just the part(s) that you find interesting, errors can start at any moment.
> not just the part(s) that you find interesting

I have checked each db in .kodi/userdata/Database:
Code:
Addons27.db  CDDB  Epg12.db  MyMusic72.db  MyVideos116.db  Textures13.db  TV32.db  ViewModes6.db

with sqlite3 and I notice that Epg12.db is indeed empty, unlike the others, hence me finding it interesting.

Full log here: https://paste.ubuntu.com/p/rmdP44d9Xq/
Reply
#4
(2020-11-12, 20:16)punkfootball Wrote:
(2020-11-12, 19:14)Klojum Wrote:
(2020-11-12, 17:56)punkfootball Wrote: no such table: version

Somehow an update malformed the new table or it wasn't created at all.
Try a different SDcard, or better yet, use a SSD connected thru a SATA-USB cable to avoid SDcard corruption.

Next please provide the full unedited/uncut kodi.log file via a pastebin website and not just the part(s) that you find interesting, errors can start at any moment.
> not just the part(s) that you find interesting

I have checked each db in .kodi/userdata/Database:
Code:
Addons27.db  CDDB  Epg12.db  MyMusic72.db  MyVideos116.db  Textures13.db  TV32.db  ViewModes6.db

with sqlite3 and I notice that Epg12.db is indeed empty, unlike the others, hence me finding it interesting.

Full log here: https://paste.ubuntu.com/p/rmdP44d9Xq/
A-ha.

I did notice this line in the log:

Code:
208 │ 2020-11-12 15:36:46.689 T:2973494368 WARNING: CDRMUtils::InitDrm - failed to set drm master, will try to authorize instead: Permission denied
 

So didn't run kodi from retropie, but exited, trying it first with simply: 'kodi' then 'sudo kodi'. sudo worked. Now, I wonder how i would get around having to call it with sudo from within retropie?
Reply
#5
(2020-11-12, 20:30)punkfootball Wrote: So didn't run kodi from retropie, but exited, trying it first with simply: 'kodi' then 'sudo kodi'. sudo worked. Now, I wonder how i would get around having to call it with sudo from within retropie?

Sounds like missing user permissions. You probably need to add your user to the video group. What does "groups $USER" show?
Reply
#6
(2020-11-12, 20:30)punkfootball Wrote: A-ha.
I did notice this line in the log:

That's why we want full logs. Wink

Also:
2020-11-12 15:36:45.090 T:2973494368 NOTICE: Disabled debug logging due to GUI setting. Level 0.
Next time enable debugging for a more detailed log file in case of troubleshooting.
Reply
#7
(2020-11-12, 20:45)popcornmix Wrote:
(2020-11-12, 20:30)punkfootball Wrote: So didn't run kodi from retropie, but exited, trying it first with simply: 'kodi' then 'sudo kodi'. sudo worked. Now, I wonder how i would get around having to call it with sudo from within retropie?

Sounds like missing user permissions. You probably need to add your user to the video group. What does "groups $USER" show?

Code:
pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio]

does look like user: pi is in video
Reply
#8
(2020-11-13, 00:13)punkfootball Wrote:
(2020-11-12, 20:45)popcornmix Wrote:
(2020-11-12, 20:30)punkfootball Wrote: So didn't run kodi from retropie, but exited, trying it first with simply: 'kodi' then 'sudo kodi'. sudo worked. Now, I wonder how i would get around having to call it with sudo from within retropie?

Sounds like missing user permissions. You probably need to add your user to the video group. What does "groups $USER" show?

Code:
pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio]

does look like user: pi is in video

I also did a ls -lh on .kodi (well, actually /opt/retropie/configs/ports/kodi/ as its a symlink) and that all seems to be owned by pi
Reply
#9
I installed Kodi on a RPi4 with Raspbian Buster a couple of months ago (went back to LibreELEC now), and used the normal sudo apt install kodi command. Needless to say that it all worked and all local databases worked as advertised. Why only your Epg12.db database file is now having (user rights?) problems, I cannot explain. I take it all file/user rights are identical on all .db files in the userdata/Database folder? Did you ever open it with a different application, or do you have other related programs open in the background? Deleting or renaming the file should be good enough for Kodi to create a new instance of it with a restart.

A total new/fresh installation (on a different SDcard perhaps) can be a faster solution at times, instead of poking through the OS and Kodi setups all the time. But of course I have no idea if that is a viable alternative for you.
Reply
#10
(2020-11-13, 11:21)Klojum Wrote: I installed Kodi on a RPi4 with Raspbian Buster a couple of months ago (went back to LibreELEC now), and used the normal sudo apt install kodi command. Needless to say that it all worked and all local databases worked as advertised. Why only your Epg12.db database file is now having (user rights?) problems, I cannot explain. I take it all file/user rights are identical on all .db files in the userdata/Database folder? Did you ever open it with a different application, or do you have other related programs open in the background? Deleting or renaming the file should be good enough for Kodi to create a new instance of it with a restart.

A total new/fresh installation (on a different SDcard perhaps) can be a faster solution at times, instead of poking through the OS and Kodi setups all the time. But of course I have no idea if that is a viable alternative for you.
Thanks all for your help.

For anyone googling into here, i had to remove kodi through the retropie setup then sudo apt-get install kodi
then, i had to make it callable from within retropie itself so:

sudo vim /etc/emulationstation/es_systems.cfg

and add:

Code:
  <system>
    <name>kodi</name>
    <fullname>Kodi PlayBox Entertainment</fullname>
    <path>~/RetroPie/roms/kodi</path>
    <extension>.sh .SH</extension>
    <command>bash %ROM%</command>
    <platform>kodi</platform>
    <theme>kodi</theme>
  </system>

all is working well now.
Reply
#11
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Hanging on Startup - SQL Error0