HTTP Fetch fails with "TypeError: Network request failed" => Resolved
### Description There are 83 issues opened and unanswered about network requests failing with this generic error. The main causes of the pain are: 1. Not getting an answer from the team 2. The exception is far too generic and does not suggest the origin of the problem ### Problem description Using `fetch` to get/post on a HTTPS web server which is using a valid and trusted but **not public** CA. - Using Chrome and other apps the requests are always successful and without certificate problems Sample code in react native: ``` static async Post(): Promise<string> { let srv = "my.domain.com"; let port = 5101; let device = "abcd"; let url = `https://${srv}:${port}/Do/Something?devicename=${device}`; try { let response = await fetch(url, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-type':'application/json' }, body: JSON.stringify({ key: 'value', }) }); if(response.status !== 200) throw new Error(`Can't open ${srv} for ${device} with status ${response.status}`); return response.json(); } catch(e) { console.log(e); throw(e); } } ``` ### Solution Due to Android restrictions, a `network_security_config` configuration must be added to the application. It is an xml file that can be added by following these steps: 1. Edit the `android/app/src/main/AndroidManifest.xml` 2. Ad
Posted by raffaeler on Jan 20, 2022, 10:53 AM
Tags
Related issues
- 2026 - Microsoft Office 365
- [Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
- Gamut mapping
- [Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
- [Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
- [BUG]: infinite loading of videos
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
github (SaaS)
2026 - Microsoft Office 365
[Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
Gamut mapping
[Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
[Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
[BUG]: infinite loading of videos
Restore GPT-5.6 Sol’s 372k Codex context window, or provide an opt-in setting
Codex Desktop for macOS repeatedly triggers `syspolicyd` / `trustd` CPU and memory runaway
HTTP Fetch fails with "TypeError: Network request failed" => Resolved
### Description There are 83 issues opened and unanswered about network requests failing with this generic error. The main causes of the pain are: 1. Not getting an answer from the team 2. The exception is far too generic and does not suggest the origin of the problem ### Problem description Using `fetch` to get/post on a HTTPS web server which is using a valid and trusted but **not public** CA. - Using Chrome and other apps the requests are always successful and without certificate problems Sample code in react native: ``` static async Post(): Promise<string> { let srv = "my.domain.com"; let port = 5101; let device = "abcd"; let url = `https://${srv}:${port}/Do/Something?devicename=${device}`; try { let response = await fetch(url, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-type':'application/json' }, body: JSON.stringify({ key: 'value', }) }); if(response.status !== 200) throw new Error(`Can't open ${srv} for ${device} with status ${response.status}`); return response.json(); } catch(e) { console.log(e); throw(e); } } ``` ### Solution Due to Android restrictions, a `network_security_config` configuration must be added to the application. It is an xml file that can be added by following these steps: 1. Edit the `android/app/src/main/AndroidManifest.xml` 2. Ad
Comments (0)
No comments yet. Start the discussion.