Skip to content

[BUG] KeyError: 'compatmanager_layer_name' when opening Compatibility settings #573

@fenuks

Description

@fenuks

Describe the bug

Opening Compatibility tab in Settings page results in an exception being thrown.

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/rare/components/tabs/settings/widgets/proton.py", line 69, in showEvent
    tools = steam.find_tools()
  File "/usr/lib/python3.13/site-packages/rare/utils/compat/steam.py", line 413, in find_tools
    _tools = _find_tools()
  File "/usr/lib/python3.13/site-packages/rare/utils/compat/steam.py", line 385, in _find_tools
    runtimes.update(find_runtimes(steam_path, library))
                    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/rare/utils/compat/steam.py", line 216, in find_runtimes
    if toolmanifest["manifest"]["compatmanager_layer_name"] == "container-runtime":
       ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'compatmanager_layer_name'

Exception is thrown here.

I've added printing manifest line before, and it outputs

{'manifest': {'version': '2', 'commandline': '/proton %verb%', 'require_tool_appid': '1391110', 'use_sessions': '1'}}

I found comment here stating that Proton before 7.0 don't have this key,
so perhaps the line should be changed to

    if toolmanifest["manifest"].get("compatmanager_layer_name") == "container-runtime":

?

I can confirm that I have some older Proton versions installed.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to Settings
  2. Click on Compatibility
  3. See the error

System information

  • Operating system: Linux
  • Version: the latest git version, which is commit eab0b0f at the moment, the bug is also present in the latest stable release 1.11.3
  • Installation method: official Arch package for the stable version, rare-git from AUR for the latest git version
  • Python version: 3.13.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerslinuxAffects the Linux platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions