Jump to content

Kodi suddenly not connecting to server


nonstatic

Recommended Posts

alexrw

@@DarWun, well, what do you know! That's a great catch! Your tips were spot on (though I didn't need to reboot, just kill the Kodi process)

  1. start Kodi, and indeed *none* of my addons were actually working (next TV aired episodes, Youtube, etc). All dead
  2. went into Settings > Addons > My addons > All > Emby (all 4 of them) and disabled them
  3. closed Kodi ... however the Kodi process was still living on in the background
  4. killed the Kodi process (task manager or killall, win or *nix)
  5. started Kodi
  6. went into Settings > Addons > My addons > All > Emby (all 4 of them) and enabled them
  7. did an Emby DB sync (without exiting Kodi) and it worked fine, saw the server and everything
  8. closed Kodi ... interestingly, this time the Kodi process also terminated, didn't have to kill it
  9. started Kodi
  10. the Embi login popup showed and all appears to be working fine

Many thanks @@DarWun!

 

@@Angelblue05, @@Luke, I'm happy it works again and have a workaround, but I don't know if/when it'll happen again and am still stumped as to why ... a proper fix would be more than welcome!

Edited by alexr
  • Like 1
Link to comment
Share on other sites

Angelblue05

Ah that's odd? I thought maybe it had to do with the getdirectory error which usually indicates the script failed to call (usually because the directory end call is missing)

 

No idea then. I'll have to test around to see if I'm able to reproduce this.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

DarWun

@@DarWun, well, what do you know! That's a great catch! Your tips were spot on (though I didn't need to reboot, just kill the Kodi process)

  1. start Kodi, and indeed *none* of my addons were actually working (next TV aired episodes, Youtube, etc). All dead
  2. went into Settings > Addons > My addons > All > Emby (all 4 of them) and disabled them
  3. closed Kodi ... however the Kodi process was still living on in the background
  4. killed the Kodi process (task manager or killall, win or *nix)
  5. started Kodi
  6. went into Settings > Addons > My addons > All > Emby (all 4 of them) and enabled them
  7. did an Emby DB sync (without exiting Kodi) and it worked fine, saw the server and everything
  8. closed Kodi ... interestingly, this time the Kodi process also terminated, didn't have to kill it
  9. started Kodi
  10. the Embi login popup showed and all appears to be working fine

Many thanks @@DarWun!

 

@@Angelblue05, @@Luke, I'm happy it works again and have a workaround, but I don't know if/when it'll happen again and am still stumped as to why ... a proper fix would be more than welcome!

Excellent news!!!  Since I'm running Kodi on a rpi2 using LibreELEC, the only way I can kill Kodi is to reboot (at least I think it is the only way).  So we essentially both followed the same steps.  The only difference seems to be that in my case I had to disable Emby, kill the kodi process (i.e. reboot), and renable Emby every time I restarted Kodi.

Edited by DarWun
Link to comment
Share on other sites

DarWun

Ah that's odd? I thought maybe it had to do with the getdirectory error which usually indicates the script failed to call (usually because the directory end call is missing)

 

No idea then. I'll have to test around to see if I'm able to reproduce this.

 

 

Sent from my iPhone using Tapatalk

I mentioned earlier that I moved on by reinstalling Kodi to a new SD card.  I thought the issue stemmed from SD card corruption, so I threw out the card with the problematic installation.  But I found a backup of the Kodi LibreELEC installation from just before I started to troubleshoot this issue.  I'm going to see if I can restore it to a spare SD card to help troubleshoot the issue further. 

Edited by DarWun
  • Like 1
Link to comment
Share on other sites

DarWun

I mentioned earlier that I moved on by reinstalling Kodi to a new SD card.  I thought the issue stemmed from SD card corruption, so I threw out the card with the problematic installation.  But I found a backup of the Kodi LibreELEC installation from just before I started to troubleshoot this issue.  I'm going to see if I can restore it to a spare SD card to help troubleshoot the issue further. 

@@Angelblue05 I restored the backup of the problematic Kodi LibreELEC install yesterday.  I saw the same behavior I had reported on previously in this thread.  However, after a couple of updates to non-Emby add-ons and an artwork cache update earlier today the issue seems to have disappeared.  I'm not sure whether it was the add-on updates or the artwork cache update that fixed the issue.

Edited by DarWun
  • Like 1
Link to comment
Share on other sites

alexrw

I was kind of able to reproduce it under Windows with an Intel Graphics chip (for Linux, you could try replacing step 3 below with a "killall -9 kodi.bin"), as follows:

  1. do the disable/enable addon steps in my post above to make it work again
  2. play an x265 movie from Emby which is encoded with --open-gop, and seek to 50%, then stop the movie
  3. come back to resume play of the above movie, which will cause Kodi to completely crash (*)
  4. restart Kodi ... now it's back to the same problem, where the Emby plugin doesn't start and I have to do the enable/disable thingy

(*) this is a documented and reported bug which the Kodi devs refuse to fix, see https://trac.kodi.tv/ticket/17368 and the Kodi forum thread therein

  • Like 1
Link to comment
Share on other sites

redaktorn

Hi Everybody,

 

I have exactly the same problem as others describe above here.

 

I have 3 installations of Kodi. 2 of them in Linux that is Ubuntu based.

(One with pure Ubuntu with Unity desktop, Second with Mint and XFce desktop)

The third installation is latest LibreELEC.

All installations run on Intel NUC boxes. All have Intel Graphics.

(Machines are different age and one is i3, one i5, and one i7 brand new Kaby Lake)

 

These all have the same problem that sometimes kodi-emby app do not connect at startup.

Which includes that no other app wants to start.

Removing Kodi-Emby app and all works well again.

I have tried as well the stable release, the beta release and latest test version.

It makes no difference on any of the machines.

 

Only solution for me is restarting Kodi and hope that it works next time.

(which is around or less than 50% of the times).

For me it does not help to disable/enable or update the app in Kodi.

Only a restart of Kodi system makes any difference. Reboot or killall -9 kodi.bin)

I have a feeling that the longer I wait to restart the better chance it starts OK next time.

 

As others has described above the problem started 1 or 2 weeks ago (with latest update of Kodi is my guess. But I am not sure since we had so many server updates also)

 

I attach a log from the server (hope it helps)

 

All the Best

Log.txt

Edited by redaktorn
Link to comment
Share on other sites

inzombyac

I have this issue with a Windows 8.1 machine.  This started when I tried to update to 17.3 from 17.2.  At that time I also updated the plugin to the latest from 2.3.47.  Once I update either, the Emby plugin does not work.  Any plugins are frozen unless I delete the plugin manually and restart Kodi.  Here's as far as my kodi log gets when set to debug level.  I checked in the userdata/addon_data/plugin.video.emby folder and I do have a data.txt file.  The file has the same information as displayed in the log file.  Both files have been masked to preserve my private server info.  

 

The only way I an get the Emby plugin to work again is to restore the the kodi folder in %appdata% and reinstall 17.2 or below.  Hope this helps.

kodi.log

data.txt

Edited by inzombyac
Link to comment
Share on other sites

redaktorn

Hi again,

 

I have found the problem.

 

It is the addon Extended Script that is on collision course with Kodi-Emby addon.

(Log gets full of memory errors when they run together in Kodi)

 

If you uninstall Extended Script addon Kodi-Emby addon works quite OK with the latest testversion of Kodi-Emby.

(Found as ZIP installation in http://kodi.emby.media resource)

 

Problem is that Extended Script is connected to some skins in Kodi.

So you might have to uninstall one or several skins in order to uninstall Extended Script.

 

Optional you can keep Extended Script if you fix a bug that is described in attached JPG file.

You then still need to uninstall it first.

Then add Extended Script and make a "clean exit" from Kodi.

(No crash exit - must be exit with Kodi's menu)

Then fix the bug and restart Kodi.

After that you can use Emby-Kodi addon and skins that need Extended Script.

 

P.S. I deleted the Extended Script map also after uninstall and before reinstall.

(Found in ~.kodi/addons)

 

All the Best

post-163695-0-14842300-1497337509_thumb.png

Edited by redaktorn
  • Like 2
Link to comment
Share on other sites

inzombyac

Removing the script.extendedinfo addon worked for me.  Making the change script.extendedinfo as described in the kodi forums did not.  

Link to comment
Share on other sites

redaktorn

I also had trouble to make it work with Extended Script.

 

But if you do as follows it will work:

Completely remove Extended Script and all skins and context menus that are connected.

Exit Kodi with the menus (no crash)

Then install ONLY extended script.

Exit Kodi again without crash.

Edit the "fix"

Start Kodi - exit without crash..

Start Kodi again and install the skin you want and Emby-Kodi app.

Now it shall work for you - at least if you run Kodi on Linux (LibreELEC is a little different)

 

All the Best

Link to comment
Share on other sites

alexrw

Interesting find, thanks. I'm puzzled as to why you need to remove the "extendedinfo script" addon and reinstall before doing the python code change ... the addon code that gets added is the same and as far as I know isn't cached anywhere, apart from Python's bytecode files. It could be that your system skips reloading the process.py source and only loads the process.pyo (compiled bytecode file from the previous .py source). Normally python generates a new .pyo whenever the corresponding source file .py changes, but maybe the one embedded in Kodi does not (?). However, you can force it, by deleting the .pyo file.

 

You can try the following:

  1. exit Kodi (crash, no crash, doesn't matter, but make sure it's not running any more, kill it manually if you have to)
  2. edit addons/script.extendedinfo/resources/lib/process.py and replace "HasActiveModalDialog" by "HasModalDialog"
  3. delete addons/script.extendedinfo/resources/lib/process.pyo (and/or process.pyc, you may have both)
  4. restart Kodi

Still, why did this started happening all of a sudden now in June 2017? My Extended Info script was last updated in December 2016 ... I still think the Emby devs should have a look at the issue. Many thanks @@Angelblue05 and @@Luke.

Edited by alexr
Link to comment
Share on other sites

Angelblue05

Yeah, but nothing changed in the add-on since beginning of May either... and the only thing that was changed was adding the access token to the transcode url. I'll still look but I have no idea what's wrong. Even the logs are not showing much, just seems to stop before loading the data.txt in most cases.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

redaktorn

Hi,

 

I recreated the problem by having both Kodi-Emby and Extended Script running.

Enclosed is log and log-picture to show the memory problems that appear.

It says clearly that Emby "has left several classes in memory that we couldn't clean up".

 

I also have to correct myself a little of running Extended Script and Kodi Emby together.

It still sometimes creates problems even with the "fix" done.

Less often but still it can collide with Kodi-Emby so Emby refuse to start or system hangs..

 

The interesting thing here is that one can run Extended Script OR Kodi Emby.

But with both installed Emby Kodi suffers many problems.

Also Extended Script suffer and reports script error when run together. But it still works in despite to Emby.

 

My conclusion so far is that you can have one of the addons - but not both.

Why this is - I have no idea....

But it is sad because both of these addons are great to have.

 

Hopefully some clever person can find out of a solution.

 

All the Best

kodi.log

post-163695-0-02000000-1497369051_thumb.jpg

Edited by redaktorn
Link to comment
Share on other sites

alexrw

If I disable the Emby addon, quit Kodi and kill the Kodi process manually since it doesn't actually die, then restart Kodi and re-enable the Emby addon (without quitting Kodi) then both Extended Script and the Emby addon add-on are working fine. If I exit then restart Kodi, then the problem is back. Annoying, but at least I have a (lengthy) workaround for both addons to work.

 

Something must have changed in the Emby server or the Emby addon ... they are the only ones who had updates recently (my Kodi 17.1 and Extended Info were installed months ago and all was working fine until last week).

Edited by alexr
Link to comment
Share on other sites

Angelblue05

The message that left class in log is normal and nothing to worry about and has no effect on anything.

 

Again, nothing changed in the addon but I'll look. Thanks.

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

redaktorn

Hi alexr,

 

That is probably a shorter way of doing it.

(Compared to my longer version with starts and exits)

In my system Kodi dies but it takes long time (up to 2 minutes) after exit.

 

I think that also you with your solution will find problems when running both addons..

Less problems, like I have, but still not a stable system. 

 

For the moment I am running only Emby since that is essential for me.

Link to comment
Share on other sites

alexrw

Hmm, I just looked at Database/Addons27.db (the sqlite db, newest in my case) and I see emby having two identically looking entries for each addon and dependency. Is that normal?

$ sqlite3 Addons27.db "select addonID from 'addons' where addonID like '%emby%';"
plugin.video.emby
plugin.video.emby
plugin.video.emby.movies
plugin.video.emby.movies
plugin.video.emby.musicvideos
plugin.video.emby.musicvideos
plugin.video.emby.tvshows
plugin.video.emby.tvshows
plugin.video.embycon
repository.beta.emby.kodi
repository.emby.kodi

All fields among the two copies look identical (haven'd done a proper diff though)

 

EDIT: I ran a diff, and one is the beta, the other is the stable. Although I only have the stable installed ...

Edited by alexr
Link to comment
Share on other sites

Angelblue05

Yep, emby for kodi has 3 dependency addons which are named plugin.video.emby.movie/tvshow/musicvideo.

I did update the dependencies in december I think... so could be old entries in the database. I don't know exactly how kodi maintains that database. I believe they don't clean it up unless you delete the actual database.

Edited by Angelblue05
Link to comment
Share on other sites

alexrw

I'm trying to find which file in Kodi holds the config for which addons are enabled and which are disabled, so I can automate my workaround via a script. Anyone?

Link to comment
Share on other sites

alexrw

Yep, emby for kodi has 3 dependency addons which are named plugin.video.emby.movie/tvshow/musicvideo.

 

 

Sent from my iPhone using Tapatalk

 

That's not what I said though. What I found was that each had a duplicate. See the output.

Link to comment
Share on other sites

Angelblue05

Yep, emby for kodi has 3 dependency addons which are named plugin.video.emby.movie/tvshow/musicvideo.

 

I did update the dependencies in december I think... so could be old entries in the database. I don't know exactly how kodi maintains that database. I believe they don't clean it up unless you delete the actual database.

You missed my edit.

Link to comment
Share on other sites

redaktorn

I don't think the double entries has caused the problems.

I had them all the time since I installed Kodi-Emby addon.

And long before these problems started.

You can see them inside Kodi also (attached JPG)

post-163695-0-68427200-1497373298_thumb.jpg

Link to comment
Share on other sites

Angelblue05

What you posted are not the dependencies. They are just two dummy entries to make parental control work in Kodi (kodi needs sources to see the content).

 

Anyway, I'll be working on getting the add-on updated this week. We have a few things that need to be modified. But in general, I don't see anything in logs that would indicate the issue is with emby for kodi.

@@alexr

Your log shows only errors with extended script. The emby for kodi fully loaded.

 

Other logs show that line: Trying to add unsupported control type 1

Which again, has nothing to do with emby for kodi since it doesn't create listings other than when you actually launch emby for kodi to see the options (like manual sync, reset local database, etc)

Edited by Angelblue05
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...