Skip to content
← Back to activity

Public problem

LaunchDarkly allFlags throws LaunchDarklyFlagFetchError Expected application/json content type but got...

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling ldclient.allFlags() throws "LaunchDarklyFlagFetchError: Expected application/json content type but got application/json, application/json; charset=utf-8" with SDK version 2.15.2. The duplicated content type value looked like an SDK bug, but the maintainers could not reproduce it with default settings.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

This was not an SDK bug: a browser extension was rewriting the response Content-Type header into the duplicated value "application/json, application/json; charset=utf-8", which failed the SDK content-type check. The reporter confirmed the problem came from the extension and the issue was closed as resolved on their side. If you see this exact error, disable browser extensions one by one, especially header-modifying or ad-blocking extensions, to find the culprit.

Source: https://github.com/launchdarkly/js-client-sdk/issues/205

Source: https://github.com/launchdarkly/js-client-sdk/issues/205