Jump to content

Emby for Kodi stops syncing once a month like clock work


brian1709

Recommended Posts

brian1709

I have been having this issue for a while now, well at least six months that I have been monitoring.

I run both EmbyCon and Emby for Kodi on my Kodi installation. It is a Win10 installation with Kodi 18.9.

Current Emby server is 4.6.3.0 but it is set to auto update so is always up to date. Have been on version 18 of Kodi for at least the last 18 months and it is always up to date as well.

So here is my issue: every 4-5 weeks my Emby for Kodi stops syncing. It is set to use EmbyConnect to auto login, and works fine, till it doesn't.

As soon as that happens no amount of manual  syncing, library update or repair or any of the Emby functionality works. Funnily EmbyCon still updates and stays current.

Current version is Emby-next-gen 5.3.3 and before that 4.1.22. EmbyCon is 1.9.114. Manually trying to log in to Emby gives me password incorrect.

Only thing that works is complete uninstall of Emby, password reset and DB rebuild.

Any ideas, it is becoming a bit tedious to do this once a month. Password expiry? Emby and EmbyCon not simpatico, to large a DB?

Dedicated server with several Emby Theatre clients, all LAN. Only one client runs Kodi as well.

Link to comment
Share on other sites

quickmic
17 minutes ago, brian1709 said:

I have been having this issue for a while now, well at least six months that I have been monitoring.

I run both EmbyCon and Emby for Kodi on my Kodi installation. It is a Win10 installation with Kodi 18.9.

Current Emby server is 4.6.3.0 but it is set to auto update so is always up to date. Have been on version 18 of Kodi for at least the last 18 months and it is always up to date as well.

So here is my issue: every 4-5 weeks my Emby for Kodi stops syncing. It is set to use EmbyConnect to auto login, and works fine, till it doesn't.

As soon as that happens no amount of manual  syncing, library update or repair or any of the Emby functionality works. Funnily EmbyCon still updates and stays current.

Current version is Emby-next-gen 5.3.3 and before that 4.1.22. EmbyCon is 1.9.114. Manually trying to log in to Emby gives me password incorrect.

Only thing that works is complete uninstall of Emby, password reset and DB rebuild.

Any ideas, it is becoming a bit tedious to do this once a month. Password expiry? Emby and EmbyCon not simpatico, to large a DB?

Dedicated server with several Emby Theatre clients, all LAN. Only one client runs Kodi as well.

Please upload a  kodi.log

Link to comment
Share on other sites

brian1709

It will have to wait till next time as I have all ready done the steps to rebuild the Emby-next- gen. Oh wait lets see if I still have the kodi.old

Link to comment
Share on other sites

  • 2 weeks later...
brian1709

OK, that time of the month. It stopped working again. This time though it is worse in that it won't let me delete and re-install. Well it let me delete but will not complete the configuration after re-install. See attached log.

Funny thing though, EmbyCon and Browser works fine to 17X.30.XXX.XXX:8096

It lets me login and validates the user and Server.

From the logs it seems to find the server, authenticate the user as valid and then just seem to be unable to to connect.

Only things changed was a Emby Server update to 4.6.4.0 and of course the inevitable Win 10 update.

kodi.log

Edited by brian1709
Link to comment
Share on other sites

quickmic

Well, for some reason the token (api key) is revoked.

2021-07-07 12:26:39.268 T:7300  NOTICE: INFO: EMBY.core.connection_manager: revoking token

After that, you have no permission to access emby-server:

File "C:\Users\Willem\AppData\Roaming\Kodi\addons\plugin.video.emby-next-gen\hooks\monitor.py", line 506, in Unauthorized

btw, this is a bug, but not critical. Notification seems to be wrong, anyway. Your token is revoked and you have to register again.

 

Currently I don't know, why it happens. I'll trace the code, which events revokes tokens.

 

 

btw.

Have you changed the password of embyconnect?

Edited by quickmic
Link to comment
Share on other sites

quickmic

I've checked, the (emby) server request status response was 401 which means -> Unauthorized.

Does something expire? Probably the api-key, your password? Not sure if Emby-Server has an option for that.

Edited by quickmic
Link to comment
Share on other sites

brian1709

Hi, have not touched EmbyCon since it is the only thing that has been working consistently

So how would I register again? Reregister with Emby ( so new API key) or just re-install Emby Next gen (which I have done about 10 times today already)

if it is a new API Key why is embyCon and my other instances of Kodi still working fine?

Link to comment
Share on other sites

brian1709

not sure if it is the userID and password because I checked it with IDs that is working on my other Kodi instances to that same server

Link to comment
Share on other sites

quickmic

IN THEORY, you can try as follows:

shutdown kodi and delete this file:

.kodi/userdata/addon_data/plugin.video.emby/data.json

probably take a backup first.

restart Kodi, it should ask you to login...

if doens't help, shutdown Kodi again and modify the following file:

.kodi/userdata/addon_data/plugin.video.emby/settings.xml

search for:

<setting id="SyncInstallRunDone">true</setting>

and set it to false:

<setting id="SyncInstallRunDone">false</setting>

restart Kodi

 

Link to comment
Share on other sites

quickmic
7 minutes ago, brian1709 said:

It does have a premiere key though

premiere key has nothing to do with the api-key. api-key is just a token used for authentification.

Link to comment
Share on other sites

brian1709

is there not maybe device IDs or user IDs that need to be deleted from the Embyserver side?

Link to comment
Share on other sites

quickmic
18 minutes ago, brian1709 said:

does not seem to make any difference. See new log file

EmbyCon and web browser still working fine

kodi.log 70.57 kB · 0 downloads

That's way better. Emby server is connected but got a timeout for some reason.

 

 

1-07-07 17:23:19.070 T:7044 WARNING: EMBY.hooks.webservice.WebService--->[ webservice/57578 ]
2021-07-07 17:23:29.054 T:6924   ERROR: Exception in thread Thread-1:
                                            Traceback (most recent call last):
                                              File "C:\Program Files\Kodi\system\python\Lib\threading.py", line 801, in __bootstrap_inner
                                                self.run()
                                              File "C:\Users\Willem\AppData\Roaming\Kodi\addons\plugin.video.emby-next-gen\emby\core\ws_client.py", line 98, in run
                                                self.connect("%s/embywebsocket?api_key=%s&device_id=%s" % (server, self.Token, self.DeviceID))
                                              File "C:\Users\Willem\AppData\Roaming\Kodi\addons\plugin.video.emby-next-gen\emby\core\ws_client.py", line 160, in connect
                                                self.sock.connect((hostname, port))
                                              File "C:\Program Files\Kodi\system\python\Lib\socket.py", line 228, in meth
                                                return getattr(self._sock,name)(*args)
                                            timeout: timed out
2021-07-07 17:25:09.289 T:5176   ERROR: ERROR: EMBY.core.HTTP: [ ServerUnreachable ]

 

restart emby server, restart kodi, but frankly there is something wrong. We are just doing workarounds.

 

 

@Luke

Can you please have a look at the server log?

Seems there are several "Access token is invalid or expired". Mostly they are not coming from Kodi, looks from Chrome browser but doesn't seem right. Could be related to a server shutdown.

Link to comment
Share on other sites

quickmic

@brian1709

For a total manual Kodi reset you do this:

delete:

.kodi/userdata/addon_data/plugin.video.emby-next-gen/*

.kodi/userdata/Database/MyMusic*

.kodi/userdata/Database/MyVideos*

.kodi/userdata/Database/emby*

 

But backup the complete .kodi folder before you do that, so you can rollback for further debugging.

 

 

Edited by quickmic
Link to comment
Share on other sites

There is failed authentication coming from Kodi, so something must have been done on the server to invalidate it, e.g. changing password, deleting the device, etc.

  • Like 1
Link to comment
Share on other sites

brian1709

yep, now we are getting somewhere. I did delete some of the devices on the server if they had not been accessed for more than 30 days.

There were about 35 entries and I read somewhere that my license only allowed for 10 devices and other people had issues when they exceeded that 10 device limit.

This specific one I am having problems with is one I deleted.  Would that ID still be around somewhere causing this issue?

Link to comment
Share on other sites

If you delete the device then I imagine you will have to go back over to kodi and manually log in again before it will work.

Link to comment
Share on other sites

brian1709

I have been doing that.

Clean install of Emby Next Gen. (EmbyCon working perfectly)

When I run Emby first time it sees the Server, I select not to login with EmbyCon but manually add server and then the option to login manually.

It seems to accept the credentials as the login window closes but a short while later error message pops up Emby Next gen could not...... see kodi log for ...

I have attached those logs for quickmic

Link to comment
Share on other sites

quickmic
19 minutes ago, brian1709 said:

I have been doing that.

Clean install of Emby Next Gen. (EmbyCon working perfectly)

When I run Emby first time it sees the Server, I select not to login with EmbyCon but manually add server and then the option to login manually.

It seems to accept the credentials as the login window closes but a short while later error message pops up Emby Next gen could not...... see kodi log for ...

I have attached those logs for quickmic

Can you please disable embycon for a test. Don't uninstall, just disable.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...