Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Firefox fails to fetch region, breaking DoH providers

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
beastrabban
n00b
n00b
Posts: 9
Joined: Wed Feb 18, 2026 4:34 pm

Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by beastrabban » Fri Apr 03, 2026 11:50 pm

When firefox is launched from the terminal, the following two error messages immediately appear:

Code: Select all

console.error: Region.sys.mjs: "Error fetching region" (new SyntaxError("JSON.parse: unexpected character at line 1 column 1 of the JSON data", ""))
console.error: Region.sys.mjs: "Failed to fetch region" (new Error("NO_RESULT", "resource://gre/modules/Region.sys.mjs", 396))
This failure to fetch region prevents me from changing the default provider for DNS over HTTPS, presumably because it doesn't know which local DNS providers to offer. The default provider is listed as "mozilla.cloudflare-dns.com". When selecting either "Increased Protection" or "Max Protection", the "Choose Provider" list is completely empty except for "custom" which results in "Provider: Invalid URL" when selected. This list should be populated with the DNS providers available in my country, including Cloudflare.

For context, I am in Canada and my locale is set to en_CA.UTF-8. The issue is present with and without LTO. I use iwd with systemd-resolved.

Full output of `emerge --info firefox`:

Code: Select all

Portage 3.0.77 (python 3.13.12-final-0, default/linux/amd64/23.0/no-multilib/systemd, gcc-15, glibc-2.43-r1, 6.19.10-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.19.10-gentoo-dist-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-1145G7_@_2.60GHz-with-glibc2.43
KiB Mem:    16095224 total,  13712200 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 03 Apr 2026 17:45:00 +0000
Head commit of repository gentoo: 57a090b80b19058737b2a39633410396740de8c4
sh bash 5.3_p9-r1
ld GNU ld (Gentoo 2.46.0 p1) 2.46.0
app-misc/pax-utils:        1.3.10::gentoo
app-shells/bash:           5.3_p9-r1::gentoo
dev-build/autoconf:        2.73-r1::gentoo
dev-build/automake:        1.18.1::gentoo
dev-build/cmake:           4.3.1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r102::gentoo
dev-build/meson:           1.10.2::gentoo
dev-lang/perl:             5.42.0-r1::gentoo
dev-lang/python:           3.13.12::gentoo, 3.14.3::gentoo
dev-lang/rust-bin:         1.94.0::gentoo
llvm-core/clang:           21.1.8::gentoo, 22.1.2::gentoo
llvm-core/lld:             21.1.8::gentoo
llvm-core/llvm:            21.1.8::gentoo, 22.1.2::gentoo
sys-apps/baselayout:       2.18-r1::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-apps/systemd:          260.1::gentoo
sys-devel/binutils:        2.46.0::gentoo
sys-devel/binutils-config: 5.6::gentoo
sys-devel/gcc:             15.2.1_p20260214::gentoo
sys-devel/gcc-config:      2.12.2::gentoo
sys-kernel/linux-headers:  6.19::gentoo (virtual/os-headers)
sys-libs/glibc:            2.43-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync1.ca.gentoo.org/gentoo-portage/
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts: 

Binary Repositories:

gentoo
    location: /var/cache/binhost/gentoo
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64
    verify-signature: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe -flto"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe -flto"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live compress-index config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe -flto"
GENTOO_MIRRORS="http://mirror.reengine.net/gentoo/ http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-march=native -O2 -pipe -flto -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="bzip2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=native"
SHELL="/bin/bash"
USE="acl amd64 bzip2 cet crypt dbus dist-kernel gdbm iconv ipv6 libtirpc lto modules-sign ncurses nls openmp pam pcre policykit pulseaudio readline seccomp ssl systemd test-rust udev unicode vaapi vulkan wayland xattr zlib" ABI_X86="64" ADA_TARGET="gcc_15" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1 bmi2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oncore skytraq superstar2 tsip tripmate tnt" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby32 ruby33" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

www-client/firefox-149.0::gentoo was built with the following:
USE="clang dbus gmp-autoupdate hwaccel jumbo-build pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-pipewire system-webp wayland -X -debug -eme-free -gnome-shell -hardened -jack (-jpegxl) -libproxy -openh264 -pgo (-selinux) -sndio -system-png -telemetry -test (-valgrind) -wasm-sandbox -wifi" LLVM_SLOT="21 -20"
CFLAGS="-march=native -pipe"
CXXFLAGS="-march=native -pipe"
LDFLAGS="-march=native -pipe -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--undefined-version -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by grknight » Sat Apr 04, 2026 12:02 am

That script looks at your browser.region.network.url setting (from about:config) and pulls from there.
Top
beastrabban
n00b
n00b
Posts: 9
Joined: Wed Feb 18, 2026 4:34 pm

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by beastrabban » Sat Apr 04, 2026 12:09 am

grknight wrote: Sat Apr 04, 2026 12:02 am That script looks at your browser.region.network.url setting (from about:config) and pulls from there.
about:config shows that browser.region.network.url is currently set to

Code: Select all

https://location.services.mozilla.com/v1/country?key=%MOZILLA_API_KEY%
Top
Hu
Administrator
Administrator
Posts: 24398
Joined: Tue Mar 06, 2007 5:38 am

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by Hu » Sat Apr 04, 2026 12:35 am

What JSON document does that URL return? You probably need to interpolate the MOZILLA_API_KEY into it, so you cannot paste that URL into curl as-is.
Top
beastrabban
n00b
n00b
Posts: 9
Joined: Wed Feb 18, 2026 4:34 pm

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by beastrabban » Sat Apr 04, 2026 12:59 am

Hu wrote: Sat Apr 04, 2026 12:35 am What JSON document does that URL return? You probably need to interpolate the MOZILLA_API_KEY into it, so you cannot paste that URL into curl as-is.
What do you mean by interpolating the MOZILLA_API_KEY? The full URL returns only "Wrong key", and the parent URL https://location.services.mozilla.com/ correctly returns my country code:

Code: Select all

{"request_time":"2026-04-04T00:52:40.597832567Z","country":"CA"}
Top
Banana
Administrator
Administrator
User avatar
Posts: 2388
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by Banana » Sat Apr 04, 2026 7:04 am

Got one strange result which tells that this is not really an error:

https://firefox-source-docs.mozilla.org ... ors.md.txt
## Region.sys.mjs

This is a non-fatal error, this will not prevent you from building and
running Firefox. You might see this text in the console after running
`./mach run` and the specific text might look like:
`console.error: Region.sys.mjs: Error fetching region`.
Also you do not have any adblocking services running in your network?
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
Hu
Administrator
Administrator
Posts: 24398
Joined: Tue Mar 06, 2007 5:38 am

Re: Firefox fails to fetch region, breaking DoH providers

  • Quote

Post by Hu » Sat Apr 04, 2026 1:54 pm

The text %MOZILLA_API_KEY% appears to be a placeholder which should be replaced with an actual, valid Mozilla API key before using the URL with curl. Sending that string as a literal is probably not valid.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic