Have the same issue. Upon investigating, I discovered that the problem originates from the server at https://chat.openai.com/backend-api/compliance
, which is returning an empty response like this:
{
"registration_country": null,
"require_cookie_consent": false,
"terms_of_use": null,
"cookie_consent": null,
"age_verification": null
}
However, it should ideally return something like this:
{
"registration_country": "DE",
"require_cookie_consent": false,
"terms_of_use": {
"is_required": false,
"display": null
},
"cookie_consent": {
"is_required": false
},
"age_verification": {
"is_required": false
}
}
The root cause of the issue is that I’m using a VPN, and Cloudflare (which is the endpoints) is preventing the request from being processed correctly. As a result, the code that attempts to access terms_of_use.is_required
fails with a TypeError because terms_of_use
is null.
To potentially fix the issue, should implement conditional checks using the optional chaining operator (?.
) in the code.
// s.terms_of_use.is_required <- crashed
s?.terms_of_use?.is_required // fixed
This can be accomplished using DevTools on-the-fly. Alternatively, disabling VPN (or use another one that is compatible with Cloudflare) also works.