amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
4.47k stars 291 forks source link

v2.0.1 AmneziaVPN-service fails to start with error 1053 #46

Closed boscogh closed 2 years ago

boscogh commented 2 years ago

Works fine if started as a console app with admin privileges Have tried to install/remove several times, also increased "ServicesPipeTimeout" registry key - no help

boscogh commented 2 years ago

issue remains on 2.0.6

pokamest commented 2 years ago

Please attach logs or send directly via telegram https://t.me/amnezia_vpn_en

boscogh commented 2 years ago

the problem is that service does not create any logs, it just fails to start

pokamest commented 2 years ago

What is Windows version? You can try to start service by hands from cmd (with admin privil) by passing argument "-s", service will be launched as regular process, and then you can check if it crashed, or something else.

boscogh commented 2 years ago

C:\WINDOWS\system32>ver Microsoft Windows [Version 10.0.19044.1466]

C:\Program Files\AmneziaVPN>AmneziaVPN-service.exe -s 2022-01-26 07:41:49 info Started as console application --started normally as console app--

C:\Program Files\AmneziaVPN>AmneziaVPN-service.exe 2022-01-26 07:55:00 info Started as system service The service AmneziaVPN-service could not start --no other logs--

boscogh commented 2 years ago

I use the process as console app, it works just fine (as I said at the beginning). But it's not convinient to run it manually, and as service it just won't start at all. the errors from event viewer:

same error on 2.0.7

pokamest commented 2 years ago

Btw, it's not possible to start AmneziaVPN-service.exe (without -s arg) as a service from cmd, only system able to launch service. Another question is why service crashing on your Windows. You can try to stop and remove service from admin cmd, reboot, and then reinstall app:

sc stop AmneziaVPN-service
sc delete AmneziaVPN-service
boscogh commented 2 years ago

I reinstalled it already several times (multiple 2.0.x realeases). before 2.0 release, it was working fine, so might be just building flags are different

boscogh commented 2 years ago

Tested on 2.0.8, still the same, even again did that you recommend with stop and delete, reboot and reinstall - nothing changed. Could you please mb create a debug build of service app, so it at least print some trace messages in the log? I see on stackexchange they say this could be the problem with unhandled exception, so mb make some more catch sections and trace the error too?

boscogh commented 2 years ago

I finally got it. Sorry for taking your time, it was a dll conflict on my side. I reinstalled VC runtime libs from there https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 reordered file paths (this may be a no-op), rebooted and now service works just fine, right after windows start. You probably may consider to distribute the required MSVC libs with your code too :)

it works fine with MSVCP140.dll v14.30.30708.0

pokamest commented 2 years ago

Actually it's already distributed with app - you can find vc_redist.x64.exe installer in the app folder. The issue is the app can't determine if vcredist reinstall required.

R12M commented 2 years ago

Приложение не устанавливается. (AmneziaVPN2.0,8,3*64,exe - Системная ошибка. Не удается продолжить выполнение кода, поскольку система не обнаружила MSVCP140,dll. Для устранения этой проблемы попробуйте переустановить программу) - Неоднократно переустанавливал, но всё равно не работает. Что делать?

MikadoAndru commented 1 year ago

I finally got it. Sorry for taking your time, it was a dll conflict on my side. I reinstalled VC runtime libs from there https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 reordered file paths (this may be a no-op), rebooted and now service works just fine, right after windows start. You probably may consider to distribute the required MSVC libs with your code too :)

it works fine with MSVCP140.dll v14.30.30708.0

do not choose between the 32bit (x86) or the 64bit (x64), just install both if you have a 64bit (x64) based system.