LizardByte / Themerr-plex

Plugin for Plex Media Server that adds theme songs to movies using ThemerrDB.
https://app.lizardbyte.dev/ThemerrDB
GNU Affero General Public License v3.0
71 stars 4 forks source link

Plex unable to start with plugin on #10

Closed fede843 closed 2 years ago

fede843 commented 2 years ago

Describe the Bug

Plex unable to start with plugin on

Expected Behavior

Plex to start with plugin

Additional Context

I am using current latest plex version on docker (1.29.0.6244). I have downloaded plugin v0.0.1 and uncompressed it in plugin directory. Docker logs show:

Error starting framework core for /config/Library/Application Support/Plex Media Server/Plug-ins/Themerr-plex.bundle. I am aware this is a very fresh project. Let me now if you need further debugging.

Cheers!

ReenigneArcher commented 2 years ago

Thanks for the bug report. I have not tested in Docker yet. Are you able to share the full plugin logs?

Plugin log location -> https://support.plex.tv/articles/201106148-channel-log-files/

fede843 commented 2 years ago

Sure!

2022-10-04 14:01:08,810 (-490a0254) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: 819d367 (Fri Sep 23 01:21:30 UTC 2022)
2022-10-04 14:01:08,811 (-490a0254) :  DEBUG (core:361) - Using the elevated policy
2022-10-04 14:01:08,812 (-490a0254) :  DEBUG (core:450) - Starting runtime component.
2022-10-04 14:01:09,075 (-490a0254) :  DEBUG (core:450) - Starting caching component.
2022-10-04 14:01:09,076 (-490a0254) :  DEBUG (core:450) - Starting data component.
2022-10-04 14:01:09,076 (-490a0254) :  DEBUG (core:450) - Starting networking component.
2022-10-04 14:01:09,081 (-490a0254) :  DEBUG (networking:261) - Loaded HTTP cookies
2022-10-04 14:01:09,583 (-490a0254) :  DEBUG (caching:108) - No info file found, trashing the cache folder
2022-10-04 14:01:10,568 (-490a0254) :  DEBUG (networking:428) - Setting the default network timeout to 20.0
2022-10-04 14:01:10,570 (-490a0254) :  DEBUG (core:450) - Starting localization component.
2022-10-04 14:01:10,571 (-490a0254) :  INFO (localization:409) - Setting the default locale to en-us
2022-10-04 14:01:10,571 (-490a0254) :  DEBUG (core:450) - Starting messaging component.
2022-10-04 14:01:10,573 (-490a0254) :  DEBUG (core:450) - Starting debugging component.
2022-10-04 14:01:10,574 (-4b784288) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/dev.lizardbyte.themerr-plex'
2022-10-04 14:01:10,574 (-490a0254) :  DEBUG (core:450) - Starting services component.
2022-10-04 14:01:10,581 (-490a0254) :  DEBUG (core:450) - Starting myplex component.
2022-10-04 14:01:10,581 (-490a0254) :  DEBUG (core:450) - Starting notifications component.
2022-10-04 14:01:11,762 (-490a0254) :  DEBUG (accessor:68) - Creating a new model access point for provider dev.lizardbyte.themerr-plex in namespace 'metadata'
2022-10-04 14:01:11,797 (-490a0254) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2022-10-04 14:01:12,787 (-490a0254) :  ERROR (networking:196) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2022-10-04 14:01:12,815 (-490a0254) :  CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/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-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 242, in content
    return self.__str__()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 220, in __str__
    self.load()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 158, 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

2022-10-04 14:01:12,866 (-4b8aa288) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2022-10-04 14:01:12,866 (-490a0254) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2022-10-04 14:01:12,869 (-490a0254) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2022-10-04 14:01:12,870 (-490a0254) :  DEBUG (core:150) - Finished starting framework core
2022-10-04 14:01:12,871 (-490a0254) :  DEBUG (core:560) - Loading plug-in code
2022-10-04 14:01:12,890 (-4b8fa288) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400'
2022-10-04 14:01:12,894 (-4b8aa288) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2022-10-04 14:01:13,040 (-490a0254) :  DEBUG (core:566) - Finished loading plug-in code
2022-10-04 14:01:13,126 (-4b8fa288) :  DEBUG (core:538) - Machine identifier is 8b6670a475dd32b797397bd58111f6fd65047599
2022-10-04 14:01:13,129 (-4b8aa288) :  DEBUG (services:362) - Loaded services
2022-10-04 14:01:13,172 (-4b8fa288) :  DEBUG (core:539) - Server version is 1.29.0.6244-819d3678c
2022-10-04 14:01:13,222 (-4b8d7288) :  DEBUG (services:438) - No shared code to load
2022-10-04 14:01:13,439 (-490a0254) :  CRITICAL (core:615) - Exception starting plug-in (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 608, in start
    self.sandbox.execute(self.init_code)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 256, in execute
    exec(code) in self.environment
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Themerr-plex.bundle/Contents/Code/__init__.py", line 9, in <module>
    from plexhints import plexhints_setup, update_sys_path
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-819d3678c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 345, in __import__
    raise e
ImportError: No module named plexhints
ReenigneArcher commented 2 years ago

Thanks. I can solve that rather easily. Apparently the python interpreter used in plex docker is named differently than on Windows, where it is named plexscripthost.

https://github.com/LizardByte/Themerr-plex/blob/b7764d38cfba8b747075330252b9703d13035cda/Contents/Code/__init__.py#L8

ReenigneArcher commented 2 years ago

Any chance you can modify files in the container? If you could add this after import sys, and share the log again it would be helpful.

Log.Debug("Python system executable: '%s'" % sys.executable)

Edit: This would be in the Themerr-plex.bundle/Contents/Code/__init__.py file.

fede843 commented 2 years ago

Great! I have subscribed for new release. I'll give it a try when appears!

fede843 commented 2 years ago

Any chance you can modify files in the container? If you could add this after import sys, and share the log again it would be helpful.

Log.Debug("Python system executable: '%s'" % sys.executable)

let me try

fede843 commented 2 years ago

which file is that?

ReenigneArcher commented 2 years ago

Edit: This would be in the Themerr-plex.bundle/Contents/Code/__init__.py file.

Sorry, just updated my previous comment... This would be in the Themerr-plex.bundle/Contents/Code/__init__.py file.

fede843 commented 2 years ago

no luck

2022-10-04 14:56:41,185 (-490a9254) : DEBUG (__init__:6) - Python system executable: ''

ReenigneArcher commented 2 years ago

no luck

2022-10-04 14:56:41,185 (-490a9254) : DEBUG (__init__:6) - Python system executable: ''

Still helpful, thanks!

LizardByte-bot commented 2 years ago

This issue has been fixed and will be available in the next release.

ReenigneArcher commented 2 years ago

This is fixed, you can try the nightly docker image tag.

fede843 commented 2 years ago

I am using plex from their official image, with this plugin downloaded from github releases, here. I will wait for the release :) Thanks for the rapid response !