stablestud / adsorber

Ad-blocker for Linux systems purely built on POSIX-compliant shell scripts.
MIT License
76 stars 10 forks source link

GLib error #23

Closed someone30 closed 2 months ago

someone30 commented 1 year ago

adsorber update puts out this at the moment (last update was done two months ago - no errors then):

Reading configuration ...
Updating /etc/hosts ...
  Getting: https://adaway.org/hosts.txt

(process:7250): GLib-CRITICAL **: 20:10:25.410: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_to_string: assertion 'uri != NULL' failed
2023-10-13 20:10:25 URL:https://adaway.org/hosts.txt [243454/243454] -> "-" [1]
  Getting: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_to_string: assertion 'uri != NULL' failed
2023-10-13 20:10:25 URL:https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext [99637] -> "-" [1]
  Successfully fetched 2 out of 2 hosts sources.
  Whitelist is empty, ignoring ...
  Blacklist is empty, ignoring ...
  Creating backup of current ad-domains
  Applying new hosts file ...
  Successfully applied new hosts file with 10009 blocked domains.
  Cleaning up ...
Finished successfully.

bash 5.2.15 glibc 2.38 (with CVE-2023-4911 fixed) wget 1.21.4

Of these only glibc has been updated (several times) during the last two months.

Any idea?

stablestud commented 12 months ago

Looks like the issue did not come from adsorber itself, but from some underlying tools it uses.

One guess would be adsorber makes use of deprecated tool args or their interface has changed or we just use it wrong.

I'll take a look in the next few days. Thanks for reporting 😎💪

stablestud commented 12 months ago

Unfortunately I cannot reproduce this on Ubuntu 23.10 with:

Did you compile glibc yourself? If there's a new update available for glibc could you please try again?

someone30 commented 12 months ago

I'm using the default glibc package of openSUSE Tumbleweed:

https://build.opensuse.org/package/revisions/openSUSE:Factory/glibc

I'll try again after the next update. Thanks for testing.

stablestud commented 10 months ago

Hello @someone30,

do you have any update on this? Does the issue still exists?

someone30 commented 10 months ago

do you have any update on this? Does the issue still exists?

Just tried it again: same error, even after two glibc updates during the last weeks.

So I edited the update.sh and added -d (debug) to the wget command in line 191. New adsorber update output:

Reading configuration ...
Updating /etc/hosts ...
  Getting: https://adaway.org/hosts.txt
  Setting --output-document (outputdocument) to -
DEBUG output created by Wget 1.21.4 on linux-gnu.

Reading HSTS entries from /root/.wget-hsts
URI encoding = »UTF-8«
asking libproxy about url 'https://adaway.org/hosts.txt'

(process:4535): GLib-CRITICAL **: 20:03:58.291: g_uri_get_scheme: assertion 'uri != NULL' failed
(...)

So I guess it's a wget <-> libproxy issue on (at least) openSUSE Tumbleweed. "Proof": GLib errors during adsorber update are gone after adding --no-proxy as a wget parameter.

stablestud commented 2 months ago

Closing this as resolved.

Seems like wget (v1) will be slowly replaced by wget2. Fedora 40 has already switched. So this might get less of an issue in the future.