Surface Pro X and Invalid Handle

Got a problem with Viscosity or need help? Ask here!

stevej

Posts: 6
Joined: Thu Nov 21, 2019 4:36 pm

Post by stevej » Sat May 15, 2021 2:11 am
Hi There,
I'm able to connect to an OpenVPN server on my Mac, but when I try to connect to it on my Surface Pro X, I get this:

May 14 11:07:33 AM: State changed to Connecting
May 14 11:07:33 AM: Viscosity Windows 1.9.3 (1723)
May 14 11:07:33 AM: Running on Windows 10 2009 (21376) ARM64
May 14 11:07:33 AM: Running on .NET Framework Version 4.8.04161.528449
May 14 11:07:33 AM: Checking reachability status of connection...
May 14 11:07:33 AM: Connection is reachable. Starting connection attempt.
May 14 11:07:33 AM: Bringing up interface...
May 14 11:07:33 AM: Interface Type: ViscTunTap
May 14 11:07:33 AM: OpenVPN 2.4.11 Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [AEAD] built on Apr 21 2021
May 14 11:07:33 AM: library versions: OpenSSL 1.1.1k 25 Mar 2021, LZO 2.10
May 14 11:07:34 AM: Valid existing endpoint found... 162.238.118.207:1194:udp
May 14 11:07:34 AM: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
May 14 11:07:34 AM: TCP/UDP: Preserving recently used remote address: [AF_INET]162.238.118.207:1194
May 14 11:07:34 AM: UDP link local: (not bound)
May 14 11:07:34 AM: UDP link remote: [AF_INET]162.238.118.207:1194
May 14 11:07:34 AM: State changed to Authenticating
May 14 11:07:34 AM: [server] Peer Connection Initiated with [AF_INET]162.238.118.207:1194
May 14 11:07:34 AM: State changed to Connecting
May 14 11:07:34 AM: Awaiting adapter to come up...
May 14 11:07:34 AM: Windows is reporting a problem with Viscosity's network interface. Errorcode = 37
May 14 11:07:34 AM: Failed to process command >OPENTUN:HANDLE. The handle is invalid
May 14 11:07:34 AM: Netsh method failed. Object reference not set to an instance of an object.
May 14 11:07:34 AM: WARNING: The TAP-Windows driver rejected a TAP_WIN_IOCTL_SET_MEDIA_STATUS DeviceIoControl call. The handle is invalid
May 14 11:07:34 AM: Assertion failed at W:\Projects\SparkLabs\viscosity-windows\external-tools\openvpn\build\buildARM64.tmp\openvpn-2.4.11\src\openvpn\tun.c:3439 (tt->cpHandle)
May 14 11:07:34 AM: State changed to Disconnected
May 14 11:07:34 AM: State changed to Disconnected

Any ideas?

Thanks,
Steve

stevej

Posts: 6
Joined: Thu Nov 21, 2019 4:36 pm

Post by stevej » Sat May 15, 2021 2:28 am
I found a solution, but I don't know why it works:
Go to Preferences⟶Advanced, and change Network Settings⟶Adapter Type from Viscosity Virtual Adapter to OpenVPN Tap Adapter (Legacy).
To ask a dumb question, what is an adapter, and what's the difference between the Viscosity adapter and the legacy adapter? What are the disadvantages in using the legacy adapter?
Thanks,
Steve

Eric

User avatar
Posts: 1089
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Mon May 17, 2021 10:42 am
Hi Steve,

It sounds like the driver has been blocked from installing. Please go to Device Manager (Right Click Start Menu), and check for any Unknown devices or Viscosity Virtual TUN adapters under Network adapters. If you see any, right click, click Uninstall, then check "Delete the driver software for this device" and click Uninstall.

After this, reinstall Viscosity (no need to remove anything first) over the top and this should correct the problem.
To ask a dumb question, what is an adapter, and what's the difference between the Viscosity adapter and the legacy adapter? What are the disadvantages in using the legacy adapter?
On Windows, a network adapter is what interfaces network traffic between an application and your hardware. The difference between the two is the legacy one is based on Windows XP technology and is a bit out of date. It has since been replaced with the newer driver which should be faster. The only disadvantage of using the legacy adapter at this stage is it is a bit slower, but you'll only notice this if you're on a network that is faster than 100Mbit.

Regards,
Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
3 posts Page 1 of 1