renative icon indicating copy to clipboard operation
renative copied to clipboard

All Network Requests Fail in Android TV Build

Open jonathankiefer opened this issue 2 years ago • 0 comments

All network requests are failing when an app is ran in the Android TV emulator. These same requests work fine in the Android emulator.

I have verified that ./platformBuilds/app_androidtv/app/src/main/AndroidManifest.xml contains <uses-permission android:name="android.permission.INTERNET" />.

Steps to reproduce:

  1. rnv new with default prompts.
  2. Modify Home.tsx screen to execute a network request, e.g.
useEffect(() => {
  fetch('https://api.publicapis.org/entries')
     .then((response) => response.json())
     .then((data) => console.log(data));
}, []);
  1. Run Android TV build: rnv run -p androidtv

Fetch request fails with "TypeError: Network request failed".

jonathankiefer avatar Aug 08 '22 22:08 jonathankiefer