WarmUpTill / SceneSwitcher

An automated scene switcher for OBS Studio
https://obsproject.com/forum/resources/automatic-scene-switching.395/
GNU General Public License v2.0
912 stars 70 forks source link

Failure loading Advanced Scene Switcher on OBS v30.2.0 (Ubuntu 24.04 | Flatpak) #1157

Closed ninbura closed 1 month ago

ninbura commented 1 month ago

Describe the bug OBS fails to load Advanced Scene Switcher plugin on Ubuntu 24.04 with OBS v30.2.0 & Advanced Scene Switcher v1.26.4 plugin installed via Flatpak.

To Reproduce

  1. Install OBS via Flatpak
  2. Install Advanced Scene Switcher via Flatpak
  3. Launch OBS
  4. See error (ibobs-frontend-api.so.0 issue)

Expected behavior Advance scene switch should properly load when installed alongside OBS via Flatpak.

Logs

os_dlopen(/app/plugins/lib/obs-plugins/advanced-scene-switcher-lib.so->/app/plugins/lib/obs-plugins/advanced-scene-switcher-lib.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory
00:57:48.283: 
00:57:48.290: os_dlopen(/app/plugins/lib/obs-plugins/advanced-scene-switcher-lib.so->/app/plugins/lib/obs-plugins/advanced-scene-switcher-lib.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory
00:57:48.290: 
00:57:48.290: Module '/app/plugins/lib/obs-plugins/advanced-scene-switcher-lib.so' not loaded
00:57:48.300: os_dlopen(/app/plugins/lib/obs-plugins/advanced-scene-switcher.so->/app/plugins/lib/obs-plugins/advanced-scene-switcher.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory
00:57:48.300: 
00:57:48.309: os_dlopen(/app/plugins/lib/obs-plugins/advanced-scene-switcher.so->/app/plugins/lib/obs-plugins/advanced-scene-switcher.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory
00:57:48.309: 
00:57:48.309: Module '/app/plugins/lib/obs-plugins/advanced-scene-switcher.so' not loaded

Version information

Additional context Seems like the issue isn't exclusive to the Advanced Scene Switcher plugin as seen here → https://github.com/sorayuki/obs-multi-rtmp/issues/436. As far as I can tell, this only started happening after the v30.2.0 update for OBS. Likewise, it is not necessarily a problem for all plugins. The obs-ndi plugin installed via Flatpak still works just fine on the latest version of OBS.

chriseaton commented 1 month ago

This is related to #1007 Even copying those required libs into the flatpak libs will fail. The current flatpaks for OBS look for libopencv_objdetect.so.4.5d which is not present (same within newer distros). Fedora is on opencv 4.9, and Ubuntu is also newer. Symlinks won't work either as they are not backwards compatible.

What's odd is it actually will open the plugin and seems to work, even with the plugin failure message popup, so I'm not sure what opencv is even doing.

ninbura commented 1 month ago

I'm still not understanding the situation fully, but I can say that the Flatpak versions of Advance Scene Switcher v1.26.4 + OBS v30.1.2 were fully functional on my Ubuntu v23.10 install a week and a half ago without manual intervention of any kind before I upgraded to Ubuntu v24.04. Contrary to the information found in https://github.com/WarmUpTill/SceneSwitcher/issues/1007.

I was never checking logs, because everything was working. So, it's possible there was still an error. But functionally there were no problems. I had been running Advance Scene Switcher and OBS via Flatpak for around 6 months, taking updates as they came, prior to updating to Ubuntu v24.04.

Regarding the current situation on my system, the errors linked in the OP display, and the plugin is absent in the "Tools" dropdown list.

juliocargnin commented 1 month ago

It seems not a problem on Ubuntu 24.04 cause I'm in 22.04 and I'm facing the same issue. Suddenly ASW desapered from the dropdown list and I can't use it anymore in OBS 30.2.2 via Flatpak.

WarmUpTill commented 1 month ago

Sorry for not replying earlier and thank you for reporting the issue! I will look into the issue as soon as I will be able to, which will likely be the end of next week.

I assume the issue is slightly different to #1007 as I would expect the dependencies to be handled by the flatpak runtime environment.

WarmUpTill commented 1 month ago

I managed to perform some quick tests already today.

Seems like the issue of the flatpak version of the advanced scene switcher not being able to load might have been caused by a change on OBS side. A simple re-build of the plugin against the latest OBS build for flatpak seems to resolve the issue on my end.

Can you please check if the following test build of the plugin works in combination with your fatpak OBS install?

flatpak install --user https://dl.flathub.org/build-repo/119862/com.obsproject.Studio.Plugin.SceneSwitcher.flatpakref

(The build was here: https://github.com/flathub/com.obsproject.Studio.Plugin.SceneSwitcher/pull/66)

If that is the case I will merge the changes officially.

juliocargnin commented 1 month ago

It solves for me on Pop!_OS 22.04 LTS OBS 30.2.2 Thank you so much!

ninbura commented 1 month ago

Can you please check if the following test build of the plugin works in combination with your fatpak OBS install?

flatpak install --user https://dl.flathub.org/build-repo/119862/com.obsproject.Studio.Plugin.SceneSwitcher.flatpakref

(The build was here: flathub/com.obsproject.Studio.Plugin.SceneSwitcher#66)

If that is the case I will merge the changes officially.

This fixed the problem on my machine as well 👍️

WarmUpTill commented 1 month ago

Great! I have merged the changes now.

Thanks for your support and patience!