Repository navigation
Login attempt or request with invalid authentication for plex recently added #102
Description
Describe the Bug
Login attempt or request with invalid authentication errors appears constantly in my home assistant
The Error
Every day I keep receiving errors about invalid logins. These errors are coming from plex recently added
Indicate if you followed all steps in the troubleshooting doc
Yes
What data does the sensor display if any?
sensor is working, I am just getting those login errors
What displays when visiting the API URL from the troubleshooting guide?
it works
Does the default Home Assistant Plex component work for you?
it works
Home Assistant Version
Core 2025.5.1
Supervisor 2025.05.1
Operating System 15.2
Frontend 20250509.0
Additional Context
I configured plex recently added with ip address and port of server in my local network. everything is working, I am just getting those login errors constantly in the system. Plex is running on a docker container on a ubuntu VM in proxmox. Home assistant is running in another VM in same proxmox instance
LOG
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:136
integration: HTTP (documentation, issues)
First occurred: May 13, 2025 at 6:12:18 PM (12 occurrences)
Last logged: 8:37:20 AM
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_plex_recently_added?metadata=22439&thumb=1746958240&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiZWU3YjQ1Y2M2Mzk0MDgyYjRlNjcyYTUzYjVjOTAxNSIsInBhdGgiOiIvcGxleF9wbGV4X3JlY2VudGx5X2FkZGVkIiwicGFyYW1zIjpbWyJtZXRhZGF0YSIsIjIyNDM5Il0sWyJ0aHVtYiIsIjE3NDY5NTgyNDAiXV0sImlhdCI6MTc0NzIwMjQ0MCwiZXhwIjoxNzQ3MjAzMDQwfQ.914qnxpOIbveqEWrDfJQNzaN5-eofSvLrwbnaH21IG4'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_plex_recently_added?metadata=5811&thumb=1747130919&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiZWU3YjQ1Y2M2Mzk0MDgyYjRlNjcyYTUzYjVjOTAxNSIsInBhdGgiOiIvcGxleF9wbGV4X3JlY2VudGx5X2FkZGVkIiwicGFyYW1zIjpbWyJtZXRhZGF0YSIsIjU4MTEiXSxbInRodW1iIiwiMTc0NzEzMDkxOSJdXSwiaWF0IjoxNzQ3MjIwNDQ0LCJleHAiOjE3NDcyMjEwNDR9.YxvfIlxxuYg3VwqaRr_BgwZp7wrFQaqJQnNVcp5OWhw'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_plex_recently_added?metadata=5811&art=1747130919&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiZWU3YjQ1Y2M2Mzk0MDgyYjRlNjcyYTUzYjVjOTAxNSIsInBhdGgiOiIvcGxleF9wbGV4X3JlY2VudGx5X2FkZGVkIiwicGFyYW1zIjpbWyJtZXRhZGF0YSIsIjU4MTEiXSxbImFydCIsIjE3NDcxMzA5MTkiXV0sImlhdCI6MTc0NzIyMDQ0NCwiZXhwIjoxNzQ3MjIxMDQ0fQ.9SgpmcehZkqlbbVf333uoRAPlN46fFvH0pJOyaVKgwc'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_plex_recently_added?metadata=22439&art=1746958240&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiZWU3YjQ1Y2M2Mzk0MDgyYjRlNjcyYTUzYjVjOTAxNSIsInBhdGgiOiIvcGxleF9wbGV4X3JlY2VudGx5X2FkZGVkIiwicGFyYW1zIjpbWyJtZXRhZGF0YSIsIjIyNDM5Il0sWyJhcnQiLCIxNzQ2OTU4MjQwIl1dLCJpYXQiOjE3NDcyODk1MTEsImV4cCI6MTc0NzI5MDExMX0.Mia_ueuZ-M_S8lO6HNDmg9YjpJpJuDNKL0WuIULFveM'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_plex_recently_added?metadata=22439&thumb=1746958240&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiZWU3YjQ1Y2M2Mzk0MDgyYjRlNjcyYTUzYjVjOTAxNSIsInBhdGgiOiIvcGxleF9wbGV4X3JlY2VudGx5X2FkZGVkIiwicGFyYW1zIjpbWyJtZXRhZGF0YSIsIjIyNDM5Il0sWyJ0aHVtYiIsIjE3NDY5NTgyNDAiXV0sImlhdCI6MTc0NzI4OTUxMSwiZXhwIjoxNzQ3MjkwMTExfQ.hg_9OIE46ha00uMS2fdMrzoGppXTNllDizxDicWHH7I'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
Activity
mkanet commentedon May 15, 2025
Hi @davidepanato , I think the issue might be caused by you giving the Integration the generic name
plex. You can change the name to literally anything except for "plex" to avoid these authentication errors. Ideally, you can leave it blank. If this resolves the issue for you, please let me know. I can submit a bugfix to prevent this issue in the next update for this integration.Instructions:
davidepanato commentedon May 16, 2025
Hello @mkanet I tried changing my integration name to "pra"
I still have the same problem:
Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/pra_plex_recently_added?metadata=22439&thumb=1746958240&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcHJhX3BsZXhfcmVjZW50bHlfYWRkZWQiLCJwYXJhbXMiOltbIm1ldGFkYXRhIiwiMjI0MzkiXSxbInRodW1iIiwiMTc0Njk1ODI0MCJdXSwiaWF0IjoxNzQ3MzkwMTI1LCJleHAiOjE3NDczOTA3MjV9.dLc_i1wBZiOUy7QiS3cE6Y7wB28y7OQb2YmA9w64jOo'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Safari/537.36)
mkanet commentedon May 16, 2025
Hi David, please remove the integration completely, reboot, and then add it again. This time, don't give it a name. Let me know what result you get.
If you're still experiencing the issue, we will have to look to see what is different about your home assistant setup/configuration from others who use this integration.
davidepanato commentedon May 17, 2025
Hi @mkanet I still have the same failure.
here's the log, I restarted my home assistant around 9AM, first error at 10:12, then 11:54, then 12:45.
I have configured 2 sensors, 1 for movies, 1 for shows.
If I look at the sensor they seems to be updated correctly:
mkanet commentedon May 18, 2025
Hi David, sorry, I have no idea what's causing this on your setup. I think this is the first time I've seen this issue for this Integration. I'll ask @Makhuta who has contributed to this Integration too. He might have an idea.
Makhuta commentedon May 18, 2025
This looks like it is somehow caused by by the pihole. I suppose that you are using it for DNS resolving am I right @davidepanato ?
davidepanato commentedon May 19, 2025
Yes I am using pinhole in my local network running on another container within my nas. Plex is also running within a container in the nas
Makhuta commentedon May 19, 2025
And what address are you using in the HA the local eg. 192.168.x.x or the one resolved by pihole?
davidepanato commentedon May 19, 2025
I use the local address 192.168.x.x
Makhuta commentedon May 19, 2025
This looks like it is related to the issue we were having when adding integration to HACS, the integration needs to change the authSig so you can see the images from plex and since there can be posibility that your browser, or some other app, can use the old address, with the old authSig key, it will result in this error. The integration will still function fine because the new address is there and your browser will use it.
You could most likely fix it using this in configuration.yaml:
Let me know @davidepanato if this fixes it.
davidepanato commentedon May 20, 2025
I tried this setup but it is not working, if I set this trusted network I am no more able to login from external network since my nginx server is running on 192.168.178.99
Makhuta commentedon May 20, 2025
So add also the range the nginx is in
mkanet commentedon May 20, 2025
@davidepanato like this...
davidepanato commentedon Jun 14, 2025
Sorry for my late answer but I've been busy lately and was not able to test.
I was able to have HA working with this config:
but unfortunately error is still there:
any other idea on how to fix? I am quite sure I do not have devices with old/different password for HA in my network.
One more interesting point, those errors seems to be coming from my tablet (it is the only Android device around) that I use wallmounted. In the tablet I am logged with a different user from the normal one that I use everywhere else, may this be linked?
Thanks!
Davide
Makhuta commentedon Jun 14, 2025
Just to recap, you are using Pihole as DNS resolver am I right? And you probably define the address with your domain like "homeassistant.YOUR_DOMAIN.XXX" right?
davidepanato commentedon Jun 14, 2025
Correct, in my internal network I have pinhole as a DNS, the tablet is accessing home assistant dashboard via public address (ha.xxx.duckdns.org) with a different user
Makhuta commentedon Jun 14, 2025
If you are running it in docker I can recommend using blocky instead of pihole. I've been using pihole before I found blocky, in there you can define whole domain to point to some address like this:
*.YOUR_DOMAIN.XXX -> ADDRESS_OF_YOUR_SERVER (for example 192.168.1.10)
Where the "*" means any prefix.
davidepanato commentedon Jun 14, 2025
I can give it a try but I am happy with pihole and I do not want to change it. Is there any other way to solve it? If I look in the tablet interface I see that pictures are loaded correctly, also I do not see that new errors popup each time I use the tablet, they just randomly appears
Makhuta commentedon Jun 14, 2025
Well if the images are working you can just probably ignore it because it is probably caused by the key in the image url timed out before the tablet updated it and it tried to use the old key which is invalid by then because there is a new one. There might be some config in HA for how often it should update the frontend but I am not sure