tubearchivist / tubearchivist-plex

Tube Archivist Plex Integration
GNU General Public License v3.0
89 stars 6 forks source link

[Installation Help]: Empty library & 404 in log files #68

Open lesleyxyz opened 1 month ago

lesleyxyz commented 1 month ago

Installation instructions

Operating System

Debian + Docker (linuxserver/plex)

Your installation or setup question

Plex is fully functional TA is fully functional Using the latest versions for plex, TA and the integration.

I followed the tutorial and edited all the api key & URL. I created a new library with the agent & scanner selected (which I assume indicates it loaded correctly in plex?). The first issue I have is I HAVE to select a library from plex. I just selected a random folder. Is this correct? Maybe it should be documented?

Now when I go to the library, scan for files or refresh meta data it stays empty. (related to #52 ?) I've attached the "com.plexapp.agents.tubearchivist_agent.log" file below. However, unfortunately, I do not see a "TubeArchivist Scanner" folder with a "root.scanner.log" in it.

Any guidance on this? (My previous issue was due to an invalid API token, I fixed it so I got past the last error)

Relevant log output

lesley@docker:/mnt/zfs/lesflix/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs$ cat com.plexapp.agents.tubearchivist_agent.log
2024-05-23 22:58:57,898 (7feb7f55d808) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: c67dce2 (Thu Apr 18 13:27:58 UTC 2024)
2024-05-23 22:58:57,899 (7feb7f55d808) :  DEBUG (core:361) - Using the elevated policy
2024-05-23 22:58:57,899 (7feb7f55d808) :  DEBUG (core:450) - Starting runtime component.
2024-05-23 22:58:57,901 (7feb7f55d808) :  DEBUG (core:450) - Starting caching component.
2024-05-23 22:58:57,901 (7feb7f55d808) :  DEBUG (core:450) - Starting data component.
2024-05-23 22:58:57,901 (7feb7f55d808) :  DEBUG (core:450) - Starting networking component.
2024-05-23 22:58:57,902 (7feb7f55d808) :  DEBUG (networking:262) - Loaded HTTP cookies
2024-05-23 22:58:57,902 (7feb7f55d808) :  DEBUG (networking:434) - Setting the default network timeout to 20.0
2024-05-23 22:58:57,903 (7feb7f55d808) :  DEBUG (core:450) - Starting localization component.
2024-05-23 22:58:57,903 (7feb7f55d808) :  INFO (localization:409) - Setting the default locale to en-us
2024-05-23 22:58:57,903 (7feb7f55d808) :  DEBUG (core:450) - Starting messaging component.
2024-05-23 22:58:57,904 (7feb7f55d808) :  DEBUG (core:450) - Starting debugging component.
2024-05-23 22:58:57,904 (7feb7c13fb38) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.tubearchivist_agent'
2024-05-23 22:58:57,904 (7feb7f55d808) :  DEBUG (core:450) - Starting services component.
2024-05-23 22:58:57,905 (7feb7f55d808) :  DEBUG (core:450) - Starting myplex component.
2024-05-23 22:58:57,905 (7feb7f55d808) :  DEBUG (core:450) - Starting notifications component.
2024-05-23 22:58:58,008 (7feb7f55d808) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.tubearchivist_agent in namespace 'metadata'
2024-05-23 22:58:58,013 (7feb7f55d808) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2024-05-23 22:58:58,018 (7feb7f55d808) :  ERROR (networking:197) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2024-05-23 22:58:58,020 (7feb7f55d808) :  CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c67dce28e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1293, in get_resource_hashes
    json = self._core.networking.http_request("http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes", timeout=10).content
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c67dce28e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 243, in content
    return self.__str__()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c67dce28e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 221, in __str__
    self.load()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c67dce28e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 159, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

2024-05-23 22:58:58,027 (7feb7bf05b38) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2024-05-23 22:58:58,027 (7feb7f55d808) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2024-05-23 22:58:58,028 (7feb7bf05b38) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2024-05-23 22:58:58,029 (7feb7bebfb38) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400'
2024-05-23 22:58:58,029 (7feb7f55d808) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2024-05-23 22:58:58,030 (7feb7f55d808) :  DEBUG (core:150) - Finished starting framework core
2024-05-23 22:58:58,030 (7feb7f55d808) :  DEBUG (core:560) - Loading plug-in code
2024-05-23 22:58:58,057 (7feb7bebfb38) :  DEBUG (core:538) - Machine identifier is 37bb33618adc6d643238291643924a442ad2cd8c
2024-05-23 22:58:58,057 (7feb7bf05b38) :  DEBUG (services:362) - Loaded services
2024-05-23 22:58:58,058 (7feb7bebfb38) :  DEBUG (core:539) - Server version is 1.40.2.8395-c67dce28e
2024-05-23 22:58:58,068 (7feb7bee2b38) :  DEBUG (services:438) - No shared code to load
2024-05-23 22:58:58,211 (7feb7f55d808) :  DEBUG (core:566) - Finished loading plug-in code
2024-05-23 22:58:58,214 (7feb7f55d808) :  DEBUG (agentkit:1132) - Creating new agent class called TubeArchivistYTSeriesAgent
2024-05-23 22:58:58,215 (7feb7f55d808) :  DEBUG (agentkit:937) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': ['com.plexapp.agents.none'], 'languages': ['xn', 'en'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'TubeArchivist Agent'}]
2024-05-23 22:58:58,215 (7feb7f55d808) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo3CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0Cmxpc3QKMgpzMzgKY29tLnBsZXhhcHAuYWdlbnRzLnR1YmVhcmNoaXZpc3RfYWdlbnRzMTAKaWRlbnRpZmllcnIxCnMxMAphZ2VudF9pbmZvMQpyMgoxMApyMwpzMTEKbWVkaWFfdHlwZXNyNApzMTIKYWNjZXB0c19mcm9tYjBzMTQKZmFsbGJhY2tfYWdlbnRyNQpzMTQKY29udHJpYnV0ZXNfdG9yNgpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxOQpUdWJlQXJjaGl2aXN0IEFnZW50czQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMQpzMjMKY29tLnBsZXhhcHAuYWdlbnRzLm5vbmUyCnMyCnhuczIKZW5yMAo_'
2024-05-23 22:58:58,222 (7feb7f55d808) :  INFO (__init__:1014) - Starting up TubeArchivist Agent...
2024-05-23 22:58:58,222 (7feb7f55d808) :  INFO (core:611) - Started plug-in
2024-05-23 22:58:58,222 (7feb7f55d808) :  DEBUG (socketinterface:160) - Starting socket server
2024-05-23 22:58:58,223 (7feb7f55d808) :  DEBUG (runtime:1117) - Created a thread named 'start'
2024-05-23 22:58:58,223 (7feb7f55d808) :  INFO (socketinterface:184) - Socket server started on port 45035
2024-05-23 22:58:58,223 (7feb7f55d808) :  INFO (pipeinterface:25) - Entering run loop
2024-05-23 22:58:58,223 (7feb7f55d808) :  DEBUG (runtime:717) - Handling request GET /:/prefixes
2024-05-23 22:58:58,224 (7feb7f55d808) :  DEBUG (runtime:814) - Found route matching /:/prefixes
2024-05-23 22:58:58,225 (7feb7f55d808) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 163 bytes
2024-05-23 22:58:58,227 (7feb7b9acb38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 22:58:58,239 (7feb7b9acb38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 22:58:58,239 (7feb7b9acb38) :  WARNING (data:179) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting value: line 7 column 1 (char 817)
2024-05-23 22:58:58,242 (7feb7b9acb38) :  DEBUG (preferences:258) - Loaded preferences from DefaultPrefs.json
2024-05-23 22:58:58,243 (7feb7b9acb38) :  DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.agents.tubearchivist_agent
2024-05-23 22:58:58,244 (7feb7b9acb38) :  DEBUG (runtime:88) - Sending packed state data (119 bytes)
2024-05-23 22:58:58,244 (7feb7b9acb38) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 958 bytes
2024-05-23 23:02:01,810 (7feb7b9acb38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 23:02:01,835 (7feb7b9acb38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 23:02:01,842 (7feb7b9acb38) :  DEBUG (runtime:88) - Sending packed state data (119 bytes)
2024-05-23 23:02:01,842 (7feb7b9acb38) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 958 bytes
2024-05-23 23:02:13,723 (7feb7b9acb38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 23:02:13,727 (7feb7b9acb38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.tubearchivist_agent/prefs
2024-05-23 23:02:13,733 (7feb7b9acb38) :  DEBUG (runtime:88) - Sending packed state data (119 bytes)
2024-05-23 23:02:13,734 (7feb7b9acb38) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 958 bytes
lesley@docker:/mnt/zfs/lesflix/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs$
lamusmaser commented 1 month ago

Acknowledged. When I'm next at a computer, I'll fully respond and provide additional guidance for your issues.

BTW, if the scanner log isn't showing, usually that means the scanner isn't setup correctly. Double-check those instructions again to see if there is something that was missed. Otherwise, I'll run through those steps later.

lesleyxyz commented 1 month ago

Thanks for the swift replies. In the mean time I'll try some more as well.

For validation, here are my Plug-ins and Scanners folder with their permission:

lesley@docker:/mnt/zfs/lesflix/config/Library/Application Support/Plex Media Server$ tree -pu Plug-ins/ Scanners/
[drwxr-xr-x lesley  ]  Plug-ins/
└── [drwxr-xr-x lesley  ]  TubeArchivist-Agent.bundle
    ├── [drwxr-xr-x lesley  ]  Contents
    │   ├── [drwxr-xr-x lesley  ]  Code
    │   │   └── [-rw-r--r-- lesley  ]  __init__.py
    │   ├── [-rw-r--r-- lesley  ]  DefaultPrefs.json
    │   └── [-rw-r--r-- lesley  ]  Info.plist
    ├── [-rw-r--r-- lesley  ]  LICENSE
    └── [-rw-r--r-- lesley  ]  README.md
[drwxr-xr-x lesley  ]  Scanners/
├── [drwxr-xr-x lesley  ]  Credits Detection
│   └── [-rw-r--r-- lesley  ]  model_v1.pb
└── [drwxr-xr-x lesley  ]  Series
    ├── [-rw-r--r-- lesley  ]  ta_config.json
    └── [-rw-r--r-- lesley  ]  TubeArchivist Series Scanner.py
7 directories, 8 files

(notice the Credits Detection plugin which is working correctly)

lesleyxyz commented 1 month ago

For me specifically, I was able to fix it by: 1) Instead of setting a random directory part of the Plex Library, set it to the tubearchiviest directory -> Is this what you are supposed to do? If so, this is undocumented

2) Allow the requests through Cloudflare as described in #32

lamusmaser commented 1 month ago

In response to 1, this can be included. For 2, I'll try to find some way between the two Issues to add that to the troubleshooting steps. But you are good to go and it is working now?

lesleyxyz commented 1 month ago

Great, and yes I'm good to go and everything is working. You can close it if you want. Thank you

lamusmaser commented 1 month ago

Okay, thank you for confirming. I'll leave this open until those documentation updates are made.