WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate

Open Newbie012 opened this issue 3 years ago • 63 comments

Version

Microsoft Windows [Version 10.0.22000.1335]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.79.1-microsoft-standard-WSL2

Distro Version

Release: 20.04

Other Software

Visual Studio Code (1.74.1)

Repro Steps

  1. PS C:\Users\user> wsl.exe --update
  2. Open ubuntu terminal
  3. Get the following output:
<3>WSL (4564) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin
➜  ~

I'm sorry for the poor reproduction steps, it just happened when I ran wsl.exe --update

Expected Behavior

Should not throw an error.

Actual Behavior

Getting <3>WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin every time I open a terminal

Diagnostic Logs

Let me know about any information I need to supply.

Newbie012 avatar Dec 18 '22 08:12 Newbie012

~Got the same translation error <3>WSL (53) ERROR: UtilTranslatePathList:2671: Failed to translate E:\SomePath\ when trying to open a folder in WSL using VSCode.~

EDIT: Actually the error was because E: did not exist on that machine.

qdm12 avatar Dec 19 '22 18:12 qdm12

@qdm12 and it seems like F does not exist in my machine as well. Is it hardcoded somewhere?

Newbie012 avatar Dec 19 '22 23:12 Newbie012

It's in my PATH environnement variable defined on Windows. Maybe WSL should just ignore non existant path values ?

qdm12 avatar Dec 20 '22 06:12 qdm12

Thanks for the tip! although it looks like even after I remove that path and restart WSL, the error persists.

Newbie012 avatar Dec 20 '22 11:12 Newbie012

Did you close and re-open your shell/terminal? Such that the environment variables get reloaded. Otherwise try a reboot?

qdm12 avatar Dec 20 '22 11:12 qdm12

@qdm12 Problem solved. Restarting the shell seems to do the trick. Thanks!

Newbie012 avatar Dec 20 '22 11:12 Newbie012

Hi, I have the same problem. I tried to restart the shell and reboot but the problem persists

<3>WSL (723) ERROR: UtilTranslatePathList:2671: Failed to translate Z:\home\gianni\dev\gettse

romaluca avatar Dec 21 '22 06:12 romaluca

I had <3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate F:\DATI\platform-tools I was fixing it set path | findstr platform-tools inside it find a ... ;F:\DATI\platform-tools; ... so check envinronment variables follow instruction on this link https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html delete the line error or correct it with the correct path in my situation my drive was E:

after correct it i fix that error/warning

WinSSitaly avatar Dec 21 '22 07:12 WinSSitaly

cool, just the path environment variable in windows, just delete it in your windows.

skyw4rd avatar Jan 07 '23 10:01 skyw4rd

My organization adds network drives to Path via HKCU/Volatile Environment, so I'm not able to remove via the environmental variable to fix this issue. Instead, as @protella mentioned in another issue, I removed Windows Subsystem for Linux via "Apps & features", which reverted to the previous version and removed the error.

PennRobotics avatar Jan 09 '23 10:01 PennRobotics

I have the same issue for a subst drive. I suspect that this might be a way to reproduce the issue; create an entry in

HKLM:SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

to subst any path to a new drive name, reboot the device, and launch the WSL prompt.

huettenhain avatar Jan 16 '23 19:01 huettenhain

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

PennRobotics avatar Jan 26 '23 15:01 PennRobotics

I met the same problem~ The root cause is D: does not exists when you started windows .

How to recur this issue:

  1. stop PC
  2. power off the mobile hard disk ( which is D: in my PC)
  3. restart PC, into windows ( there are some PATH variable in my windows )
  4. power up the mobile hard disk
  5. start WSL, I found the error message

solution: make sure all the PATH are available and then restart wsl.

$ wsl --shutdown $ wsl

sg552 avatar Feb 18 '23 02:02 sg552

I had encountered a similar issue, but in my case, I was getting this error for all windows paths such as C:\Windows\System32.

Simply restarting the terminal did not work for me.

Restarting wsl seemed to fix it for me ( run wsl --shutdown in PowerShell and then reopen your wsl terminal )

arun07as avatar Mar 29 '23 04:03 arun07as

I had same error, seems due to my work's antivirus software Symantec Endpoint Protection, A workaround was to install Ubuntu WSL from the windows store and run via "ubuntu.exe" in the start menu.

silverham avatar Apr 02 '23 17:04 silverham

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

Thank you very much. This solved the problem for me!

RufusJWB avatar May 05 '23 19:05 RufusJWB

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

It works and here is a simple one-line command for adding that to the end of wsl.conf!

echo -e "[interop]\nappendWindowsPath = false" | sudo tee -a /etc/wsl.conf

MatrixC7 avatar May 25 '23 23:05 MatrixC7

Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode's code keyword stopped working. So, I reverted that.

imranpollob avatar May 29 '23 02:05 imranpollob

Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode's code keyword stopped working. So, I reverted that.

problem is - I do need a PATH to remote share, mounted as Z, in Windows. While WSL dislikes that.

CHerSun avatar Aug 26 '23 18:08 CHerSun

  1. The issue arises from the Windows and WSL environment path variables conflicting or the WSL attempting to access unavailable paths.
  2. A solution is to prevent WSL from appending the Windows PATH to the WSL PATH.
  3. To implement this solution, you need to edit the wsl.conf file located in the /etc/ directory in your WSL instance.
  4. Add the following lines to the wsl.conf file:

[interop] appendWindowsPath=false

felpsg avatar Oct 02 '23 13:10 felpsg