Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.39k stars 1.36k forks source link

Installation error Windows - TAP device failed to install with error code 3 #1007

Open petergloor opened 3 years ago

petergloor commented 3 years ago

During the installation of Outline-Client 1.5.0 I get an error code 3. screenshot_01

Despite of this message the application has been installed and can be started, but if I try to connect to the server the connection fails. screenshot_02

The problem can be reproduced each time I try to install the application. Sometimes I've got another Error code (I've seen 1, 2 and 3, but never 4).

Whenever I uninstall the application, remove any tap device from the device manager and reboot the PC before I try to reinstall, I get this same error code #3.

This is what is shown in the device manager before installation. screenshot_03

And here is what's shown after the failed installation: screenshot_04 screenshot_05

In case of a trial to run the installer again, as suggested by the message, a new tap device labeled "TAP-Windows Adapter V9 #2" will be added to the list of Network adapters in the Device Manager. Under the hood, this will get the device name "Ethernet 2".

I expected the installation process will run from beginning to the end without an error message and after install, the Outline-Client will let me connect to ther server.

On this PC I tried several older versions (not all), but the only one that did not fail was Outline-Client windows-v1.2.0.

Btw, I'm not new to Outline as I'm using it to connect to the same server from my Linux Dual Boot on this same PC with the latest Linux version of Outline-Client installed. I also used it for quite some time on a 32-bit Windows 10 Home box, where I upgraded to v1.4.0 around August, 2020, without any problems.

To summarize:

Additional context: I've reported the problem to the support through the app and already followed the suggestions provided. I definitely can exclude any AntiVirus or firewall problems.

After digging deep into the details and do some logging I can say that the problem is related to a TAP naming / renaming issue.

My native language is German. Meanwhile I'changed the display language from German to English. Except for easier problem reporting I'm not sure this makes a big difference for the current issue, but on the way to find a solution, it might be of interest for you to know, that one cannot rely on some default names as they might be different between languages.

As an example, I found a way to manually solve the problem for me. The relevant interface name to change to "outline-tap0" was "LAN-Verbindung". This change helped to temporarilly fix the problem, but after the next reboot that name changed to "Local Area Connection" and my fix did not work. Some kind of unique id, if availabe, would be a better solution to identify interfaces.

I will add a separate comment to show how I dealt with the problem, so I can use Outline-Client for now to connect to my server. However this must be fixed. Reading through the issues I'm quite sure I'm not the only one with this problem.

1001

petergloor commented 3 years ago

As mentioned above, I found a workaround that let me fix the problem and get a working configuration that let the Outline-Client 1.5.0 access my server.

The following depends on your Network interface configuration, your language settings and how often you tried to restart the installer. The commands are case-sensitive and the correct use of quotes matters.

I used the following procedure:

  1. Start the Outline-Client installer until the error message ending with error code 3 pops up. screenshot_01 Quit the message by clicking the OK button and wait until the setup is finished.

  2. Right-click the Start button and start a Windows PowerShell (Admin) command line window. screenshot_09

  3. In the command window change the directory to the Outline program directory using the following command:

    cd 'C:\Program Files (x86)\Outline\'

screenshot_11

  1. Show the current Network Adapter information using the following command:

    Get-NetAdapter

This displays something like the following: screenshot_12

One ore more entries starting with TAP-Windows Adapter V9 will appear in the list. These are the entries we are interested in.

Our goal is to get one single entry with TAP-Windows Adapter V9 in the InterfaceDescription and outline-tap0 in the Name part.

The Name part can be language dependent; f.eks. on a German Windows 10 you will see LAN-Verbindung instead of Local Area Connection. That doesn't matter. Just take that Name that you see in your language in the following instructions.

In our case here, under the hood the installer created an entry with a default Name of Local Area Connection and failed. In a second attempt to run the installer a new entry with a default Name of Local Area Connection and the InterfaceDescription TAP-Windows Adapter V9 #2 has been created. The first entry has been renamed to Ethernet 2 (instead outline-tap0) for some reason of mis-configuration I dont understand.

In the following procedure, while we leave the install process in its current state, we will remove any existing interface with the Hardware Id tap0901, create a single new default entry using a procedure that will fail and leave us with a single TAP-Windows Adapter V9 with a default Name for the Local Area Connection. We will manually rename this to outline-tap0 and finally we will run the procedure again to perform the rest of the configuration.

One note: be careful in case you see completely different names in conjunction with TAP-Windows Adapter V9. They might be needed for something else, e.g. another VPN system. Be careful in case you meet such a condition. I dont know how Windows deals with such things.

  1. Now let's proceed by removing all adapters with Hardware Id tap0901 ( Hardware Id can be seen in the TAP-Windows Adapter V9 Properties in the Network adapters section of the Device Manager). Use the following command:

    .\tap-windows6\tapinstall.exe remove tap0901

screenshot_13

  1. To see the cleaned list run the command Get-NetAdapter again.

  2. We proceed by trying to add a new adapter, just like the installer does, by issuing the following command (which will end with an error):

    .\add_tap_device.bat

screenshot_14

This will end with an error and that is o.k. as we use the same procedure the installer uses behind the scene.

  1. Again, use Get-NetAdapter and you will hopefully see only one TAP-Windows Adapter V9.

  2. Now comes the most important part. Let's rename the current Name part by outline-tap0 using the following command*:

    Rename-NetAdapter -Name "Local Area Connection" -NewName "outline-tap0"

*Use the name displayed for your configuration in case its different due to your language settings.

screenshot_15

  1. Now check the new name by issuing another Get-NetAdapter command. If the name is outline-tap0 then congrats, you did a good job so far.

  2. Finally, we will run the procedure that failed before one more time. Let's execute again:

    .\add_tap_device.bat

screenshot_16

If it ends with TAP network device added and configured successfully like in the picure above, then you are done.

If not, then it's probably another issue. Let's know and discuss.

adiologydev commented 3 years ago

This solution fixed my problem @petergloor ! Thanks for giving such detailed steps!

ItzSilvx commented 3 years ago

This solution worked for me as well, Thanks!

lagcleaner commented 3 years ago

Worked for me, thanks, for the effort @petergloor

expressrussian commented 2 years ago

Hello, This bug which affects almost all Windows 10 clients is over 1 year now. Do you plan to fix the installation program, so it installs correctly? This workaround procedure is quite complex and multi-stage, it is too difficult for most users... Another thing: this workaround is not on the official site, so any volatility with any involved platform will render this solution inoperable. For example, if this ()hub() site gets blocked / blocks some part of the world, the workaround will become inaccessible, so windows users will be cut off. The more dependencies, the less reliable is the whole ecosystem. The whole idea is to allow private persons overcome blocking, censorship, over-regulation, sanctions, and repressions in general.

edwinosky commented 2 years ago

month 6 of 2022 and the problem has not yet been solved

philzyx commented 2 years ago

Guys, today I ran into this problem and that's what helped me solve it:

  1. If you have Outline installed, delete it from your computer.

  2. Select the Start button, type device manager in the search box, and then select Device Manager. There you have to remove all Network Adapters.

  3. Then select the Start button, then select Settings, then select Network & Internet. There you have to click Network Reset at the bottom.

  4. After confirmation, restart your computer.

  5. Install Outline again.


    Ребят, сегодня я столкнулся с данной проблемой и вот что мне помогло ее решить:

  6. Если у вас установлен Outline, удалите его с компьютера.

  7. Зайдите в Диспетчер устройств и удалите там ВСЕ сетевые адаптеры поочередно.

  8. Зайдите в Параметры - Сеть и Интернет - внизу нажмите "Сброс сети".

  9. После подтверждения, перезагрузите компьютер.

  10. Установите Outline заново.

e11ni commented 2 years ago

Workaround from @petergloor doesn't work for me. On command Rename-NetAdapter -Name "Ethernet 8" -NewName "outline-tap0" I receive an error: `Rename-NetAdapter -Name "Ethernet 8" -NewName "outline-tap0" Rename-NetAdapter : {Object Exists} An attempt was made to create an object and the object name already existed. At line:1 char:1

I tried to find in registry all entries related to ghost "outline-tap0" network and remove them, but error still occurs. How can I fix this error? I cannot reset all network settings to defaults as philzyx proposed.

asanov commented 2 years ago

@philzyx this worked for me! Спасибо!

Collin-Kong commented 1 year ago

Workaround from @petergloor doesn't work for me. On command Rename-NetAdapter -Name "Ethernet 8" -NewName "outline-tap0" I receive an error: `Rename-NetAdapter -Name "Ethernet 8" -NewName "outline-tap0" Rename-NetAdapter : {Object Exists} An attempt was made to create an object and the object name already existed. At line:1 char:1

  • Rename-NetAdapter -Name "Ethernet 8" -NewName "outline-tap0"
  • + CategoryInfo          : ResourceExists: (MSFT_NetAdapter... = "petr-home"):ROOT/StandardCimv2/MSFT_NetAdapter) [
    Rename-NetAdapter], CimException
    + FullyQualifiedErrorId : Windows System Error 698,Rename-NetAdapter`
    

I tried to find in registry all entries related to ghost "outline-tap0" network and remove them, but error still occurs. How can I fix this error? I cannot reset all network settings to defaults as philzyx proposed.

I got this problem too. There is a hidden netadapter named "outline-tap0", but when I searched for it or tried to rename it, it disappeared and shows up as not existing. image

I also tried to modify the ".add_tap_device.bat" and make it set "outline-tap1" as default, but "Outline.exe" will not work because it connects to "outline-tap0" as default and cannot be modified.

Is there any one who can fix this problem? How to find the hidden "outline-tap0"? Will it be related to the Outline Manager, but I've uninstalled it.

maddyhof commented 1 year ago

Labeling this as feature request to stop using OpenVPN's TAP device.

soniachengii commented 1 year ago

I experienced the same issue when I upgraded my computer to Windows 11. I tried the powershell method above and also delete all network adapter by device manager, and still cannot resolve the problem. I eventually solve the problem by running the registry as Trusted Installer and get access to the registry "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces\" and delete the corresponding GUID labelled as "outline-tap0". Detailed steps:

  1. Uninstall outline client
  2. Download runasTI
  3. run the exe file and run "registry.exe"
  4. go to "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces\"
  5. Find the GUID that relates to the name "outline-tap0". Mark the GUID and delete that folder
  6. I search the GUID in the registry and delete all related folder/registry
  7. Reinstall outline client If you are experiencing the same trouble as mine due to upgrade to Windows 11, remember to run the outline client installation file in compatible mode or another error code 4 would pop out.
Xoma163 commented 4 months ago

@petergloor

In my case, it was listed as 'Unnamed Device' in Device Manager

Here are my steps: Follow steps 1-4 as described by @petergloor Next, manually install the OpenVPN TAP drivers from this link dist-(choose the dist-win10 drivers). Check the adapter as mentioned in step 8.

Retrieve the new adapter name with Get-NetAdapter -Name "*" | Format-List -Property "Name" Then, proceed as instructed by @petergloor from step 9

Edfthery commented 4 months ago

Friends! I also encountered this problem when purchasing a new laptop and transferring all Windows settings to it. It was very disappointing that my favorite VPN with several of its servers now did not want to work. I read the entire Internet. All this fun with the registry and removing the network controller and renaming... I didn’t expect it.

I decided in another way. I installed Outline-Client version 1.7.1.0 and everything worked. Here's a link for those who don't want to go crazy and waste time.

This is just an old version that got up and running for me without any questions.

https://jpg.2facookies.space/outline/outline-client1.7.1.exe

cyberwider commented 3 weeks ago

Friends! I also encountered this problem when purchasing a new laptop and transferring all Windows settings to it. It was very disappointing that my favorite VPN with several of its servers now did not want to work. I read the entire Internet. All this fun with the registry and removing the network controller and renaming... I didn’t expect it.

I decided in another way. I installed Outline-Client version 1.7.1.0 and everything worked. Here's a link for those who don't want to go crazy and waste time.

This is just an old version that got up and running for me without any questions.

https://jpg.2facookies.space/outline/outline-client1.7.1.exe

That worked for me!