Skip to content

Bad Home resolution in Linux #206

@jpvalencia1289

Description

@jpvalencia1289

Describe the bug
Incorrect HOME path resolution (wrong username inferred)

Command used - any download with DSNP

While running VT-PR on Linux (Pop!_OS 22.04, Python 3.10), the program fails when attempting to write temporary files inside the user directory.
My actual username is jpvalencia, but the binary (or some internal part of the code) tries to write to a non-existent path using a malformed username:

My username is jpvalencia

The log says

/home/jpvaldecia/VT-PR/Temp/VideoTrack_xxxxx_dec.mp4
This results in
Packaging Error: 5 (FILE_FAILURE): Cannot open file to write '/home/jpvaldecia/VT-PR/Temp/VideoTrack_xxxxx_dec.mp4'
PermissionError: [Errno 13] Permission denied

Expected behavior

The program should resolve paths correctly based on the actual $HOME directory (/home/jpvalencia in this case) and not rely on hardcoded or misinterpreted usernames.

Steps to reproduce
1. Clone the repository under /home//VT-PR/.
2. Run poetry run vt ... or equivalent.
3. Observe that logs (from packager or related subprocesses) reference /home/jpvaldecia instead of the real home directory.

Temporary workaround

The issue can be bypassed by creating a symbolic link from the incorrect path to the real one.

Root cause hypothesis

It seems that one of the internal components — possibly shaka-packager or a related helper — constructs paths using an incorrect expansion of $HOME or a misread username, instead of reliably calling os.path.expanduser("~") or Path.home().

All environment variables ($HOME, $USER, whoami) return the correct username, and there are no alternate users configured on the system.

Environment
• OS: Pop!_OS 22.04 (Ubuntu-based)
• Python: 3.10.12
• Poetry: 1.8.5
• Branch: dev
• Execution: non-root user

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions