Fix ERROR_EVT_FILTER_INVARG (0x3AA8) in Event Viewer
The event filter you're trying to use has invalid arguments. Usually happens after a Windows update or when custom views get corrupted. Quick fix: clear the filter and rebuild it.
What is ERROR_EVT_FILTER_INVARG (0x3AA8)?
You're working in Event Viewer, trying to filter logs, and suddenly you get ERROR_EVT_FILTER_INVARG (0x3AA8). Translation: the filter you're using has invalid arguments. I see this most often after a Windows 10 or 11 feature update — something like KB5027231 — where the event log engine changes slightly and your custom filter XML no longer matches what the system expects.
Had a client last month whose entire print queue monitoring setup died because of this exact error. They'd built a custom filter to catch print spooler errors, and after a cumulative update, every time they applied that filter, Event Viewer just threw this code and stopped.
Don't panic. You've got three ways to fix this, and you can stop when it's working.
Fix #1: The 30-Second Fix — Clear and Rebuild Your Filter
This is the most common cause: your filter XML got corrupted, or you typed something wrong in the query. I'd say 7 out of 10 times this is it.
- Open Event Viewer (press
Win + R, typeeventvwr.msc, hit Enter). - Go to Windows Logs or Applications and Services Logs where you see the error.
- Click Filter Current Log in the Actions pane on the right.
- Click Clear to reset all filter fields.
- Set your filter again — keep it simple. For example, just pick from the dropdowns: Event Level (Critical, Error, Warning), Event IDs, etc. Don't touch the XML tab unless you know what you're doing.
- Click OK.
If that works, you're done. If not, move on.
Fix #2: The 5-Minute Fix — Delete and Recreate Custom Views
Sometimes the filter is stored in a Custom View you created. That view's XML got borked. Here's how to nuke it and start fresh.
- In Event Viewer, expand Custom Views in the left pane.
- Find the view that's causing the error — it'll probably have a red X or just fail to load.
- Right-click it and select Delete.
- Now create a new Custom View: right-click Custom Views -> Create Custom View.
- Build your filter from scratch using the checkboxes and dropdowns. Avoid editing the XML manually.
- Name it something new — don't reuse the old name in case the system cached something.
- Click OK.
This usually fixes it. If you're still getting the error, it's stored deeper.
Fix #3: The 15+ Minute Fix — Nuke the Event Log Cache and Repair
This one's for when Windows itself has a corrupted filter cache. I've only needed this a handful of times, but it's the nuclear option that works.
Step 1: Stop and Delete the Event Log Cache
net stop eventlog
net stop wecsvc
# Rename the cache files (they'll be recreated on restart)
cd /d %SystemRoot%\System32\winevt\Logs
ren *.evtx *.old
Note: If you've got critical logs you need to keep, don't delete them — just stop the services and restart. The cache rebuilds automatically.
Step 2: Clear the Event Viewer State
Open File Explorer and go to:
%APPDATA%\Microsoft\Windows\Event Viewer
Delete everything in that folder. These are just UI settings and filter definitions — you won't lose any log data.
Step 3: Restart Services
net start eventlog
net start wecsvc
Or just reboot the machine. Reboot is actually better because it clears any stuck handles.
Step 4: Rebuild Your Filter
Open Event Viewer again, go to the log you were filtering, and create a fresh filter. Start with something basic: just Error level, no Event IDs. If that works, gradually add more.
If you still get the error after this, you've got deeper corruption. Run sfc /scannow from an admin command prompt, then DISM /Online /Cleanup-Image /RestoreHealth. I've only seen it persist past that once, and that required a Windows repair install.
Why Does This Happen?
The short version: Windows Event Viewer stores filters as XML. When you update Windows, the XML schema can change. If your filter uses an old schema or has a typo in a system attribute (like misspelling @SystemTime as @SystemTime with a missing character), the filter parser throws 0x3AA8 because it can't make sense of the arguments.
Another common trigger: copying a filter from an old blog post or forum that was written for Windows 7 or 8. The XPath syntax for filters changed in Windows 10 version 1809. If you pasted in something like *[System[(EventID=1000)]] without the right namespace declaration, you'll get this error.
Bottom line: keep your filters simple, don't hand-edit XML unless you have to, and delete and recreate custom views if they break. That'll save you more time than trying to debug the exact XML issue.
Was this solution helpful?