"Prickily Hooks" by "Derek Gavey" on Flickr

When starting WSL2, you get “The attempted operation is not supported for the type of object referenced.”

Hello, welcome to my personal knowledgebase article 😁

I think you only get this if you have some tool or service which hooks WinSock to perform content inspection, but if you do, you need to tell WinSock to reject attempts to hook WSL2.

According to this post on the Github WSL Issues list, you need to add a key into your registry, in the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog and they mention that the vendor of “proxifier” have released a tool which creates this key. The screen shot in the very next post shows this registry key having been created.

A screenshot of a screenshot of the registry path needed to prevent WinSock from being hooked.

I don’t know if the hex ID of the “AppId_Catalog” path created is relevant, but it was what was in the screenshot, so I copied it, and created this registry export file. Feel free to create your own version of this file, and run it to fix your own issue.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3]
"AppFullPath"="C:\\Windows\\System32\\wsl.exe"
"PermittedLspCategories"=dword:80000000

As soon as I’d included this registry entry, I was able to access WSL OK again.

Featured image is β€œPrickily Hooks” by β€œDerek Gavey” on Flickr and is released under a CC-BY license.

JonTheNiceGuy

He/Him. Husband and father. Linux advocating geek. Co-Host on the AdminAdmin Podcast, occasional conference speaker.

9 thoughts to “When starting WSL2, you get “The attempted operation is not supported for the type of object referenced.””

    1. Hmm that’s odd. To be fair, I had that issue a while ago, and there have been a few revisions to Windows since then, so maybe they broke things in new and interesting ways! I’m not sure though.

  1. Thanks Jon! That was exactly it! Great. I have a lot invested in WSL since “returning to the fold” after years of being a daily Linux driver. In particular multiple local and web backups using Rsync. Scary to think I might need to uninstall Ubuntu as some were suggesting. Not. I created this key manually [just because I’m a hack and do weird things] and it worked like a charm. Many thanks again my friend!

  2. Hey Jon really want to thank you for this, great solution. It worked for me to start docker desktop on windows.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.