tnodir / fort

Fort Firewall for Windows
GNU General Public License v3.0
1.1k stars 96 forks source link

Inapp update fails #259

Closed dashke closed 5 days ago

dashke commented 4 weeks ago

It appears that the in-app update fails, as shown in the video, possibly due to the lack of administrative privileges.

fort_in_app_update_fails

tnodir commented 4 weeks ago

There were various bugs in the in-app updates during 3.12.* versions.

Please update to v3.12.11 manually. And try to use the in-app update (for v3.12.12).

tnodir commented 3 weeks ago

Please update to v3.12.11 or v.3.12.12 by hand and try the in-app update for v3.12.13 - it should work fine.

Reopen this issue on any problem with in-app update.

dashke commented 3 weeks ago

Thanks Nodir, you are awesome as always!

dashke commented 3 weeks ago

Unfortunately, it's still reproducible in v3.12.12.

tnodir commented 3 weeks ago

@dashke I can not reproduce the bug:

So, more info is needed to reproduce:

Also you can try to debug it:

dashke commented 3 weeks ago

>which Windows version/build do you use? Windows 10; 19045.4474

>which Fort Installer: 32- or 64-bit? 64bit

>which flags (Windows Service, Portable) was checked on installation? All except the Portable flag

Unfortunately, even after uncommenting the line you advised and enabling the "Log debug messages" flag, I didn't get any logs - image

I have checked my other system and everything is fine there, so this must indeed be an isolated problem.

Update: Seems that everything is logged to 'log_fort_clt_2024-02-03_12-42-41_632.txt' and 'log_fort_svc_2024-02-03_00-04-15_306.txt' -

log_fort_clt_2024-02-03_12-42-41_632.txt

2024-06-09 13:56:23.878 . Fort Firewall 3.12.13 Client 2024-06-09 13:56:23.878 . util.osUtil: Run command: "C:\Windows\system32\cmd.exe" QList("/c", "ping -n 4 127.0.0.1 >NUL & if not exist inst.tmp start FortFirewall.exe --launch") 2024-06-09 13:56:23.923 . util.osUtil: Quit due "client required restart"

2024-06-09 13:56:29.108 . Fort Firewall 3.12.13 Client 2024-06-09 13:56:29.108 . fortManager: Started as Client 2024-06-09 13:58:08.844 . optionsCtrl: Conf save

log_fort_svc_2024-02-03_00-04-15_306.txt

2024-06-09 13:56:18.650 . Fort Firewall 3.12.13 Service 2024-06-09 13:56:18.650 . util.net.downloader: Fetch: "https://api.github.com/repos/tnodir/fort/releases/latest" "" 2024-06-09 13:56:19.588 . manager.autoUpdate: Check: "3.13.0" downloaded: false 2024-06-09 13:56:19.588 . task.updateChecker: New version found: "3.13.0" 2024-06-09 13:56:20.979 . util.net.downloader: Fetch: "https://github.com/tnodir/fort/releases/download/v3.13.0/FortFirewall-3.13.0-windows10-x86_64.exe" "" 2024-06-09 13:56:22.715 . manager.autoUpdate: Installer saved: "C:/ProgramData/Fort Firewall/cache/update/FortFirewall-3.13.0-windows10-x86_64.exe" 2024-06-09 13:56:23.878 . manager.autoUpdate: Run Installer: "C:/ProgramData/Fort Firewall/cache/update/FortFirewall-3.13.0-windows10-x86_64.exe" QList("/VERYSILENT", "/SUPPRESSMSGBOXES", "/NOCANCEL") 2024-06-09 13:56:23.878 . util.osUtil: Quit due "new version install"

tnodir commented 3 weeks ago

@dashke Try to:

Expected artifacts:

dashke commented 3 weeks ago

I have followed your instructions promptly, but still no luck -

log_fort_svc_2024-06-09_14-49-15_424.txt

2024-06-09 14:49:15.423 . Fort Firewall 3.12.13 Service 2024-06-09 14:49:15.423 . fortManager: Started as Service 2024-06-09 14:49:16.587 . control: Client connected: id: 1 count: 1 2024-06-09 14:49:39.440 . fortManager: Restart required: "Backup Imported" 2024-06-09 14:49:39.440 . util.osUtil: Quit due "service required restart" 2024-06-09 14:49:39.457 . util.osUtil: Run command: "C:\Windows\system32\cmd.exe" QList("/c", "ping -n 2 127.0.0.1 >NUL & sc start FortFirewallSvc")

2024-06-09 14:49:40.770 . Fort Firewall 3.12.13 Service 2024-06-09 14:49:40.770 . manager.autoUpdate: Check: "3.13.0" downloaded: false 2024-06-09 14:49:40.826 . fortManager: Started as Service 2024-06-09 14:49:41.636 . control: Client connected: id: 1 count: 1 2024-06-09 14:50:07.691 . util.net.downloader: Fetch: "https://api.github.com/repos/tnodir/fort/releases/latest" "" 2024-06-09 14:50:08.239 . task.updateChecker: Same version 2024-06-09 14:50:09.155 . util.net.downloader: Fetch: "https://github.com/tnodir/fort/releases/download/v3.13.0/FortFirewall-3.13.0-windows10-x86_64.exe" "" 2024-06-09 14:50:10.899 . manager.autoUpdate: Installer saved: "C:/ProgramData/Fort Firewall/cache/update/FortFirewall-3.13.0-windows10-x86_64.exe" 2024-06-09 14:50:11.849 . manager.autoUpdate: Run Installer: "C:/ProgramData/Fort Firewall/cache/update/FortFirewall-3.13.0-windows10-x86_64.exe" QList("/VERYSILENT", "/SUPPRESSMSGBOXES", "/NOCANCEL", "/LOG") 2024-06-09 14:50:11.849 . util.osUtil: Quit due "new version install"

2024-06-09 14:51:19.289 . Fort Firewall 3.12.13 Service 2024-06-09 14:51:19.289 . manager.autoUpdate: Check: "3.13.0" downloaded: true 2024-06-09 14:51:19.349 . fortManager: Started as Service 2024-06-09 14:51:20.464 . control: Client connected: id: 1 count: 1

log_fort_clt_2024-06-09_14-49-16_608.txt

2024-06-09 14:49:16.605 . Fort Firewall 3.12.13 Client 2024-06-09 14:49:16.605 . fortManager: Started as Client 2024-06-09 14:49:41.440 . util.osUtil: restart: "C:/Program Files/Fort Firewall/FortFirewall.exe" QList("--launch", "--lang", "en") 2024-06-09 14:49:41.440 . util.osUtil: Quit due "required restart"

2024-06-09 14:49:41.655 . Fort Firewall 3.12.13 Client 2024-06-09 14:49:41.655 . fortManager: Started as Client 2024-06-09 14:50:11.849 . util.osUtil: Run command: "C:\Windows\system32\cmd.exe" QList("/c", "ping -n 4 127.0.0.1 >NUL & if not exist inst.tmp start FortFirewall.exe --launch") 2024-06-09 14:50:11.857 . util.osUtil: Quit due "client required restart"

2024-06-09 14:50:15.101 . Fort Firewall 3.12.13 Client 2024-06-09 14:50:15.101 . fortManager: Started as Client 2024-06-09 14:50:39.141 . util.osUtil: Quit due "user request"

2024-06-09 14:50:44.638 . Fort Firewall 3.12.13 Client 2024-06-09 14:50:44.638 . fortManager: Started as Client 2024-06-09 14:50:50.737 . util.osUtil: Quit due "user request"

2024-06-09 14:51:20.491 . Fort Firewall 3.12.13 Client 2024-06-09 14:51:20.491 . fortManager: Started as Client

I had to reinstall FortFirewall-3.12.13-windows10-x86_64.exe to get the firewall to work.

tnodir commented 3 weeks ago

"/LOG")

Please find a "Setup*" file of InnoSetup in the %TEMP% folder:

dashke commented 3 weeks ago

I have found the setup log in C:\Windows\Temp -

2024-06-09 14:50:15.780 Log opened. (Time zone: UTC+02:00) 2024-06-09 14:50:15.781 Setup version: Inno Setup version 5.6.1 (u) 2024-06-09 14:50:15.781 Original Setup EXE: C:\ProgramData\Fort Firewall\cache\update\FortFirewall-3.13.0-windows10-x86_64.exe 2024-06-09 14:50:15.781 Setup command line: /SL5="$140042,5824834,283136,C:\ProgramData\Fort Firewall\cache\update\FortFirewall-3.13.0-windows10-x86_64.exe" /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /LOG 2024-06-09 14:50:15.781 Windows version: 10.0.19045 (NT platform: Yes) 2024-06-09 14:50:15.781 64-bit Windows: Yes 2024-06-09 14:50:15.782 Processor architecture: x64 2024-06-09 14:50:15.782 User privileges: Administrative 2024-06-09 14:50:15.783 64-bit install mode: Yes 2024-06-09 14:50:15.859 Created temporary directory: C:\Windows\TEMP\is-AI70N.tmp 2024-06-09 14:50:15.921 -- DLL function import -- 2024-06-09 14:50:15.921 Function name: IsProcessorFeaturePresent 2024-06-09 14:50:15.921 DLL name: kernel32.dll 2024-06-09 14:50:15.921 Dest DLL name: kernel32.dll 2024-06-09 14:50:15.921 Importing the DLL function. 2024-06-09 14:50:15.921 Successfully imported the DLL function. Delay loaded? No 2024-06-09 14:50:16.283 RestartManager found an application using one of our files: Fort Firewall 2024-06-09 14:50:16.284 Can use RestartManager to avoid reboot? No (2) 2024-06-09 14:50:16.286 Starting the installation process. 2024-06-09 14:50:16.307 Directory for uninstall files: C:\Program Files\Fort Firewall\uninst 2024-06-09 14:50:16.307 Will append to existing uninstall log: C:\Program Files\Fort Firewall\uninst\unins000.dat 2024-06-09 14:50:16.309 -- File entry -- 2024-06-09 14:50:16.309 Dest filename: C:\Program Files\Fort Firewall\uninst\unins000.exe 2024-06-09 14:50:16.309 Non-default bitness: 32-bit 2024-06-09 14:50:16.312 Time stamp of our file: 2024-06-09 14:50:13.909 2024-06-09 14:50:16.312 Dest file exists. 2024-06-09 14:50:16.312 Time stamp of existing file: 2024-06-09 14:48:31.769 2024-06-09 14:50:16.312 Version of our file: 51.1052.0.0 2024-06-09 14:50:16.313 Version of existing file: 51.1052.0.0 2024-06-09 14:50:16.313 Installing the file. 2024-06-09 14:50:16.319 Uninstaller requires administrator: Yes 2024-06-09 14:50:16.320 Leaving temporary file in place for now. 2024-06-09 14:50:16.321 -- File entry -- 2024-06-09 14:50:16.321 Dest filename: C:\Program Files\Fort Firewall\FortFirewall.exe 2024-06-09 14:50:16.321 Time stamp of our file: 2024-06-08 15:13:56.000 2024-06-09 14:50:16.321 Dest file exists. 2024-06-09 14:50:16.321 Time stamp of existing file: 2024-06-05 15:26:50.000 2024-06-09 14:50:16.321 Installing the file. 2024-06-09 14:50:17.029 DeleteFile: The existing file appears to be in use (5). Retrying. 2024-06-09 14:50:18.041 DeleteFile: The existing file appears to be in use (5). Retrying. 2024-06-09 14:50:19.055 DeleteFile: The existing file appears to be in use (5). Retrying. 2024-06-09 14:50:20.069 DeleteFile: The existing file appears to be in use (5). Retrying. 2024-06-09 14:50:21.082 Defaulting to Abort for suppressed message box (Abort/Retry/Ignore): C:\Program Files\Fort Firewall\FortFirewall.exe

                      An error occurred while trying to replace the existing file:
                      DeleteFile failed; code 5.
                      Access is denied.

                      Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation.

2024-06-09 14:50:21.082 User canceled the installation process. 2024-06-09 14:50:21.083 Rolling back changes. 2024-06-09 14:50:21.084 Starting the uninstallation process. 2024-06-09 14:50:21.084 Uninstallation process succeeded. 2024-06-09 14:50:21.084 Deinitializing Setup. 2024-06-09 14:50:21.129 Log closed.

tnodir commented 3 weeks ago

OK, thanks for logs:

  1. Installer requested to start at 14:50:11.849 . manager.autoUpdate: Run Installer...
  2. Client closed at 14:50:11.849 . util.osUtil: Run command...
  3. Client auto-started at 14:50:15.101 . fortManager: Started as Client, after 4 seconds delay
  4. Installer started at 14:50:15.780 Log opened...
dashke commented 3 weeks ago

Is it possible to introduce a delay or a check in the installer to prevent the client from starting before the installation is complete?

tnodir commented 3 weeks ago

Is it possible to introduce a delay or a check in the installer to prevent the client from starting before the installation is complete?

I expected the Installer to always run in a maximum of 1 second. (But 4 seconds is nonsense for me..)

Installer creates a inst.tmp file on startup and client will not start, if that file exists.

I'll also add the creation of inst.tmp file to Fort: before launching the Installer. So, client will be just closed, if Installer did not yet start for any reason..

dashke commented 3 weeks ago

That would be awesome, thanks so much Nodir! ❤️

tnodir commented 3 weeks ago

Fixed by 2e239230.

So the fix will be in 3.13.1, but have to wait for 3.13.2 to check it.

tnodir commented 5 days ago

@dashke Please try to update from 3.13.1 to new 3.13.2.

dashke commented 5 days ago

Thank you @tnodir everything is working flawlessly now! I appreciate your support as always. :)