ILadis / ts3-qs4sd

TeamSpeak 3 quick access for Steam Deck.
GNU General Public License v2.0
40 stars 3 forks source link

Does not Work in chimeraos #14

Closed SaulGoodman1337 closed 1 month ago

SaulGoodman1337 commented 4 months ago

I'm already using the plugin on the Steamdeck and it's great. Now I wanted to install it on chimeraos but the plugin tells me that TS3 is not installed, but it is... Do you think you could take a look at it?

Screenshot from gaming mode on chimeraos ![IMG_0993](https://github.com/ILadis/ts3-qs4sd/assets/4953452/df492825-2cfe-4d69-92cd-41559e225b51)
ILadis commented 4 months ago

Since I don't have a device running ChimeraOS I'd first like to try and troubleshoot this by gathering some information.

The plugin essentially runs the following command to determine whether TS3 is installed:

$ flatpak list

Could you please run this command from desktop mode and post the output here.

Do you happen to know whether desktop and gaming mode are using different users? This could be a potential problem. Are you using other Decky plugins which also require a particular Flatpak application to function?

I'm also going to prepare a new version of the plugin with more debug logs. Once this version is available and installed on your ChimeraOS device, the logfile could provide enough information to find the cause of the issue.

On another note:
Since you are already using the plugin on your Deck, I'd like to encourage you to test out the new version (1.1.5) which is currently available on the testing store. You can read about whats new in this pull request. It would help a lot if you submit a test report afterwards as a comment on the pull request.

SaulGoodman1337 commented 3 months ago

Hi, I don't have the ChimeraOS PC available at the moment, but I can tell you that the output of the flatpak list is correct. I had already looked into your code and checked how you determine whether Teamspeak is installed.

But another question, is the user "deck" mandatory? ChimeraOS has the user "gamer" by default.

But I will of course provide you with the output at the next opportunity. I'll be happy to try out your test version on the deck, thank you.

lutzgooren commented 3 months ago

Hi there, I'm currently running bazzite-deck40 with the latest version of your plugin (1.1.5 pre-release) and I'm encountering the same issue as OP. Running flatpak list shows that TeamSpeak3 is installed: TeamSpeak3 com.teamspeak.TeamSpeak3 3.6.2 stable user Edit: I don't have any other plugins installed atm

SaulGoodman1337 commented 3 months ago

****@fedora:~$ flatpak list|grep teamspeak TeamSpeak3 com.teamspeak.TeamSpeak3 3.6.2 stable system

gibt es neuigkeiten hier? würde schon sehr gerne Teamspeak entspannt auf der Couch genießen dürfen :)

I have now also switched from ChimeraOS to Bazzite and still have the same problem.

ILadis commented 3 months ago

Today I made the effort installing ChimeraOS myself and was surprised that I didn't encounter the problem both of you described. Everything worked the same as in SteamOS.

As mentioned earlier I'm now going to prepare a new version of the plugin which outputs more logs. Maybe I can identify the issue this way.

@SaulGoodman1337: Please also make sure that you are using the latest available version of the plugin that is currently available from the testing store (1.1.5-3143b8b).

SaulGoodman1337 commented 3 months ago

Today I made the effort installing ChimeraOS myself and was surprised that I didn't encounter the problem both of you described. Everything worked the same as in SteamOS.

As mentioned earlier I'm now going to prepare a new version of the plugin which outputs more logs. Maybe I can identify the issue this way.

@SaulGoodman1337: Please also make sure that you are using the latest available version of the plugin that is currently available from the testing store (1.1.5-3143b8b).

Funny. Why does that work for you?

I now have the version you mentioned. How do I get the logfile ?

ILadis commented 3 months ago

Before you can grab the logfile download and install this "patched" version of the plugin.
These are the only changes I made compared to the current version:

diff --git a/main.py b/main.py
index b49f329..4afadfe 100644
--- a/main.py
+++ b/main.py
@@ -208,9 +208,14 @@ class FlatpakTeamSpeak(TeamSpeak):

   def is_installed(self):
     try:
+      decky_plugin.logger.info(f'is_running with env:\n{os.environ}')
       ls = subprocess.check_output(['flatpak', 'list'], encoding='utf-8')
+      decky_plugin.logger.info(f'flatpak list returned\n{ls}')
       return 'com.teamspeak.TeamSpeak3' in ls
-    except:
+    except Exception as error:
+      decky_plugin.logger.info(f'is_installed failed with: {error}')
+      import traceback
+      decky_plugin.logger.info(traceback.format_exc())
       return False

To install this version:

To be extra sure, verify afterwards that the main.py file located at /home/gamer/homebrew/plugins/ts3-qs4sd/ includes the changes mentioned above.

Then launch the plugin and wait until the "TeamSpeak 3 is not installed" message appears.

Now switch to desktop mode and upload the latest logfile from: /home/gamer/homebrew/logs/ts3-qs4sd/
Feel free to remove any sensitive information.

lutzgooren commented 3 months ago

Here you go 2024-05-17 07.37.22.log Just tested the same on my Deck, same issue. 2024-05-17 10.22.08.log

Just tested some more things. Works with the stable release channel of Decky Loader, but breaks with the 2.12.0-pre1 version. It's related to the new SteamOS Preview 3.6.X - Bazzite is probably running on the same branch, as I already have a toggle for mura compensation on that rig.

SaulGoodman1337 commented 3 months ago

That could be the case, of course... I have activated the beta branch. For chimera as well as for bazzite.

ILadis commented 3 months ago

Thanks for your thorough testing and for narrowing down the root cause of the issue @lutzgooren.

I could reproduce the issue, once I switched my ChimeraOS installation to the "unstable" branch. After adding some more output to the log file this message poped up:

flatpak: /tmp/_MEIrxvPNn/libssl.so.3: version `OPENSSL_3.2.0' not found (required by /usr/lib/libcurl.so.4)

I don't know why, but for some reason the PluginLoader process has the LD_LIBRARY_PATH environment variable set, which points to the folder from the error message (/tmp/_MEIrxvPNn/). If this environment variable is unset before running the flatpak commands everything works fine again.

I'm not sure if this "fix" should be included in any official version of the plugin because this could very well be an issue of the unstable branch. Nonetheless here's a version which should work on the "unstable" branch: plugin.zip.

Please report back, if this version is working for you.

Finally I want to remind you again about the open pull request for version 1.1.5 which is still missing a testing report. It would be really helpful if someone could spent some time testing the new features of this version and leave a comment on the pull request.

lutzgooren commented 3 months ago

I'm not sure if this "fix" should be included in any official version of the plugin because this could very well be an issue of the unstable branch. Nonetheless here's a version which should work on the "unstable" branch: plugin.zip.

There are some other plugins like NonSteamLaunchersDecky, HLTB and ProtonBadges that are breaking on 3.6.X too. It's probably better to wait for an "official" fix by either Valve or the Decky Loader devs. Thanks for the workaround though! :)

Finally I want to remind you again about the open pull request for version 1.1.5 which is still missing a testing report. It would be really helpful if someone could spent some time testing the new features of this version and leave a comment on the pull request.

Will do - Going to test some stuff out during the WE. Edit: @ILadis Just saw that your PR has been approved - Is a test report still needed?

ILadis commented 3 months ago

@lutzgooren Yes, a testing report is still required. The approval given by the maintainers is just to sent the version to the testing store. After that they wait for someone to comment on the PR with a testing report. If no issues were found by the tester the PR gets merged and the new version will be released to the public store.

SaulGoodman1337 commented 3 months ago

I would like to help you but I'm not quite sure what I should write in there now?

By the way, the fix works great! Thank you

ILadis commented 3 months ago

You can find all information about testing new plugin versions here.

You can also take a look at @lutzgooren's comment on the pull request. This is a great example of a testing report.

I've also discussed the issue/fix with other Decky developers and from my current understanding, the fix should very well be included in the next version of the plugin. The LD_LIBRARY_PATH environment variable is set during the start of any Decky plugin (it's actually set by a utility called pyinstaller). The directory it points to contains various runtime libraries for the python interpreter. This runtime can however interfere with other programs (in this case flatpak). By unsetting this variable flatpak is again using the correct libraries which are bundled with the system/OS.

ILadis commented 1 month ago

Fix is now also in master, see a9f02a24.

ILadis commented 2 days ago

Hey @SaulGoodman1337 and @lutzgooren, the fix is still not available in the official store. Please submit a testing report in the pull request to get the fix to production. Thanks!