Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch, Axios not working on Android KitKat Emulator #30508

Closed
sanjeevyadavIT opened this issue Dec 1, 2020 · 3 comments
Closed

Fetch, Axios not working on Android KitKat Emulator #30508

sanjeevyadavIT opened this issue Dec 1, 2020 · 3 comments
Labels
Needs: Triage 🔍 🌐Networking Related to a networking API. Platform: Android Android applications. Platform: iOS iOS applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@sanjeevyadavIT
Copy link

sanjeevyadavIT commented Dec 1, 2020

Description

I am trying to make an https request either using fetch or axios library on Android Kitkat(Api level 17) and I am getting network error. I am unable to make a network call.

This is the url I'm trying to hit

https://jsonplaceholder.typicode.com/todos/1

NOTE: I'm not trying to hit local server or http server, I'm hitting a https server that is hosted on internet

React Native version:

System:
    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
    Memory: 1.95 GB / 15.52 GB
    Shell: 5.0.16 - /bin/bash
  Binaries:
    Node: 10.19.0 - /usr/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 6.14.4 - /usr/bin/npm
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 1.8.0_272 - /usr/bin/javac
    Python: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Clone the repository (Note: Error code is in network-error branch)
  2. Run npm install
  3. Create an Android Emulator with API level 17
  4. Run react-native run-android
  5. Start metro bundle npm start
  6. See error on screen or in console by turning on debug mode

Expected Results

Should have got this success response from API call

{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}

Snack, code example, screenshot, or link to a repository:

Reproducible Code is present here

Screenshot from 2020-12-01 15-28-02

PS: Get this error in Android API 17 and Android API 18, but not in 19 and above

@react-native-bot react-native-bot added Platform: Android Android applications. Platform: iOS iOS applications. 🌐Networking Related to a networking API. Platform: Linux Building on Linux. labels Dec 1, 2020
@fabOnReact
Copy link
Contributor

minimumSdk version is 21. KitKat is not supported by react-native

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 25, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 🌐Networking Related to a networking API. Platform: Android Android applications. Platform: iOS iOS applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants