Skip to content

torbrowser-launcher fails to find share directory #61028

@dexgs

Description

@dexgs

Is this a new report?

Yes

System Info

Void 6.18.35_1 x86_64 GenuineIntel notuptodate rrrrrmDFFFFFFFFFFFF

Package(s) Affected

torbrowser-launcher-0.3.9_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

torbrowser-launcher should not exit with an error and should launch the tor browser

Actual behaviour

torbrowser-launcher currently fails with:

Traceback (most recent call last):
  File "/usr/bin/torbrowser-launcher", line 31, in <module>
    torbrowser_launcher.main()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/lib/python3.14/site-packages/torbrowser_launcher/__init__.py", line 72, in main
    with open(os.path.join(SHARE, "version")) as buf:
         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/share/torbrowser-launcher/version'

This appears to be caused by this line: https://github.com/torproject/torbrowser-launcher/blob/ab97d7f9d1e3559c9a3b344fd5d74cb558dff81d/torbrowser_launcher/common.py#L40

The value of SHARE is used to locate the launcher's files and is based on the value of sys.prefix. Currently, sys.prefix in python 3.14 expands to /usr/lib/, so torbrowser-launcher searches in usr/lib/share, but the package files are really installed in /usr/share/, so the program fails.

Steps to reproduce

  1. run torbrowser-launcher and inspect the command line output (it fails with the error above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-testingTesting a PR or reproducing an issue needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions