Jump to content

Error Server: Access token is invalid or expired


Recommended Posts

Posted

Hi all

I have a strange problem very specific (well...it seems to) with my provider video box. 

My Emby Server 4.8.8 is runinng on a little linux (raspi/os) and going well. I can access movies from smartphone, web nav, amazon firetv. But...
From this video box (Orange for french reference) this is impossible to read a movie. I can see my Emby instance, navigate through lists but each time I want to read one, I got an "impossible to read"  message.

If I go in the log here is the guilty process. 

http://192.168.1.200:8096/videos/419/original.mkv%3FDeviceId=24ff0e6d976c7ecb2df40e7f949bf39c&MediaSourceId=1f287d01ca5e71f36cfc162799f9d98a&PlaySessionId=02d12ecd5aef734fafe5d9f54d0a765a&api_key=2f6a39bf5acf483ebf4e42c796e4cfb2. Connection=keep-alive, Host=host3, User-Agent=GStreamer souphttpsrc 1.22.1 libsoup/2.70.0, Accept-Encoding=identity, icy-metadata=1
2024-09-03 10:50:06.596 Debug App: Access token is invalid or expired: .
2024-09-03 10:50:06.600 Warn Server: AUTH-ERROR: 192.168.1.10 - Access token is invalid or expired.
2024-09-03 10:50:06.608 Error Server: Access token is invalid or expired.
2024-09-03 10:50:06.618 Info Server: http/1.1 Response 401 to host2. Time: 27ms. GET 

I searched forums but can't make it work. Trying to change clock on the box is impossible, synchronize with emby also...
I create a specific profile for the device as I know it's not a very developed one. I was using plexmedia before emby, and it was OK but I had to create a profile also.

2024-09-03 10:49:34.409 Debug DLNA: Attempting to create PlayToController from location http://192.168.1.10:42300/description.xml
2024-09-03 10:49:34.412 Debug HttpClient: GET http://192.168.1.10:42300/description.xml
2024-09-03 10:49:34.427 Debug DLNA: Device Manufacturer: SoftAtHome
2024-09-03 10:49:34.427 Debug DLNA: Device Model Name: SoftAtHome Media Renderer
2024-09-03 10:49:34.427 Debug DLNA: Found device name Décodeur TV UHD from device properties
2024-09-03 10:49:34.427 Debug DLNA: Dlna Device.Start
2024-09-03 10:49:34.429 Info DLNA: DLNA Session created for Décodeur TV UHD - SoftAtHome Media Renderer. Description url: http://192.168.1.10:42300/description.xml
2024-09-03 10:49:34.929 Info HttpClient: GET http://192.168.1.10:42300/AVTransport/scpd.xml

If anyone has a clue I will be very happy 😊😆

Posted

Found another interesting thing :

2024-09-03 17:41:59.303 Debug HttpClient: POST http://192.168.1.1:60000/b03575f3/upnp/control/WANIPConn1
2024-09-03 17:41:59.526 Debug PortMapper: Creating port map on local port 8920 to public port 8920 with device 192.168.1.200
2024-09-03 17:41:59.527 Debug HttpClient: POST http://192.168.1.1:60000/b03575f3/upnp/control/WANIPConn1
2024-09-03 17:41:59.536 Debug App: Sending alive notification MediaServer - 3bad2e58-6eb3-479d-8b25-7682b8496e88
2024-09-03 17:41:59.707 Debug HttpClient: POST http://192.168.1.1:60000/b03575f3/upnp/control/WANIPConn1
2024-09-03 17:41:59.799 Error PortMapper: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>601</errorCode>
<errorDescription>Argument Value Out of Range</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

192.168.1.1 is the internet box itself, is this the real problem ?

Posted

Hi there, please attach the complete emby server log file. thanks.

Posted
19 hours ago, Fjunillon said:

Hi, the log doesn't contain any of the errors that you mentioned in your first post. Can you please attach the one from when the problem occurred? Thanks !

Posted

Hi @Lukehave you been able to identify something ? I tried different configuration with or without upnp checkbox but no luck :( 

Posted

Hi,  I'm going a little further, step by step...

I changed the gateway on my raspberry to another, which is routing to the real gateway. And it works, no more token or upnp error. A little bit strange, but I'm ok with it. 

But it stills not working. And this time I don't have any clue at all :( the attached report is not giving error I can search for, but on the screen, I still have "error reading".

And of course it's working on iPhone, firetv etc. I also tryed updating to the beta version 4.9, that doesn't change anything.😵‍💫

 

embyserver-20240913.txt

Posted
Quote

But it stills not working.

Hi, what is not working exactly?

Posted

when asking for a movie, the box tries but gives an error.

The all movie list is ok, I can select one and when I ask for it I get an "impossible to read the movie" (sshot). I tried different format, encode style etc. Nothing.

IMG_9779.jpg

IMG_9781.jpg

  • 2 weeks later...
Posted

still have trouble with this box...
now I get that in log
 

2024-09-29 19:57:09.197 Debug App: Access token is invalid or expired: .
2024-09-29 19:57:09.200 Warn Server: AUTH-ERROR: 192.168.1.10 - Access token is invalid or expired.
2024-09-29 19:57:09.200 Error Server: Access token is invalid or expired.
2024-09-29 19:57:09.203 Info Server: http/1.1 Response 401 to host2. Time: 15ms. GET 

what does this mean ? It happens when asking for reading a movie.

Posted

well... each time trying new stuf, I'm getting other bad messages.

this time
 

Debug DLNA: "urn:schemas-upnp-org:service:AVTransport:1#GetTransportInfo" response: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><CurrentTransportState>NO_MEDIA_PRESENT</CurrentTransportState><CurrentTransportStatus>OK</CurrentTransportStatus><CurrentSpeed>1</CurrentSpeed></u:GetTransportInfoResponse></s:Body></s:Envelope>

This time I think I'm tired of trying. I stop !

 

Posted
On 9/29/2024 at 3:12 PM, Fjunillon said:

still have trouble with this box...
now I get that in log
 

2024-09-29 19:57:09.197 Debug App: Access token is invalid or expired: .
2024-09-29 19:57:09.200 Warn Server: AUTH-ERROR: 192.168.1.10 - Access token is invalid or expired.
2024-09-29 19:57:09.200 Error Server: Access token is invalid or expired.
2024-09-29 19:57:09.203 Info Server: http/1.1 Response 401 to host2. Time: 15ms. GET 

what does this mean ? It happens when asking for reading a movie.

Hi, please attach the complete log file. thanks.

Posted

Thanks for checking. But so what does this mean ?
 

response: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><CurrentTransportState>NO_MEDIA_PRESENT</CurrentTransportState><CurrentTransportStatus>OK</CurrentTransportStatus><CurrentSpeed>1</CurrentSpeed></u:GetTransportInfoResponse></s:Body></s:Envelope>

 

Posted
14 hours ago, Fjunillon said:

Thanks for checking. But so what does this mean ?
 

response: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><CurrentTransportState>NO_MEDIA_PRESENT</CurrentTransportState><CurrentTransportStatus>OK</CurrentTransportStatus><CurrentSpeed>1</CurrentSpeed></u:GetTransportInfoResponse></s:Body></s:Envelope>

 

The server periodically checks the status of dlna devices, and when they're not playing they will likely return a message such as this. It varies from one device to another.

Posted

OK, thanks for the answer @Luke
On my side, I found new stuff... 
Just for history, my video box has stop working correctly a few weeks ago with plexmediaserver and for a lot of other reasons I decided to move on emby. 
At the beginning of the thread, the first error was about an "access token" problem. Solved it (I don't know how)
After it was an "upnp error". Solved it by making an intermediate gateway, beetween the video box and the @ box. 

And now, after digging a lot, I discovered that there has been an update on the video box (without warning) from the manufacturer. This update removed all h26x, avi, mkv (and so on) support ! Now the box only support mpegts container, mpeg2 video codec and pcm audio codec :( (don't ask me why, everybody complains about it on the french provider support forum...)

So, now I'm trying to have a dlna profile working for it, making transcode for ... nearly everything.

The profile I made is well loaded and match to the device (saw it in the log). EmbyServer is not complaining, I can see it well in the profile dlna profile manager. But when asking for movies, I still have an error on the box "Impossible to read the movie". There is no error in the log server file, but there is absolutely no transcoding starting. 
I also verified the rights on the path for transcode and it's ok.

I really don't understand what I make wrong... Could you help please ? 

DecodeurTVUHD.xml

  • Thanks 1
Posted
7 hours ago, Fjunillon said:

OK, thanks for the answer @Luke
On my side, I found new stuff... 
Just for history, my video box has stop working correctly a few weeks ago with plexmediaserver and for a lot of other reasons I decided to move on emby. 
At the beginning of the thread, the first error was about an "access token" problem. Solved it (I don't know how)
After it was an "upnp error". Solved it by making an intermediate gateway, beetween the video box and the @ box. 

And now, after digging a lot, I discovered that there has been an update on the video box (without warning) from the manufacturer. This update removed all h26x, avi, mkv (and so on) support ! Now the box only support mpegts container, mpeg2 video codec and pcm audio codec :( (don't ask me why, everybody complains about it on the french provider support forum...)

So, now I'm trying to have a dlna profile working for it, making transcode for ... nearly everything.

The profile I made is well loaded and match to the device (saw it in the log). EmbyServer is not complaining, I can see it well in the profile dlna profile manager. But when asking for movies, I still have an error on the box "Impossible to read the movie". There is no error in the log server file, but there is absolutely no transcoding starting. 
I also verified the rights on the path for transcode and it's ok.

I really don't understand what I make wrong... Could you help please ? 

DecodeurTVUHD.xml 5.09 kB · 0 downloads

Hi, looking at the transcoding profile for video:

<TranscodingProfile container="mpegts" type="Video" videoCodec="mpeg2video" audioCodec="pcm"

Is this right? does it support that? 

In this situation unfortunately it is just trial and error until you find a combination that it likes.

Posted

I got clues from the french forum and as far as I understand log, the answer of the video box confirm that. Did I understood well  ?
 

2024-10-12 13:06:49.544 Info DLNA: DLNA Session created for Décodeur TV UHD - SoftAtHome Media Renderer. Description url: http://192.168.1.10:42300/description.xml
2024-10-12 13:06:50.045 Info HttpClient: GET http://192.168.1.10:42300/AVTransport/scpd.xml
2024-10-12 13:06:59.295 Info HttpClient: GET http://192.168.1.10:42300/ConnectionManager/scpd.xml
2024-10-12 13:06:59.307 Info DLNA: Device GetProtocolInfoResponse Source: 
2024-10-12 13:06:59.307 Info DLNA: Device GetProtocolInfoResponse Sink: 
http-get:*:text/xml:DLNA.ORG_PN=DIDL_S
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM_ICO
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG_ICO
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG
http-get:*:image/png:DLNA.ORG_PN=PNG_SM_ICO
http-get:*:image/png:DLNA.ORG_PN=PNG_LRG_ICO
http-get:*:image/png:DLNA.ORG_PN=PNG_TN
http-get:*:audio/L16;channels=1;rate=44100:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=2;rate=44100:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=1;rate=48000:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL
http-get:*:image/jpeg:*
http-get:*:image/gif:*
http-get:*:image/png:*
http-get:*:audio/wav:*
http-get:*:audio/x-wav:*
http-get:*:audio/wave:*
http-get:*:audio/mp4:*
http-get:*:audio/x-mp4:*
http-get:*:audio/mpeg4:*
http-get:*:audio/x-mpeg4:*
http-get:*:audio/m4a:*
http-get:*:audio/x-m4a:*
http-get:*:audio/3gpp:*
http-get:*:audio/aac:*
http-get:*:audio/flac:*
http-get:*:audio/x-flac:*
http-get:*:audio/ogg:*
http-get:*:audio/vorbis:*
http-get:*:video/x-divx:*
http-get:*:video/x-matroska:*
http-get:*:video/x-msvideo:*
http-get:*:video/avi:*
http-get:*:video/msvideo:*
http-get:*:video/vnd.avi:*
http-get:*:audio/avi:*
http-get:*:audio/x-matroska:*
http-get:*:video/mp2t:*
http-get:*:video/vnd.dlna.mpeg-tts:*
http-get:*:video/mp1s:*
http-get:*:video/mp2p:*
http-get:*:video/mpeg:*
http-get:*:video/mpeg2:*
http-get:*:video/mpv:*
http-get:*:video/mp4:*
http-get:*:video/x-mp4:*
http-get:*:video/mov:*
http-get:*:video/quicktime:*
http-get:*:video/x-quicktime:*
http-get:*:text/m3u:*
http-get:*:audio/x-mpegurl:*
http-get:*:audio/x-scpls:*
http-get:*:application/vnd.ms-wpl:*
http-get:*:video/x-ms-asf:*

So, writing this is right, no ? 

Quote

<TranscodingProfile container="mpegts" type="Video" videoCodec="mpeg2video" audioCodec="pcm"

But then why, when trying an mp4/aac movie, the server is not transcoding it, just like if it does not care about the profile ? 

embyserver-63864374400.txt

Posted
10 hours ago, Fjunillon said:

I got clues from the french forum and as far as I understand log, the answer of the video box confirm that. Did I understood well  ?
 

2024-10-12 13:06:49.544 Info DLNA: DLNA Session created for Décodeur TV UHD - SoftAtHome Media Renderer. Description url: http://192.168.1.10:42300/description.xml
2024-10-12 13:06:50.045 Info HttpClient: GET http://192.168.1.10:42300/AVTransport/scpd.xml
2024-10-12 13:06:59.295 Info HttpClient: GET http://192.168.1.10:42300/ConnectionManager/scpd.xml
2024-10-12 13:06:59.307 Info DLNA: Device GetProtocolInfoResponse Source: 
2024-10-12 13:06:59.307 Info DLNA: Device GetProtocolInfoResponse Sink: 
http-get:*:text/xml:DLNA.ORG_PN=DIDL_S
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM_ICO
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG_ICO
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED
http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG
http-get:*:image/png:DLNA.ORG_PN=PNG_SM_ICO
http-get:*:image/png:DLNA.ORG_PN=PNG_LRG_ICO
http-get:*:image/png:DLNA.ORG_PN=PNG_TN
http-get:*:audio/L16;channels=1;rate=44100:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=2;rate=44100:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=1;rate=48000:DLNA.ORG_PN=LPCM
http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO
http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC
http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL
http-get:*:image/jpeg:*
http-get:*:image/gif:*
http-get:*:image/png:*
http-get:*:audio/wav:*
http-get:*:audio/x-wav:*
http-get:*:audio/wave:*
http-get:*:audio/mp4:*
http-get:*:audio/x-mp4:*
http-get:*:audio/mpeg4:*
http-get:*:audio/x-mpeg4:*
http-get:*:audio/m4a:*
http-get:*:audio/x-m4a:*
http-get:*:audio/3gpp:*
http-get:*:audio/aac:*
http-get:*:audio/flac:*
http-get:*:audio/x-flac:*
http-get:*:audio/ogg:*
http-get:*:audio/vorbis:*
http-get:*:video/x-divx:*
http-get:*:video/x-matroska:*
http-get:*:video/x-msvideo:*
http-get:*:video/avi:*
http-get:*:video/msvideo:*
http-get:*:video/vnd.avi:*
http-get:*:audio/avi:*
http-get:*:audio/x-matroska:*
http-get:*:video/mp2t:*
http-get:*:video/vnd.dlna.mpeg-tts:*
http-get:*:video/mp1s:*
http-get:*:video/mp2p:*
http-get:*:video/mpeg:*
http-get:*:video/mpeg2:*
http-get:*:video/mpv:*
http-get:*:video/mp4:*
http-get:*:video/x-mp4:*
http-get:*:video/mov:*
http-get:*:video/quicktime:*
http-get:*:video/x-quicktime:*
http-get:*:text/m3u:*
http-get:*:audio/x-mpegurl:*
http-get:*:audio/x-scpls:*
http-get:*:application/vnd.ms-wpl:*
http-get:*:video/x-ms-asf:*

So, writing this is right, no ? 

But then why, when trying an mp4/aac movie, the server is not transcoding it, just like if it does not care about the profile ? 

embyserver-63864374400.txt 21.12 kB · 0 downloads

Hi, I don't know. You have to just keep trying combinations of containers and codecs until you can get it to play.

The player says it supports all those things, and yet, here you are trying to force it to transcode because it doesn't seem to be able to handle anything. Unfortunately many players report incorrect data from those endpoints.

Posted

OK, thanks for that.

Just to go on, where can I find docs on that (directPlay, transcoding, Containers...?), because... that's not clear for me ( :D )
image.jpeg.00019c9200f37b066c545b60d422c286.jpeg

Posted

I think mpegts for the container will be your best bet. For the video codec I would try h264 and mpeg2video. For audio I would try aac and mp3.

Posted

HI, I still go on with my search... (I don't like when I can't do things... ;) )
Here is what I noticed.

First I hook tcp exchange between embyserver and a working client on another device.They talked together, emby announced movie's format (and a lot other informations). Then the client answered and streaming started.
With my box, after a quick ask/answer, absolutely no talk started. Emby is not trying to send anything, even not asking about format. Packets appear not following my first test and the box is automatically saying "can't play".
So is there any possibility that emby detects it couldn't talk with the box and does not try anything ? 

Posted
On 10/19/2024 at 9:06 AM, Fjunillon said:

HI, I still go on with my search... (I don't like when I can't do things... ;) )
Here is what I noticed.

First I hook tcp exchange between embyserver and a working client on another device.They talked together, emby announced movie's format (and a lot other informations). Then the client answered and streaming started.
With my box, after a quick ask/answer, absolutely no talk started. Emby is not trying to send anything, even not asking about format. Packets appear not following my first test and the box is automatically saying "can't play".
So is there any possibility that emby detects it couldn't talk with the box and does not try anything ? 

Just to clear up one thing - Emby doesn't talk to the box. The box talks to Emby, and Emby responds.

And this is what makes DLNA so difficult to troubleshoot. The client software on your device is having a problem with something. Maybe Emby Server is sending something back it can't handle, or sending something back incorrect. But how do we find out what that is? Unfortunately it is trial and error. You try things, and eventually you land on something that works.

When you have a situation where the client device won't do anything, usually you can find a clue by looking at the last transmissions of data between it and Emby Server before it went silent. What were those?

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...