Skip to content

Login attempt or request with invalid authentication for plex recently added #102

Open

Description

@davidepanato

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

  1. mkanet commented on May 15, 2025

    @mkanet
    Collaborator

    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:

    1. Go to Settings (Configuration) → Devices & Services
    2. Find the "Plex Recently Added" integration in your list of integrations
    3. Remove the integration:
      • Click on it
      • Click the three dots in the top right corner
      • Select "Delete"
    4. Add the integration again:
      • Click the "+ ADD INTEGRATION" button
      • Search for "Plex Recently Added" and select it
    5. In the configuration form:
      • For the "Name" field, either:
        • Leave it BLANK (recommended)
        • Use any name OTHER than "plex" (like "plexmedia", "myplex", or "plexmediaserver")
      • Fill in all other fields as before
    6. Complete the setup
  2. davidepanato commented on May 16, 2025

    @davidepanato
    Author

    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)

  3. mkanet commented on May 16, 2025

    @mkanet
    Collaborator

    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.

  4. davidepanato commented on May 17, 2025

    @davidepanato
    Author

    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:

    Image ``` 2025-05-17 09:08:57.103 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration plex_recently_added which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2025-05-17 10:12:32.321 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=22439&art=1747444122&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMjQzOSJdLFsiYXJ0IiwiMTc0NzQ0NDEyMiJdXSwiaWF0IjoxNzQ3NDY4MTUxLCJleHAiOjE3NDc0Njg3NTF9.QpjkN2AKPhKgwP-cM8FBCDpQqoNPx-i37BU6GYbNkoU'. (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.125 Safari/537.36) 2025-05-17 10:12:32.328 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=22439&thumb=1747444122&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMjQzOSJdLFsidGh1bWIiLCIxNzQ3NDQ0MTIyIl1dLCJpYXQiOjE3NDc0NjgxNTEsImV4cCI6MTc0NzQ2ODc1MX0.WRmQmnimb3pXownUnnrnehwinsQkLbgzofcftPNgXT8'. (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.125 Safari/537.36) 2025-05-17 11:54:18.872 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=22439&art=1747444122&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMjQzOSJdLFsiYXJ0IiwiMTc0NzQ0NDEyMiJdXSwiaWF0IjoxNzQ3NDcxNzUxLCJleHAiOjE3NDc0NzIzNTF9.gpBWL-YPXW_xSdjKbYzaLG97zjqXc7Q-o46fCNVXWNk'. (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.125 Safari/537.36) 2025-05-17 11:54:18.885 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=22439&thumb=1747444122&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMjQzOSJdLFsidGh1bWIiLCIxNzQ3NDQ0MTIyIl1dLCJpYXQiOjE3NDc0NzE3NTEsImV4cCI6MTc0NzQ3MjM1MX0.tbesMrAma44SaHCtswaB_kjwBFbq9rSL35__eG4oSkE'. (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.125 Safari/537.36) 2025-05-17 12:45:43.406 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=5811&art=1747476735&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCI1ODExIl0sWyJhcnQiLCIxNzQ3NDc2NzM1Il1dLCJpYXQiOjE3NDc0Nzc3NTIsImV4cCI6MTc0NzQ3ODM1Mn0.IsZcefOJfAOBFBXU3axV8Vu4H1axl1odOq1MC6OU_AE'. (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.125 Safari/537.36) 2025-05-17 12:45:43.423 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=5811&thumb=1747476735&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCI1ODExIl0sWyJ0aHVtYiIsIjE3NDc0NzY3MzUiXV0sImlhdCI6MTc0NzQ3Nzc1MiwiZXhwIjoxNzQ3NDc4MzUyfQ.Nix_pRd2Ae1B4f3riPOQL5aUuLx-6ru-gDRHRsBiP4k'. (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.125 Safari/537.36) ```
  5. mkanet commented on May 18, 2025

    @mkanet
    Collaborator

    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.

  6. Makhuta commented on May 18, 2025

    @Makhuta
    Contributor

    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 ?

  7. davidepanato commented on May 19, 2025

    @davidepanato
    Author

    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

  8. Makhuta commented on May 19, 2025

    @Makhuta
    Contributor

    And what address are you using in the HA the local eg. 192.168.x.x or the one resolved by pihole?

  9. davidepanato commented on May 19, 2025

    @davidepanato
    Author

    I use the local address 192.168.x.x

  10. Makhuta commented on May 19, 2025

    @Makhuta
    Contributor

    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:

    homeassistant:
      auth_providers:
        - type: trusted_networks
          trusted_networks:
            - 172.20.0.0/24 # The IP range you are getting the error from, but do this with caution and only use it on addresses in local network

    Let me know @davidepanato if this fixes it.

  11. davidepanato commented on May 20, 2025

    @davidepanato
    Author

    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

  12. Makhuta commented on May 20, 2025

    @Makhuta
    Contributor

    So add also the range the nginx is in

  13. mkanet commented on May 20, 2025

    @mkanet
    Collaborator

    @davidepanato like this...

    homeassistant:
      auth_providers:
        - type: trusted_networks
          trusted_networks:
            - 172.20.0.0/24
            - 192.168.178.0/24
  14. davidepanato commented on Jun 14, 2025

    @davidepanato
    Author

    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:

    homeassistant:
      auth_providers:
        - type: homeassistant
        - type: trusted_networks
          trusted_networks:
            - 172.20.0.0/24
    

    but unfortunately error is still there:

    Logger: homeassistant.components.http.ban
    Source: components/http/ban.py:136
    integration: HTTP (documentation, issues)
    First occurred: 2:21:06 PM (2 occurrences)
    Last logged: 2:21:06 PM
    
    Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=23404&thumb=1749073501&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMzQwNCJdLFsidGh1bWIiLCIxNzQ5MDczNTAxIl1dLCJpYXQiOjE3NDk4OTA2NTYsImV4cCI6MTc0OTg5MTI1Nn0.T_5yVW3SWkltU2WSqt9ihxRm0jlyESNW8bvKEVO2ReA'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.89 Safari/537.36)
    Login attempt or request with invalid authentication from pi.hole (172.20.0.1). Requested URL: '/plex_recently_added?metadata=23404&art=1749073501&authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2M2ZkMzE0YmIyNjk0OGRjODQ3ZDJhNjMzNjNhMmVjNiIsInBhdGgiOiIvcGxleF9yZWNlbnRseV9hZGRlZCIsInBhcmFtcyI6W1sibWV0YWRhdGEiLCIyMzQwNCJdLFsiYXJ0IiwiMTc0OTA3MzUwMSJdXSwiaWF0IjoxNzQ5ODkwNjU2LCJleHAiOjE3NDk4OTEyNTZ9.O_Pd6oSQl0B6UkljC4hfKIN8Ni9JnEyp528ohHEr9Fs'. (Mozilla/5.0 (Linux; Android 12; SM-T500 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.89 Safari/537.36)
    

    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

  15. Makhuta commented on Jun 14, 2025

    @Makhuta
    Contributor

    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?

  16. davidepanato commented on Jun 14, 2025

    @davidepanato
    Author

    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

  17. Makhuta commented on Jun 14, 2025

    @Makhuta
    Contributor

    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.

  18. davidepanato commented on Jun 14, 2025

    @davidepanato
    Author

    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

  19. Makhuta commented on Jun 14, 2025

    @Makhuta
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions