-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: control/filtering/set_url | scanning filter contents: bufio.Scanner: token too long | 400 on blocklist update #6003
Comments
Verbose log:
|
Thanks for the report. We've introduced an optimization that limits the RAM consumed by the update check by limiting the length of a single rule to 1024 bytes, and it seems like your list has 66 rules longer than that: grep -e '^.\{1024,\}' -- ./blocklist | wc Moreover, neither of these rules seem to be DNS rules, mostly being content-blocking rules. You can filter them out with a script like: sed '/^.\{1024,\}/d' ./blocklist > ./blocklist_dns |
Ah, I see. I'll try that. |
Success! After tweaking the transformation option of my hostlist-compiler settings it's all working again. Thanks for the quick answer and the hint! |
Since updating to v0.107.34, I have encountered this error. I subscribed to someone else's rules, so what should I do? |
Error: control/filtering/add_url | Couldn't fetch filter from URL "https://raw.gitmirror.com/monsm/XXKiller/main/x.txt": line at index 44290: character at index 91: non-printable character | 400 |
Ask the maintainer of that list to use HostListCompiler and apply the |
Since quite a number of filter lists are used with both, AdGuardHome and ad-blocker extensions for browsers (µblock, Adguard, etc.), I guess we'll see this issue popping up for a number of these lists. |
Thank you, it seems that the rule maintainer can only make the changes. |
@ppfeufer Help me see how to implement it with the HostListCompiler,https://github.com/monsm/XXKiller/blob/mae/RMaker/make.cmd |
All can be found here » https://github.com/ppfeufer/adguard-filter-list |
@ppfeufer Please check my revision to see if there are any mistakes,thinks |
This is beyond the scope and topic of this issue. How to use the HostListCompiler is well explained in their repository (https://github.com/AdguardTeam/HostlistCompiler). Please have a look there. |
Upon reinspecting the code, I think we can actually allow larger lines without losing the optimization for the most common case. We can also improve the error message as well. I'm going to reopen the issue now and commit a fix soon. |
The line-length limit has been relaxed, and the error message now includes the character in question:
|
could the adguardHome auto fix the error,auto delete line |
@monsm, from what I understand, the error is there to prevent users from putting e.g. binary files instead of text ones. There is a similar check against HTML text too. What kind of error are you getting? Perhaps the check could be relaxed. |
zwnj & zwsp error in rules,But I don't know how to remove the unsupported lines from the rules |
Updates #6003. Squashed commit of the following: commit 1874860 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jul 13 19:36:26 2023 +0300 filtering/rulelist: imp test commit 871a41a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jul 13 19:10:35 2023 +0300 filtering/rulelist: relax validation
@monsm, yes, and we have added test cases for that to make sure that they keep working. The hard line-length limit has been returned to 64 KiB. |
Hello |
@fbaijnauth, please read above. The fix is already on the Edge channel. The README has instructions on testing the Edge and Beta versions. (Do not forget to backup your configuration.) |
thank you |
@ainar-g May I ask, when will the stable version of v0.107.35 be released? |
@Jefffish09, about 15 minutes ago, heh. |
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to report a bug and not ask a question or ask for help
I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Linux/ARM64
Installation
GitHub releases or script from README
Setup
On one machine
AdGuard Home version
v0.107.34
Action
Trying to update my blocklist via the UI.
Expected result
Blocklist updating successfully.
Actual result
Additional information and/or screenshots
This is a blocklist I have been using for a long time, and after today's update, I noticed that it is mentioned with 0 entries.
So I tried to update it manually by editing and saving, which resulted in this error message.
Blocklist URL: https://raw.githubusercontent.com/ppfeufer/adguard-filter-list/master/blocklist
The text was updated successfully, but these errors were encountered: