xtekky/gpt4free · error · AbraGeoBlockedError
Meta AI isn't available yet in your country
Error message
Meta AI isn't available yet in your country
What it means
During MetaAI.update_cookies(), the fetched www.meta.ai homepage HTML contains 'AbraGeoBlockedError', Meta's marker for regional unavailability. g4f maps it to AbraGeoBlockedError, telling you Meta AI is not offered in the geography of your IP address.
Source
Thrown at g4f/Provider/needs_auth/MetaAI.py:196
last_snippet_len = new_snippet_len
# if last_streamed_response is None:
# if attempts > 3:
# raise Exception("MetaAI is having issues and was not able to respond (Server Error)")
# access_token = await self.get_access_token()
# return await self.prompt(message=message, attempts=attempts + 1)
if fetch_id is not None:
sources = await self.fetch_sources(fetch_id)
if sources is not None:
yield sources
async def update_cookies(self, cookies: Cookies = None):
async with self.session.get(
"https://www.meta.ai/", cookies=cookies
) as response:
await raise_for_status(response, "Fetch home failed")
text = await response.text()
if "AbraGeoBlockedError" in text:
raise AbraGeoBlockedError("Meta AI isn't available yet in your country")
if cookies is None:
cookies = {
"_js_datr": self.extract_value(text, "_js_datr"),
"abra_csrf": self.extract_value(text, "abra_csrf"),
"datr": self.extract_value(text, "datr"),
}
self.lsd = self.extract_value(
text, start_str='"LSD",[],{"token":"', end_str='"}'
)
self.dtsg = self.extract_value(
text, start_str='"DTSGInitialData",[],{"token":"', end_str='"}'
)
self.cookies = cookies
async def fetch_sources(self, fetch_id: str) -> Sources:
if self.access_token is None:
url = "https://www.meta.ai/api/graphql/"
payload = {"lsd": self.lsd, "fb_dtsg": self.dtsg}View on GitHub (pinned to 973504e177)
Solutions
- Pass a proxy with an exit IP in a supported country (e.g. US): MetaAI(proxy='http://...')
- Verify the effective geolocation of your egress IP before instantiating
- Catch AbraGeoBlockedError and fall back to another provider when no suitable proxy exists
Example fix
// before
meta = MetaAI() # AbraGeoBlockedError in unsupported region
// after
meta = MetaAI(proxy='http://user:pass@us-residential.example:8080')
# or fall back
try:
meta = MetaAI(proxy=proxy)
except AbraGeoBlockedError:
provider = use_alternative_provider() Defensive patterns
Strategy: validation
Validate before calling
import urllib.request, json
geo = json.load(urllib.request.urlopen('http://ip-api.com/json/'))
if geo.get('countryCode') not in ('US', 'CA'): # Meta AI supported regions
proxy = 'http://us-proxy.example:8080'
meta = MetaAI(proxy=proxy) Try / catch
from g4f.Provider.needs_auth.MetaAI import AbraGeoBlockedError
try:
meta = MetaAI(proxy=proxy)
except AbraGeoBlockedError:
meta = None # provider unusable from this egress; switch provider Prevention
- Check egress IP geolocation before using MetaAI
- Route via a supported-country proxy in deployed environments
- Provide an alternative provider in your abstraction for geo-blocked cases
When it happens
Trigger: GET https://www.meta.ai/ (with optional cookies) whose response text embeds AbraGeoBlockedError — any instantiation of MetaAI from a blocked country or via a proxy exit node in one.
Common situations: Servers hosted in the EU/UK or other unsupported regions; VPN/proxy whose exit IP resolves to a blocked country; traveling users; CI runners in unsupported datacenter regions.
Related errors
- Invalid response: {last_msg}
- Failed to obtain Turnstile token for DeepInfra request.
- No response
- {item}
- {message or html}
AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14).
Data as JSON: /api/errors/cdeadb06faa05992.
Report an issue: GitHub.