elgatito / plugin.video.elementum

Elementum add-on for Kodi. Development of this addon has been stopped!
http://elementum.surge.sh
MIT License
484 stars 159 forks source link

[Bug] Elementum wont hangs on litter.Sdump execution #175

Closed Jezze83 closed 6 years ago

Jezze83 commented 6 years ago

Im running windows 10 and latest elementum, version 0.48. With new version elementum wont even start. Here is full log: https://pastebin.com/EMJ1EtFM

elgatito commented 6 years ago

Have you restarted Kodi after update? Enabled remote control?

Jezze83 commented 6 years ago

Yes and i rebooted computer. Also firewall and virus program was disabled but no help.

elgatito commented 6 years ago

Previous version was working for you? Or this is the first installation?

Jezze83 commented 6 years ago

I used yesterday and worked fine. I think that new version updated today. Also windows installed updates yesterday when i shutdown computer but i dont know if that is issue. And its not first installation.

elgatito commented 6 years ago

Can you try to delete ".torrent.bolt.db" file inside of C:\Users\Jesse\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\ directory. Then restart. If it won't help - change download storage to Memory (not File). There is something that is broken, so we'd find where it happens.

Jezze83 commented 6 years ago

I deleted that file but didnt help. I changed to memory and then elementum daemon started. What cause that? I would like to use file but its works now.

elgatito commented 6 years ago

Can you now do this: 1) return storage type to File 2) restart Kodi 3) wait for 30 seconds (about). open http://192.168.0.1:65520/debug/bundle (replace with IP of your Kodi). 4) wait for another 10-15 minutes and download log again 5) share both logs

While waiting - you can use Kodi, but not Elementum. It looks like there is something with file storage. We'll see.

Jezze83 commented 6 years ago

I test that tomorrow when i wakeup and i give log files.

tortaman commented 6 years ago

hello, i am new with using your add on, however i have found a possible partial workaround for the issue, because the my kodi installation was performed through windows store, the installed kodi from windows store is "sandboxed" and shows different path and behavior as the pure installer (aka. exe downloaded from kodi.tv). After checking the kodi.log located at: "C:\Users\myuser\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\", i notice this line: DEBU database ▶ InitSqliteDB Error migrating schema: unable to open database file and following the comment

Can you try to delete ".torrent.bolt.db" file inside of C:\Users\Jesse\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\ directory. Then restart. If it won't help - change download storage to Memory (not File). There is something that is broken, so we'd find where it happens.

i stated that maybe the path is not correctly set due to the windows app sandbox, and create the missing directories by hand, and restart kodi, after that the daemon starts and fill the folder with the data. But is seems to be that there are some missing items or folders, because the addon is still crashing, but the log file are showing more information than before, this is an extract from my kodi.log file:

01:25:52.847 T:12616 NOTICE: [plugin.video.elementum] elementumd: starting elementumd 01:25:52.848 T:12616 NOTICE: [plugin.video.elementum] Kodi's JSON-RPC service is available, starting up... 01:25:52.848 T:12616 NOTICE: [plugin.video.elementum] Binary detection. Source: C:\Users\myuse\AppData\Roaming\Kodi\addons\plugin.video.elementum\resources\bin\windows_x64\elementum.exe, Destination: C:\Users\myuser\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\bin\windows_x64\elementum.exe 01:25:52.851 T:12616 NOTICE: [plugin.video.elementum] Deleting stale files set([]) 01:25:52.852 T:12616 NOTICE: [plugin.video.elementum] Binary detection: [ Source: C:\Users\myuser\AppData\Roaming\Kodi\addons\plugin.video.elementum\resources\bin\windows_x64\elementum.exe, Destination: C:\Users\myuser\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\bin\windows_x64\elementum.exe ] 01:25:52.852 T:12616 NOTICE: [plugin.video.elementum] Binary dir: C:\Users\myuser\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\bin\windows_x64, item: C:\Users\myuser\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\bin\windows_x64\elementum.exe 01:25:53.017 T:12616 NOTICE: [plugin.video.elementum] elementumd: start args: [u'C:\\Users\\myuser\\AppData\\Roaming\\Kodi\\userdata\\ADDON_~1\\PLUGIN~1.ELE\\bin\\WINDOW~1\\ELEMEN~1.EXE'], kw: {'startupinfo': <subprocess.STARTUPINFO instance at 0x10390AA8>, 'cwd': u'C:\\Users\\myuser\\AppData\\Roaming\\Kodi\\userdata\\ADDON_~1\\PLUGIN~1.ELE\\bin\\WINDOW~1', 'stderr': -2, 'stdout': -1} 01:25:54.381 T:12616 NOTICE: [plugin.video.elementum] INFO main ▶ main Starting Elementum daemon 01:25:54.381 T:12616 NOTICE: [plugin.video.elementum] INFO main ▶ main Version: 0.0.47 GoTorrent: f6ed514c Go: go1.10.2 01:25:54.383 T:12616 NOTICE: [plugin.video.elementum] INFO config ▶ Reload Reloading configuration... 01:25:54.424 T:12616 NOTICE: [plugin.video.elementum] INFO config ▶ Reload Using download path: C:\Users\myuser\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\userdata 01:25:54.435 T:12616 NOTICE: [plugin.video.elementum] INFO config ▶ Reload Using library path: C:\Users\myuser\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\userdata 01:25:54.465 T:12616 NOTICE: [plugin.video.elementum] DEBU config ▶ Reload Total system memory: 8.4 GB 01:25:54.465 T:12616 NOTICE: [plugin.video.elementum] DEBU config ▶ Reload Automatically selected memory size: 419 MB 01:25:54.466 T:12616 NOTICE: [plugin.video.elementum] DEBU config ▶ Reload Selected memory size (419 MB) is bigger than maximum for auto-select (210 MB), so we decrease memory size to maximum allowed: 210 MB 01:25:54.466 T:12616 NOTICE: [plugin.video.elementum] INFO main ▶ main Addon: plugin.video.elementum v0.0.47 01:25:54.472 T:12616 NOTICE: [plugin.video.elementum] INFO config ▶ CheckBurst Updating Kodi add-on repositories for Burst... 01:25:54.908 T:12616 NOTICE: [plugin.video.elementum] DEBU database ▶ InitSqliteDB Updated database to version: 1 01:25:54.910 T:12616 NOTICE: [plugin.video.elementum] INFO main ▶ Migrate Preparing for first run... 01:25:54.911 T:12616 NOTICE: [plugin.video.elementum] INFO main ▶ Migrate Creating Elementum repository add-on... 01:25:54.912 T:12616 NOTICE: [plugin.video.elementum] ERRO main ▶ Migrate Unable to create repository add-on: open C:\Users\myuser\AppData\Roaming\Kodi\addons\plugin.video.elementum\icon.png: El sistema no puede encontrar la ruta especificada. 01:25:54.912 T:12616 NOTICE: [plugin.video.elementum] INFO bittorrent ▶ configure Configuring client... 01:25:54.914 T:12616 NOTICE: [plugin.video.elementum] INFO bittorrent ▶ configure ListenIP=, ListenIPv6=, ListenPort=0, DisableIPv6=true 01:25:54.914 T:12616 NOTICE: [plugin.video.elementum] INFO bittorrent ▶ configure UserAgent: Elementum/0.0.47, PeerID: -GT0001- 01:25:54.915 T:12616 NOTICE: [plugin.video.elementum] INFO bittorrent ▶ configure DownloadStorage: Memory 01:25:54.915 T:12616 NOTICE: [plugin.video.elementum] DEBU memory ▶ NewMemoryStorage Initializing memory storage of size: 210 MB 01:25:54.916 T:12616 NOTICE: [plugin.video.elementum] DEBU bittorrent ▶ configure BitClient config: &torrent.Config{DataDir:"C:\\Users\\myuser\\AppData\\Local\\Packages\\XBMCFoundation.Kodi_4n2hpmxwrvr6p\\LocalCache\\Roaming\\Kodi\\userdata", ListenHost:(func(string) string)(0xcfde40), ListenPort:0, NoDefaultPortForwarding:false, DisableTrackers:false, DisablePEX:false, NoDHT:false, DhtStartingNodes:(dht.StartingNodesGetter)(0xab1de0), NoUpload:false, DisableAggressiveUpload:false, Seed:true, UploadRateLimiter:(*rate.Limiter)(0xc042213310), DownloadRateLimiter:(*rate.Limiter)(0xc0422132c0), PeerID:"-GT0001-CP7DV43MYYZT", DisableUTP:false, DisableTCP:false, DefaultStorage:(*memory.Storage)(0xc04220cf00), EncryptionPolicy:torrent.EncryptionPolicy{DisableEncryption:false, ForceEncryption:false, PreferNoEncryption:false}, ProxyURL:"", IPBlocklist:iplist.Ranger(nil), DisableIPv6:true, DisableIPv4:false, DisableIPv4Peers:false, Debug:false, HTTP:(*http.Client)(nil), HTTPUserAgent:"Elementum/0.0.47", ExtendedHandshakeClientVersion:"", Bep20:"-GT0001-", NominalDialTimeout:0, MinDialTimeout:0, EstablishedConnsPerTorrent:0, HalfOpenConnsPerTorrent:0, TorrentPeersHighWater:0, TorrentPeersLowWater:0, HandshakesTimeout:0, PublicIp4:net.IP(nil), PublicIp6:net.IP(nil)} 01:25:54.916 T:12616 NOTICE: [plugin.video.elementum] INFO bittorrent ▶ configure Client created successfully 01:25:54.917 T:12616 NOTICE: [plugin.video.elementum] DEBU bittorrent ▶ configure Client listening on tcp: 0.0.0.0:63389 01:25:54.917 T:12616 NOTICE: [plugin.video.elementum] DEBU bittorrent ▶ configure Client listening on udp: 0.0.0.0:63389 01:25:54.917 T:12616 NOTICE: [plugin.video.elementum] INFO tmdb ▶ CheckAPIKey Checking TMDB API key... 01:25:54.926 T:12616 NOTICE: [plugin.video.elementum] error looking up "router.silotis.us:6881": lookup router.silotis.us: no such host 01:25:55.319 T:12616 NOTICE: [plugin.video.elementum] NOTI tmdb ▶ CheckAPIKey TMDB API key check passed, using 29a551a... 01:25:55.324 T:12616 NOTICE: [plugin.video.elementum] panic: html/template: pattern matches no files:C:\Users\myuser\AppData\Roaming\Kodi\addons\plugin.video.elementum\resources\web*.html 01:25:55.324 T:12616 NOTICE: [plugin.video.elementum] 01:25:55.325 T:12616 NOTICE: [plugin.video.elementum] goroutine 1 [running]: 01:25:55.325 T:12616 NOTICE: [plugin.video.elementum] html/template.Must(0x0, 0x1133d60, 0xc04227bc90, 0x0) 01:25:55.325 T:12616 NOTICE: [plugin.video.elementum] /usr/local/go/src/html/template/template.go:372 +0x5b 01:25:55.325 T:12616 NOTICE: [plugin.video.elementum] github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc0420b67e0, 0xc04249e3c0, 0x55) 01:25:55.326 T:12616 NOTICE: [plugin.video.elementum] /ext-go/2/src/github.com/gin-gonic/gin/gin.go:181 +0x41a 01:25:55.326 T:12616 NOTICE: [plugin.video.elementum] github.com/elgatito/elementum/api.Routes(0xc042203110, 0xc04227bbf0) 01:25:55.326 T:12616 NOTICE: [plugin.video.elementum] /ext-go/1/src/github.com/elgatito/elementum/api/routes.go:32 +0x43d 01:25:55.327 T:12616 NOTICE: [plugin.video.elementum] main.main() 01:25:55.327 T:12616 NOTICE: [plugin.video.elementum] /ext-go/1/src/github.com/elgatito/elementum/main.go:138 +0x9f3 01:25:55.334 T:12616 NOTICE: [plugin.video.elementum] 01:25:55.343 T:12616 NOTICE: Previous line repeats 39 times. 01:25:55.343 T:12616 NOTICE: [plugin.video.elementum] System information: windows_x64 10 01:25:55.343 T:12616 NOTICE: [plugin.video.elementum] Kodi build version: 17.6 Git:20171114-a9a7a20 01:25:55.343 T:12616 NOTICE: [plugin.video.elementum] OS type: Windows 01:25:55.343 T:12616 NOTICE: [plugin.video.elementum] uname: ('Windows', 'Elitebook-2540p', '10', '10.0.16299', 'AMD64', 'Intel64 Family 6 Model 37 Stepping 5, GenuineIntel') maybe this would be a good approach to solve the issue,

elgatito commented 6 years ago

@tortaman this is not related to current issue. You can raise a separate issue regarding running in a Windows Store's Kodi. There were reports earlier, but I don't have a test environment, so you can raise an issue to track it.

PS: adding directories will work only for manual way, sandboxing idea is to disallow all activities outside of a sandbox, so the issue is not about directories, but about getting right directory, created by Store and used by Kodi.

tortaman commented 6 years ago

i have solved the other issues by copying the entire folder located at C:\Users\myuser\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\addons\plugin.video.elementum" "C:\Users\myuser\AppData\Roaming\Kodi\addons\plugin.video.elementum" now the plugin don't crash but still cannot use it because continues asking me to restart kodi undefinely kodi log extract:

01:49:35.052

T:13700 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.elementum/ 01:49:35.053 T:13700 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.elementum/) failed

elgatito commented 6 years ago

@tortaman again, your issue is not connected to the one, reported here.

Jezze83 commented 6 years ago

I tested that but when i replace ip with kodi ip, it says cannot connect.

elgatito commented 6 years ago

@Jezze83 sorry, the port is 65220, not 65520

Jezze83 commented 6 years ago

Still not working. I think problem is that because whole daemon wont even start.

elgatito commented 6 years ago

Pff... You are right :) Can you try to change the download path (to any other directory) with the File storage.

I will add few more messages to the log in the next version to see where it hangs.

Jezze83 commented 6 years ago

Changed download path but didnt help.

tortaman commented 6 years ago

@elgatito sorry i had no idea that you have answer my comment before, maybe you did it at the same time as my 2nd comment, I will open a new thread with the issue, because now i activated the debug option 2 in kodi and now the kodi.log is more verbose than before,

elgatito commented 6 years ago

@Jezze83 an you replace the binary located at C:\Users\Jesse\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.elementum\bin\windows_x64\elementum.exe with this one archive.zip There should be a little more log messages.

Jezze83 commented 6 years ago

Replaced and daemon wont start. Here is full log: https://pastebin.com/UJFA70xK

elgatito commented 6 years ago

That is probably not the right place to replace elementum.exe, there should be another one inside of Kodi directory. Try to replace both paths.

Jezze83 commented 6 years ago

What both paths? What is second path?

elgatito commented 6 years ago

Find elementum.exe

Jezze83 commented 6 years ago

I copied to both paths but still not working.

elgatito commented 6 years ago

It should not work. It should print more log messages.

Jezze83 commented 6 years ago

Here is log file: https://pastebin.com/uUViKuHW

Nemiroff commented 6 years ago

Kodi UWP? Installed from magasine?

Sandbird commented 6 years ago

I am also facing the same problem suddenly on my pi3 (Kodi Leia), running osmc (4.14.34-2-osmc), Log: https://pastebin.com/zPBaMwU8

but also on my PC running win10x64 (Kodi 17.6) Log: https://pastebin.com/1g7MZpvD (edit, on my pc i tried deleting .torrent.bolt and cache.db, same error)

elgatito commented 6 years ago

@Sandbird you have another issue.

1 case: Your database file is corrupted. remove library.db and cache.db files (in your plugin.video.elementum directory).

2 case: provide a full kodi.log in debug mode https://kodi.wiki/view/Log_file/Easy

elgatito commented 6 years ago

@Sandbird btw, can you send me the library.db and cache.db files before removing? I will try to avoid this problem in the future.

Jezze83 commented 6 years ago

@elgatito btw, is it possible import somehow with elementum all tv shows and movies from trakt to tv shows and movies library so i can watch from there through elementum?

Sandbird commented 6 years ago

@elgatito , are you sure ? because i deleted everything except the app.db and the error still shows up. Latest log when i clicked the app: https://pastebin.com/fF0Y3h6k Here are the files you requested. The big one, is obviously what you want, but the small cache file is the new one that it created but still gives the same error. https://1drv.ms/u/s!AmE8PmxBNnNajA51fA3PouuoBmHV

elgatito commented 6 years ago

@Jezze83 of course, if you authorize trakt in Elementum settings - it will import everything from collections and userlists.

elgatito commented 6 years ago

@Sandbird you should not post part logs, there is no information. Only full logs.

elgatito commented 6 years ago

@Sandbird I cannot extract the archive, says it;s broken.

Jezze83 commented 6 years ago

@elgatito i mean to there as you can see on first two pictures, its empty now. In elementum addon i can see from my trakt my lists. 88bd738a-4f24-4bca-8d0c-a5e13b870f5d 97118a17-2792-4ee7-a7bf-6ae124b25f20 60bd0572-039a-41cf-a2cb-e9f91cca6c88

Sandbird commented 6 years ago

@elgatito I'll do the debug log thingy and post back. hmmm its a winrar file, but with no compression so it should be fine with normal windows extract tool..

elgatito commented 6 years ago

@Jezze83 have you authorized Elementum to use your Trakt account?

Jezze83 commented 6 years ago

@elgatito yes and it mark as watched to trakt when i watch episode or movie with elementum addon. But it wont import my trakt library to my main library at kodi. What kinda settings i need put to elementum so it import to my main tv shows and movies library?

elgatito commented 6 years ago

@Jezze83 you can open Elementum settings, Trakt tab, run Syncronization and then post kodi.log.

Sandbird commented 6 years ago

@elgatito Full debug log : https://pastebin.com/i8SNfhCk I waited 2min before i click the Elementum app, (it didnt autostart btw), and then when i clicked it, the same error occured.

elgatito commented 6 years ago

@Sandbird Now it looks same error as issue-starter. Your application is not starting. Try to change storage to memory and try again.

Sandbird commented 6 years ago

@elgatito , yup, switching to memory worked! I guess the file option has some bug. Would the memory part work well for the pi3 though ? For the PC is fine, although sometimes it is nice to have the torrent as a file in order see it again in the future.

elgatito commented 6 years ago

@Sandbird fine with RPi3, people use it. However I'd limit memory usage to 40-50mb at most.

Sandbird commented 6 years ago

Awesome, thanks.

elgatito commented 6 years ago

@Jezze83 can you try this binary with File storage? archive.zip

Jezze83 commented 6 years ago

Now it works with that file. Are these correct settings for import to kodi library: 85ecd3c5-ef2c-4479-82cb-81929b515188 17021f3d-e57a-4d6d-9160-4d788fdef41b

elgatito commented 6 years ago

@Jezze83 so with the custom binary, that i've sent here, you can use File storage fine? And with 0.0.49 it does not work with File storage?

You can use default settings for Trakt sync, just authorized elementum in Trakt.

Jezze83 commented 6 years ago

I tested first with 0.49 but it didnt work. 0.49 with custom binary works fine.

elgatito commented 6 years ago

Can you send the log file for both situations, when working and when not.