09-01-2021 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-01-2021 03:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm testing a simple fetch from my server that should include custom headers in the response, this works perfectly fine on the simulator, all the response headers are intact, but when I test it on my Android device (Android 11 with Sense, SDK 6), the response headers are wrong and only has 4 headers (cache-control,content-length,content-type,expires) instead of everything from the server ([ 'alt-svc', 'cache-control', 'content-length', 'content-type', 'date', 'expires', 'function-execution-id', 'qr-exp', 'server', 'status', 'survey-code', 'x-cloud-trace-context' ]). Even the console log results are displayed differently, on Android it's just comma-separated, but on the simulator it's has the list brackets ([]). The code I'm using on both devices are identical.
To reproduce this, try fetching any random URL with some response headers (e.g. google.com), and log the header keys/values, for google, on simulator I got
let url = "https://www.google.com/";
fetch(url)
.then(response => {
console.log("response from", url, Array.from(response.headers.keys());
});
To me, the only logical explanation is either I missed something very obvious or that this is a really annoying bug. Unless someone at Fitbit decided to intentionally design this? Any help would be greatly appreciated.
09-14-2021 05:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-14-2021 05:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
This must be some kind of restriction in Chromium webview on Android. We aren't doing anything to restrict this.

