henrypp / simplewall

Simple tool to configure Windows Filtering Platform (WFP) which can configure network activity on your computer.
GNU General Public License v3.0
6.23k stars 484 forks source link

[Bug] invalid (file not found or filter problem) after adding a rule for a file that has a - in the directory name #1528

Closed helpfulBro closed 1 year ago

helpfulBro commented 1 year ago

Checklist

App version

3.7.1

Windows version

10x64

Steps to reproduce

Add a rule (using the auto pop-up) for a file that is in a directory with a - in the name e.g.

G:\xboxgames\the texas chain saw massacre - pc edition\content\bbqgame\binaries\wingdk\bbqclient-wingdk-shipping.exe

Expected behavior

A firewall rule should be added and the application can now access the internet

Actual behavior

The rule is added but shows red as "Invalid file could not be found"

Logs

Reverting back to 3.7 fixes the issue, the previous rule that was red now works OK.

henrypp commented 1 year ago

what error code in log

helpfulBro commented 1 year ago
  1. Even if there is an existing rule SW asks to add another image
  2. Once added it looks like this image
  3. Here is the Packet log image
henrypp commented 1 year ago

fucking debug log

helpfulBro commented 1 year ago

lol - where do I find the fucking debug log?

henrypp commented 1 year ago

in profile directory

helpfulBro commented 1 year ago

"Error","‎26/‎08/‎2023 ‏‎7:10:31 PM","FwpmGetAppIdFromFileName","0xC00000BA","G:\xboxgames\the texas chain saw massacre - pc edition\content\bbqgame\binaries\wingdk\bbqclient-wingdk-shipping.exe","3.7.1","10.0 build 19045"

isaacsu commented 1 year ago

Since upgrading from version 3.7 to version 3.7.1, I've been encountering a similar problem with several of my Xbox games too, even if they do not have a - in their directory name.

Here are the relevant entries from my debug log:

"Error","‎29/‎08/‎2023 ‏‎7:17:26 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\minecraft dungeons\content\dungeons\binaries\win64\dungeons.exe","3.7.1","10.0 build 19044"
"Error","‎29/‎08/‎2023 ‏‎7:17:26 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\the elder scrolls v- skyrim special edition (pc)\content\skyrimse.exe","3.7.1","10.0 build 19044"
"Error","‎29/‎08/‎2023 ‏‎7:17:26 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\dishonored® definitive edition (pc)\content\binaries\win64\dishonored.exe","3.7.1","10.0 build 19044"
"Error","‎29/‎08/‎2023 ‏‎7:17:26 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\sniper elite 5\content\bin\sniper5_dx12.exe","3.7.1","10.0 build 19044"
"Error","‎29/‎08/‎2023 ‏‎7:17:26 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\sniper elite 5\content\launcher\sniperelite5.exe","3.7.1","10.0 build 19044"
"Error","‎29/‎08/‎2023 ‏‎7:17:36 PM","FwpmGetAppIdFromFileName","0xC00000BA","C:\xboxgames\minecraft dungeons\content\dungeons\binaries\win64\dungeons.exe","3.7.1","10.0 build 19044"

Downgrading to version 3.7 fixes the issue.

henrypp commented 1 year ago

author and @isaacsu: check this build [REMOVED]

helpfulBro commented 1 year ago

image Same as before

helpfulBro commented 1 year ago

Thanks @henrypp - still the same as above even with the new file.

demonkingzaine commented 1 year ago

Having the same issue even with the latest test build.

henrypp commented 1 year ago

@helpfulBro same error code or what? specified apps still no inet access?

helpfulBro commented 1 year ago

Hey @henrypp - here is the error from the log.

Same app, no internet access. Same behaviour, constantly asks to allow/deny.

"Error","‎5/‎09/‎2023 ‏‎9:48:18 AM","FwpmGetAppIdFromFileName","0xC0000022","G:\xboxgames\the texas chain saw massacre - pc edition\content\bbqgame\binaries\wingdk\bbqclient-wingdk-shipping.exe","3.7.1","10.0 build 19045"

"Error","‎7/‎09/‎2023 ‏‎1:36:09 PM","FwpmGetAppIdFromFileName","0xC0000022","G:\xboxgames\the texas chain saw massacre - pc edition\content\bbqgame\binaries\wingdk\bbqclient-wingdk-shipping.exe","3.7.1","10.0 build 19045"

BTW as a suggestion for feature enhancement it would be helpful to have a link to 'debug log files' in the UI? Help -> Open debug log

henrypp commented 1 year ago

@helpfulBro & @demonkingzaine okay, i see, now check this build simplewall.zip.

demonkingzaine commented 1 year ago

With that build everything appears to be working as intended on my end. All filters related to Xbox App titles are working both new and old.

Thanks for all the hard work!

helpfulBro commented 1 year ago

Yep confirmed it's OK now. Thanks @henrypp

h7896v7347 commented 4 days ago

Just got Xbox Game Pass, and have the same problem when running 3.8.4.0. Clicking allow does nothing - game does not connect and packet log shows 40 records like that.

cod.exe, ‎18.‎10.‎2024 ‏‎20:30:42, 192.168.0.19, M, 2850, 4.209.244.239, 443 (https), tcp, Outbound, [B] Internal\BlockConnection

Downgrade to 3.7.2.0 allows me to play games.

When i switch back to 3.8.4.0 and export rules it is truncating game path to just c: and is blocking game.

<item path="C:\" timestamp="1729276112" is_enabled="true"/>

image

File - Add App -> cod.exe end with error you need admin permissions

Only lines in debug log

""Error","18.10.2024 20:34:07","_wfp_createrulefilter","0x00000000","S-1-15-2-3206916597-2687442160-1101572673-481554874-1490292038-318123121-2058052176","3.8.4","10.0 build 22631" "Error","‎18.‎10.‎2024 ‏‎20:40:12","_r_fs_createfile","0xC000003A","C:\users\m\appdata\local\arenabreakoutinfiniteminiloader\arenabreakoutinfiniteminiloader.exe","3.7.2","10.0 build 22631" "Error","‎18.‎10.‎2024 ‏‎20:40:12","_r_fs_createfile","0xC000003A","C:\users\m\appdata\local\arenabreakoutinfiniteminiloader\tiny_dl\versionservice.exe","3.7.2","10.0 build 22631" "Error","‎18.‎10.‎2024 ‏‎20:40:16","_wfp_createrulefilter","0x00000000","S-1-15-2-3206916597-2687442160-1101572673-481554874-1490292038-318123121-2058052176","3.7.2","10.0 build 22631" "Error","18.10.2024 20:41:12","FwpmFilterGetSecurityInfoByKey0","0x80320003","D:\projects\simplewall\src\notifications.c:120","3.8.4","10.0 build 22631" "Error","18.10.2024 20:41:12","FwpmFilterGetSecurityInfoByKey0","0x80320003","D:\projects\simplewall\src\notifications.c:120","3.8.4","10.0 build 22631" "Error","18.10.2024 20:41:12","FwpmFilterGetSecurityInfoByKey0","0x80320003","D:\projects\simplewall\src\notifications.c:120","3.8.4","10.0 build 22631" "Error","18.10.2024 20:41:12","FwpmFilterGetSecurityInfoByKey0","0x80320003","D:\projects\simplewall\src\notifications.c:120","3.8.4","10.0 build 22631"

henrypp commented 4 days ago

@h7896v7347 0xC000003A is a error code means file not found, it is not SW problem, correct your computer!