Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kodiv20 XBox - SMB add-on does not load after Kodi restart (when in a user profile and the SMB addon is disabled in the master profile) #22272

Open
6 tasks
KodiBugReporter opened this issue Dec 15, 2022 · 9 comments

Comments

@KodiBugReporter
Copy link

KodiBugReporter commented Dec 15, 2022

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

This bug began occuring after the Kodi V20 update on Xbox Series X. The SMB virtual file system add-on stops working after Kodi is restarted. The add-on is still listed as enabled. Disabling the SBM add-on and enabling it again allows the addon to work normally but the issues occurs again after the next restart.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

The SMB add on should remain enabled/loaded after Kodi restarts.

Actual Behavior

The SMB addon does not load after Kodi restart (even though it is stil listed as enabled in the GUI.)

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Enable SMB add-on (on Xbox Kodi V20)
  2. Add a SMB share
  3. Restart the Kodi app

Debuglog

The debuglog can be found here:
https://paste.kodi.tv/iyatobajor

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • macOS

  • Windows

  • [X ] Windows UWP

  • Operating system version/name:

  • Kodi version:v20

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@lrusak
Copy link
Contributor

lrusak commented Dec 15, 2022

What do you mean "does not load"?

Are you not able to connect to an smb share or what?

@KodiBugReporter
Copy link
Author

KodiBugReporter commented Dec 15, 2022

I am not able to connect to an existing SMB share. Adding a SMB type share is not listed in the options when attempting to add a new share. The behavior appears to be identical to when the SMB add-on is disabled. This is resolved by disabling and re-enabling the SMB add-on. (But that process needs to be repeated each time Kodi is started.)

I suspect this may be related to "Library updates and mark as watched not persisting across sessions - Xbox V20 Nexus #22269" as the add-on enablement appears to be lost afer a restart even though the add-on shows as checked/enabled in the Gui.

SMB shares appear to work normally after the add-on is enabled for the first time or disabled/re-enabled after a restart

@fuzzard
Copy link
Contributor

fuzzard commented Dec 15, 2022

If things are not "persisting" this sounds like its crashing on exit between runs. Can you get the kodi.log.old in addition to the kodi.log

@thexai
Copy link
Member

thexai commented Dec 15, 2022

In the forum it seems that there are cases with a loop in the DB update process:

https://forum.kodi.tv/showthread.php?tid=370745&pid=3121821#pid3121821
https://forum.kodi.tv/showthread.php?tid=370745&pid=3121862#pid3121862

2022-12-15 13:43:42.801 T:1388    debug <general>: CDatabaseManager::Initialize, updating databases...
2022-12-15 13:43:42.802 T:1388     info <general>: Running database version Addons33
2022-12-15 13:43:42.803 T:1388     info <general>: Running database version ViewModes6
2022-12-15 13:43:42.804 T:1388     info <general>: Running database version Textures13
2022-12-15 13:43:42.808 T:1388     info <general>: Running database version MyMusic82
2022-12-15 13:43:42.813 T:1388     info <general>: Running database version MyVideos121
2022-12-15 13:43:42.814 T:1388     info <general>: Running database version TV40
2022-12-15 13:43:42.814 T:1388     info <general>: Attempting to update the database Epg16 from version 13 to 16
2022-12-15 13:43:42.814 T:1388    debug <general>: Cleaning indexes from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.815 T:1388    debug <general>: Cleaning views from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.815 T:1388    debug <general>: Cleaning triggers from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.816 T:1388    error <general>: SQL: [Epg16.db] SQLite error SQLITE_ERROR (duplicate column name: iChannelGroup)
                                                   Query: ALTER TABLE savedsearches ADD iChannelGroup integer; (duplicate column name: iChannelGroup)
2022-12-15 13:43:42.822 T:1388    error <general>: Exception updating database Epg16 from version 13 to 16
2022-12-15 13:43:42.822 T:1388    error <general>: Error updating database Epg16 from version 13 to 16
2022-12-15 13:43:42.823 T:1388     info <general>: Old database found - updating from version 13 to 16
2022-12-15 13:43:42.823 T:1388    debug <general>: Copying from Epg13.db to Epg16 at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.837 T:1388     info <general>: Attempting to update the database Epg16 from version 13 to 16
2022-12-15 13:43:42.837 T:1388    debug <general>: Cleaning indexes from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.837 T:1388    debug <general>: Cleaning views from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.838 T:1388    debug <general>: Cleaning triggers from database Epg16.db at Q:\Users\UserMgr0\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalState\userdata\Database\
2022-12-15 13:43:42.838 T:1388    error <general>: SQL: [Epg16.db] SQLite error SQLITE_ERROR (duplicate column name: iChannelGroup)
                                                   Query: ALTER TABLE savedsearches ADD iChannelGroup integer; (duplicate column name: iChannelGroup)
2022-12-15 13:43:42.838 T:1388    error <general>: Exception updating database Epg16 from version 13 to 16
2022-12-15 13:43:42.838 T:1388    error <general>: Error updating database Epg16 from version 13 to 16
2022-12-15 13:43:42.839 T:1388    debug <general>: CDatabaseManager::Initialize, updating databases... DONE

@KodiBugReporter
Copy link
Author

If things are not "persisting" this sounds like its crashing on exit between runs. Can you get the kodi.log.old in addition to the kodi.log

I think this new pasted log contains an exit (captured with the logfile uploader as I'm on XBOx)
https://paste.kodi.tv/meseriqute

@thexai
Copy link
Member

thexai commented Dec 17, 2022

Tested and can't reproduce:

  • Enabled vfs.smb2 add-on and configured a SMB source with MKV movies.
  • Scraped movies and close re-open Kodi various times.
  • Add-on remains enabled and operative (smb option is displayed to add sources and previous MKV's are playable using SMB).
  • Powered Off Xbox and restarted and all remains configured and operative.

Probably this is some kind of corruption in settings or database maybe caused by same database migration issue.

Note that at this moment I have a clean setup and I do not have the problem that the updates do not persist in the database.

@thexai thexai added the Triage: Tested and not reproduced Effort has been placed into testing the issue but no one has been able to reproduce it yet label Dec 17, 2022
@KodiBugReporter
Copy link
Author

Tested and can't reproduce:

  • Enabled vfs.smb2 add-on and configured a SMB source with MKV movies.
  • Scraped movies and close re-open Kodi various times.
  • Add-on remains enabled and operative (smb option is displayed to add sources and previous MKV's are playable using SMB).
  • Powered Off Xbox and restarted and all remains configured and operative.

Probably this is some kind of corruption in settings or database maybe caused by same database migration issue.

Note that at this moment I have a clean setup and I do not have the problem that the updates do not persist in the database.

Interesting... I reinstalled Kodi so it's not a migration issue. Which XBox model did you test with? I'm experiencing this issue on the Series X. I tried the same tests on a XBox One X (2017 model) and the SMB addon stayed enabled after restart. I wonder if it's a hardware model specific issue?

@KodiBugReporter
Copy link
Author

Did some more testing and discovered more details on the root cause - it is a profile settings bug.
Steps to reproduce on Xbox (issue occurred for both Series X and One X):

  1. Disable the SMB addon in the Kodi Master profile.
  2. Create or log into a new profile Enable the SMB addon (you can now add and use SMB shares normally in the new profile)
  3. Restart Kodi and log into the new profile. The SMB addon will be listed as enabled but will not be active. Disabling and re-enabling the SMB addon allows it work normally again until the next Kodi restart.
  4. Resolve the issue by: Going to the Master profile and re-enabling the SMB addon. Now the Addon starts normally when a new Kodi session is opened in the other (non-master) profile.

@KodiBugReporter KodiBugReporter changed the title Kodiv20 XBox - SMB add-on does not load after Kodi restart Kodiv20 XBox - SMB add-on does not load after Kodi restart (when in a user profile and the SMB addon is disabled in the master profile) Dec 17, 2022
@thexai
Copy link
Member

thexai commented Dec 17, 2022

Well, then a bug exists although is a corner case, not urgent to fix right now :)

@thexai thexai added Component: Binary add-ons Component: Settings Triage: Confirmed issue has been reproduced by a team member Component: Profiles and removed Triage: Tested and not reproduced Effort has been placed into testing the issue but no one has been able to reproduce it yet Component: Settings labels Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants