pannal / Sub-Zero.bundle

Subtitles for Plex, as good you would expect them to be.
Other
1.76k stars 120 forks source link

Plugin being moved to Deactivated directory #762

Open glensc opened 3 years ago

glensc commented 3 years ago

Something fishy is happening with Plex.

I noticed such logs in my system:

Feb 27, 2021 21:55:52.943 [0xa88f9430] WARN - Warning: ex: boost::filesystem::last_write_time: No such file or directory: "/config/Library/Application Support/Plex Media Server/Plug-ins/Sub-Zero.bundle/Contents/Code", couldn't check file: "/config/Library/Application Support/Plex Media Server/Plug-ins/Sub-Zero.bundle/Contents/Code"

I checked the container, indeed the directory was empty. Ok, I had docker restart, maybe that's fault. Cloned again.

And at some time later, again, the directory is emptied.

Seems it's moved to Plug-in Support/Data/com.plexapp.system/DataItems/Deactivated/com.plexapp.agents.subzero/Sub-Zero.bundle/Sub-Zero.bundle

Why? how to prevent this from happening?

I've kept my plex media server to old version due the new agenda problem:

so, it's not related to some recent Plex update and plan to kill plugin support?

My current version is this docker image: linuxserver/plex:1.20.3.3437-f1f08d65b-ls119

glensc commented 3 years ago

More details:

$ cd "/config/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.system/DataItems"

$ find -name Sub-Zero.bundle -o -name com.plexapp.agents.subzero
./Stage/com.plexapp.agents.subzero
./Deactivated/com.plexapp.agents.subzero
./Deactivated/com.plexapp.agents.subzero/Sub-Zero.bundle
./Deactivated/com.plexapp.agents.subzero/Sub-Zero.bundle/Sub-Zero.bundle
$
glensc commented 3 years ago

Cloned again, this time keeping it root owned, so PMS can't remove it and noticed these logs.

It seems to pull this version:

2021-02-27 23:13:43,871 (-4fe02ba0) :  INFO (storeservice:356) - Starting automatic update check
2021-02-27 23:13:43,875 (-4fe02ba0) :  DEBUG (runtime:1117) - Created a thread named 'remove_unavailable_agents
'
2021-02-27 23:13:43,880 (-4fe02ba0) :  DEBUG (networking:143) - Requesting 'https://plugins.plex.tv/apps/all.js
on?frameworkVersion=2.6.3&machineIdentifier=&os=Linux&osVersion=5.4.51-
v7l%2B&cpu=armv5tel&serverVersion=1.20.3.3437-f1f08d65b&systemRevision=f1f08d6'
2021-02-27 23:13:44,059 (-4fe02ba0) :  INFO (storeservice:495) - No beta plugins.                              2021-02-27 23:13:44,074 (-4fe02ba0) :  INFO (storeservice:528) - 'Sub-Zero' plug-in [com.plexapp.agents.subzero
] has an update available  (None => 2cc54634)
2021-02-27 23:13:44,075 (-4fe02ba0) :  INFO (storeservice:531) - 'Services' plug-in [com.plexapp.system.service
s] is up to date (62fcf1f)
2021-02-27 23:13:44,076 (-4fe02ba0) :  INFO (storeservice:359) - Starting automatic update installation        2021-02-27 23:13:44,077 (-4fe02ba0) :  INFO (installservice:276) - Performing an update of com.plexapp.agents.$
ubzero
2021-02-27 23:13:44,078 (-4fe02ba0) :  INFO (installservice:96) - Setting up staging area for com.plexapp.agen$s.subzero at /config/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.system/Dat$
Items/Stage/com.plexapp.agents.subzero
2021-02-27 23:13:44,079 (-4fe02ba0) :  DEBUG (networking:143) - Requesting 'https://bundle-archive.plex.tv/ple$
inc-agents/Sub-Zero.bundle/archive/2cc54634.zip'
2021-02-27 23:13:45,775 (-4fe02ba0) :  INFO (installservice:236) - Not extracting Sub-Zero.bundle-2cc54634778a$
dd523fc4ce84dbe631e30b5d08a/

... seems it's trying to auto update and fails...?

glensc commented 3 years ago

When I copied the contents from Staged directory as Plugins/Sub-Zero.bundle, it still tries to update and move it:

2021-02-27 23:34:18,312 (-50703ba0) :  INFO (storeservice:495) - No beta plugins.
2021-02-27 23:34:18,343 (-50703ba0) :  INFO (storeservice:528) - 'Sub-Zero' plug-in [com.plexapp.agents.subzero
] has an update available  (2cc5463 => 2cc54634)
pannal commented 3 years ago

How are you installing Sub-Zero? Which version do you use?

glensc commented 3 years ago

@pannal with git clone and master branch, likely 3f47c1bcb898a39dfd20e0c2e6f28acba1079768, as the other instructions do not work, there's no install method that I could find from https://app.plex.tv/desktop.

And my second note also indicates that I use the git clone mechanism:

Here's another problem that should be addressed separately, hash length difference triggers re-install: (2cc5463 => 2cc54634), but I'm not sure if that problem is of publishing this bundle or Plex itself, I'm not familiar with the ecosystem.

glensc commented 3 years ago

My install methods is setup that i clone as root to:

cloning as root is required, otherwise Plex auto-updates, removes from the old location, and fails to enable plugin again, and I'm left without the plugin.

Please indicate what is the correct way of installing, and ensure those instructions are present in README.

pannal commented 3 years ago

Which branch do you checkout? If it's not a develop branch, Plex will auto-upgrade/downgrade.

Try this branch: https://github.com/pannal/Sub-Zero.bundle/tree/develop-2.6

It has a flag set so that Plex doesn't handle it automatically.

pannal commented 3 years ago

Or you can set the flag yourself for the version you desire - it's in Contents/Info.plist PlexPluginDevMode. Then you also don't need to force Plex into submission by checking out as root.

glensc commented 3 years ago

@pannal, I checked out the default branch:

git clone https://github.com/pannal/Sub-Zero.bundle
glensc commented 3 years ago

@pannal do the install instructions in the readme work in any setup anymore?

I don't even have a search option there...

How the plugin must be installed today?

pannal commented 3 years ago

Installation instructions were not up to date, you're right. Fixed that.

Nowadays, as Plex removed most of their Plugin features, you'll have to do a manual installation. If you stay with an official release of Sub-Zero, it will still get auto updates via the plugin repository. For the non-official stuff you need to set the dev flag.

glensc commented 3 years ago

@pannal but the problem reported here is that once auto-update is completed, the plugin is deactivated.

pannal commented 3 years ago

Yeah I have no idea to be honest. You'd need to checkout either the develop-2.6 branch or the master branch and set the Dev flag to skip the auto update.

glensc commented 3 years ago

@pannal thanks for the answer. I've done so for now.

But the issue can be kept open, to be fixed properly in the future.